<!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" />
  
<link rel="stylesheet" type="text/css" href="popup.css" />
<script language="JavaScript" src="gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<?php

//include('../include/db.php');
include('../include/session.php');	
include('../include/formValidations.php');
require_once('../include/tc_calendar_2.php');

$quote_no = $_GET['quote_no'];
$field =$_GET['field'];

$table_name = $_SESSION['db_prefix']."_quotations";
$quote_query = "SELECT $field FROM $table_name WHERE quote_no ='".$quote_no."' ";
$quote_result = mySQL_query($quote_query);
$value = mysql_result($quote_result, 0, "$field");

$date = date("Y-m-d");

$d = date("d", strtotime($date) );
$m = date("m", strtotime($date) );
$y = date("Y", strtotime($date) );

?>
<script type="text/javascript">
function stopRKey(evt) {
  var evt = (evt) ? evt : ((event) ? event : null);
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}
document.onkeypress = stopRKey;
</script> 

<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>

<script language="javascript" src="../jscript/calendar.js"></script>

 
<link href="../css/popup.css" rel="stylesheet" type="text/css" />
</head>



<body >

<form action="../sales/quotation_update_status.php" method="get" name="form1" target="_top" id="form1">

<table>
  <tr>
    <td width="350" align="center">
      <label class="label_std">Select date when finalised and click set &quot;Set&quot;.<br />
If you don't want to set, click "Cancel"</label>
      <br />
      <?php 
				  //instantiate class and set properties
		$myCalendar = new tc_calendar("editText", true);
		//$myCalendar->setIcon("../images/iconCalendar.gif");
		$myCalendar->setDate($d, $m, $y);
		$myCalendar->setYearInterval(2012, 2020);
		//output the calendar
		$myCalendar->writeScript();
?>
      <input name="edit" type="hidden" id="edit" value="3"  />
    <input name="quote_id" type="hidden" id="quote_no" value="<?php echo $quote_no ?>" />
    <input name="field" type="hidden" id="field" value="<?php echo $field ?>" />
    </td>
  </tr>
  <tr>
    <td height="26" align="center">
      <label class="label_std">
        <input type="radio" name="status_group" value="Success" id="status_group_0" />
        Success</label>
      
      <label class="label_std">
        <input type="radio" name="status_group" value="Failed" id="status_group_1" />
        Failed</label>
      <br />
    </td>
  </tr>
  <tr>
    <td  align="center">
      <input name="input" type="submit" value="Set" class="imagebutton"  />
      <input name="button" type="button" class="imagebutton" id="button" onclick="MM_goToURL('parent','../sales/quotation_update_status.php?quote_no=<?php echo $quote_no ?>&edit=0');return document.MM_returnValue"  value="Cancel" /></form>
    </td>
  </tr>
  
  </table>
  </form>
</body>
</html>