<!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 );

$total_amount = $_SESSION['quote_price_1'] + $_SESSION['quote_price_2'] + $_SESSION['quote_price_3'];

$table_name = $_SESSION['db_prefix']."_list_designers";
$suppliersQuery = "SELECT item_name FROM $table_name  ORDER BY item_name ASC";
	$suppliersResult = execsql($suppliersQuery);
	$suppliersNum = mysql_num_rows($suppliersResult);
	$w = 0;
	$arrId2 = array ();
	$arrName2 = array ();
	while ($w < $suppliersNum) {
		$arrId2[$w] = mysql_result($suppliersResult, $w, "item_name");
		$arrName2[$w] = mysql_result($suppliersResult, $w, "item_name");
		$w++;
	}
	
$table_name = $_SESSION['db_prefix']."_list_sellers";
    $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++;
	}
	}

?>

<!--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');">


<div class="page_middle_frame">
<form id="feedbackform" method="get"  >
<table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
        <td width="525" height="247" valign="top" >
        <div class="wizard_frame">
           <table width="633" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="116"><label class="label_std">Quotation date:</label>
              </td>
              <td colspan="2"><?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(2014, 2090);
		//output the calendar
		$myCalendar->writeScript();
?></td>
              <td width="78">&nbsp;</td>
              <td width="154">&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td colspan="2">&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2"><label class="label_std">Quote total amount:&nbsp;&nbsp;&nbsp;P</label>
              &nbsp;&nbsp;</td>
              <td width="252"><label class="label_std"><?php echo number_format($total_amount, 2, '.', ',') ?></label></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
          </div>
       



<br />

<div class="wizard_frame">
  <table width="671" border="0">
    <tr>
      <td width="126"><label class="label_std">Designed by: &nbsp;&nbsp;</label>
        <label class="star">*</label></td>
      <td width="210"><select name="designer_select" id="designer_select" class="select160" autofocus tabindex="1">
        <option value="<?php echo $_SESSION['designer']?>" selected="selected"><?php echo $_SESSION['designer']?></option>
        <?php 
    	for ($w = 0; $w < count($arrId2); $w++) {
		echo "<option value=\"".$arrId2[$w] . "\"" . ">" . $arrName2[$w] . "</option>";	
	    }
     ?>
      </select></td>
      <td width="99"><label class="label_std">Sales person:</label></td>
      <td width="218"><label class="label_std"><select name="seller_select" id="seller_select" class="select160" tabindex="6">
                        <option value="<?php echo $_SESSION['seller']?>" selected><?php echo $_SESSION['seller']?></option>
                        <?php 
    	for ($w = 0; $w < count($arrId3); $w++) {
		echo "<option value=\"".$arrId3[$w] . "\"" . ">" . $arrName3[$w] . "</option>";	
	    }
     ?>
                      </select></label></td>
    </tr>
</table>
</div>
</td>
    </tr>
          <tr>
            <td>
              <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'); " 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></td>
          </tr>
        
  </table>
  </form>
  </div>
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("feedbackform");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("designer_select","req","Please select the name of the designer.");
      
</script>


</body>
