<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
require_once ('../include/tc_calendar.php');

$start = strtotime($_SESSION['quotation_date']);
$d = date("d", $start );
$m = date("m", $start );
$y = date("Y", $start );




?>

<!--jscript-->
<script language="javascript" src="../jscript/calendar.js"></script>
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>

</head>

<?php include('../include/wait.php') ?>

<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');">


<?php
$table_name = $_SESSION['db_prefix']."_list_quote_validity";
    $position_query = "SELECT item_name FROM $table_name ORDER BY item_name ASC";
  $arrId3 = array ();
  $arrName3 = array ();
  $position_result = execsql($position_query);
  if ($position_result!="") {
  $position_num = mysql_num_rows($position_result);
  $k = 0;
  while ($k < $position_num) {
    $arrId3[$k] = mysql_result($position_result, $k, "item_name");
    $arrName3[$k] = mysql_result($position_result, $k, "item_name");
    $k++;
  }
  }
  
$table_name = $_SESSION['db_prefix']."_list_sellers";
$sellers_query = "SELECT item_name FROM $table_name  ORDER BY item_name ASC";
  $sellers_result = execsql($sellers_query);
  $sellers_num = mysql_num_rows($sellers_result);
  $w = 0;
  $arrId2 = array ();
  $arrName2 = array ();
  while ($w < $sellers_num) {
    $arrId2[$w] = mysql_result($sellers_result, $w, "item_name");
    $arrName2[$w] = mysql_result($sellers_result, $w, "item_name");
    $w++;
  }  
  ?>

<div class="wizard_page_middle_frame">
<form id="feedbackform" method="get"  >
     <div class="wizard_frame">
           <table width="641" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="147" height="40">Quotation date:
              </td>
              <td><?php 
          //instantiate class and set properties
    $myCalendar = new tc_calendar("quotation_date", true);
    $myCalendar->setIcon("../images/iconCalendar.gif");
    $myCalendar->setDate($d, $m, $y);
    $myCalendar->setYearInterval(2010, 2099);
    //output the calendar
    $myCalendar->writeScript();
?></td>
              </tr>
            <tr>
              <td valign="top">Terms:</td>
              <td><input type="radio" name="terms_radio_group" value="In full with order" id="terms_radio_group_0" <?php if ($_SESSION['terms']=='In full with order') {?> checked="checked" <?php } ?>/>
                    In full with order
                  <br />
              <input type="radio" name="terms_radio_group" value="60% deposit with order, balance on completion" id="terms_radio_group_1" <?php if ($_SESSION['terms']=='60% deposit with order, balance on completion') {?> checked="checked" <?php } ?>/>
                    60% deposit with order, balance on completion
                  <br />
                  
                    <input type="radio" name="terms_radio_group" value="COD on collection" id="terms_radio_group_2" <?php if ($_SESSION['terms']=='COD on collection') {?> checked="checked" <?php } ?>/>
                    COD on collection
                  <br />
                  
                    <input type="radio" name="terms_radio_group" value="COD on delivery" id="terms_radio_group_3" <?php if ($_SESSION['terms']=='COD on delivery') {?> checked="checked" <?php } ?>/>
                    COD on delivery
                  </td>
              </tr>
            <tr>
              <td height="37">VAT</td>
              <td> 
              <input type="radio" name="vat_group" value="inclusive" id="vat_group_0" <?php if ($_SESSION['VAT']=='inclusive') {?> checked='checked' <?php } ?>/>
                  Inclusive
                  <input type="radio" name="vat_group" value="exclusive" id="vat_group_1" <?php if ($_SESSION['VAT']=='exclusive') {?> checked='checked' <?php } ?>/>
                  Exclusive</td>
            </tr>
            <tr>
              <td height="37">Prices valid for:</td>
              <td><select name="valid_days_select" id="valid_days_select">
                <option value="5">5</option>
                <option value="7">7</option>
                <option value="10">10</option>
                <option value="14">14</option>
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="90">90</option>
                <option value="<?php echo $_SESSION['valid_days']?>" selected="selected"><?php echo $_SESSION['valid_days']?></option>
              </select> 
                &nbsp;days</td>
              </tr>
            <tr>
              <td>Delivery:</td>
              <td><select name="delivery_days_select" id="delivery_days_select">
                <option value="5">5</option>
                <option value="7">7</option>
                <option value="10">10</option>
                <option value="14">14</option>
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="90">90</option>
                <option value="<?php echo $_SESSION['delivery_days']?>" selected="selected"><?php echo $_SESSION['delivery_days']?></option>
              </select> 
                &nbsp;days</td>
            </tr>
           </table>
          </div>
<br />
<div class="wizard_frame">
  <table width="671" border="0">
    <tr>
      <td width="143">Priority:</td>
      <td>
        <label>
          <input type="radio" name="priority_group" value="Cold" id="priority_group_0" <?php if ($_SESSION['priority']=='Cold') {?> checked=checked <?php } ?> />
          <img src="../images/flame_blue.png" width="16" height="16" />Cold</label>
        
        <label>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="priority_group" value="Warm" id="priority_group_1"<?php if ($_SESSION['priority']=='Warm') {?> checked=checked <?php } ?> />
          <img src="../images/flame_orange.png" width="16" height="16" />Warm</label>
        
        <label>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="priority_group" value="Hot" id="priority_group_2" <?php if ($_SESSION['priority']=='Hot'){ ?> checked=checked <?php } ?> />
          <img src="../images/flame_red.png" width="16" height="16" />Hot</label></td>
      </tr>
</table>
</div>
<div class="wizard_frame">
  <table width="671" border="0">
    <tr>
      <td width="143">Sales representative:</td>
      <td width="193"><select name="seller_select" id="seller_select" class="select300" tabindex="8">
        <option value="<?php echo $_SESSION['seller']?>" selected="selected"><?php echo $_SESSION['seller']?></option>
        <?php 
      for ($w = 0; $w < count($arrId2); $w++) {
    echo "<option value=\"".$arrId2[$w] . "\"" . ">" . $arrName2[$w] . "</option>";  
      }
     ?>
      </select>
       </td>
      <td width="99">&nbsp;</td>
      <td width="218">&nbsp;</td>
    </tr>
</table>
</div>
<div class="wizard_spacer_frame" style="height:10px;"></div>
<div class="wizard_frame">
              <table width="675" height="50" align="center" id="table_button_bar">
                <tr>
                  <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onclick="needToConfirm = false;MM_goToURL('parent','quoteWizbase.php?s=&p=2');return document.MM_returnValue; MM_showHideLayers('wait','','show');" tabindex="3"/></td>
                  <td width="115">&nbsp;</td>
                  <td width="99"><span class="wizard">
                    <input name="s" type="hidden" id="s" value="3" />
                    <input name="p" type="hidden" id="p" value="3" />
                  </span></td>
                  <td width="125" align="right"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onclick="needToConfirm = false; cancel_confirmation(1, '../sales/sales_main.php?date='); " value="Cancel" tabindex="4"/></td>
                  <td width="110" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onclick="needToConfirm = false; MM_showHideLayers('wait','','show'); " tabindex="2"/></td>
                </tr>
              </table>
              </div>
  </form>
  </div>
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("feedbackform");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("terms_radio_group","selone","- terms of payment.");
  frmvalidator.addValidation("vat_group","selone","- VAT status.");
  frmvalidator.addValidation("valid_days_select","req","- validity period.");
  frmvalidator.addValidation("delivery_days_select","req","- delivery period.");
  frmvalidator.addValidation("priority_group","selone","- select priority.");
      
</script>


</body>
