<link href="wstyle.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<div align="center">
<? if ($_GET['stat'] == '' ) {
	$query = mysql_query("select * from p1_date"); 	
	if (mysql_num_rows($query) == "0")
				{
					$last_date = '';
				}else{
					$query = mysql_query("select * from p1_date order by did desc"); 
					$last_date = mysql_result($query,0,"date_name");
					
				}


 ?>
  <form id="form1" name="form1" method="post" action="index.php?page=10&stat=add">
    <table width="60%" border="0">
      <tr>
        <td class="td1">Last date add</td>
        <td class="td2"><? echo $last_date ?></td>
      </tr>
      <tr>
        <td class="td1">Date</td>
        <td class="td2"><span id="sprytextfield1">
        <input type="text" name="date_name" id="date_name" />
        <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td class="td1">Date Type</td>
        <td class="td2"><span id="spryselect1">
          <select name="select" class="select_box" id="select">
            <option>Select Type</option>
            <option value="1">Full Date</option>
            <option value="2">Half Date</option>
          </select>
        <span class="selectRequiredMsg">Please select an item.</span></span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><div align="center">
          <input name="Submit" type="submit" class="Submit" id="Submit" value="   add   " />
        </div></td>
      </tr>
    </table>
    <p>&nbsp;</p>
  </form>
<? } if ($_GET['stat'] == 'add1' ) { 
?>
  <p class="td3">Date Added</p>
<? } if ($_GET['stat'] == 'not_add' ) { 
?>
  <p class="td4">Date is not Added</p>
  <? } ?>
  <p>&nbsp;</p>
</div>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"yyyy-mm-dd", useCharacterMasking:true});
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
//-->
</script>
