<?
session_start();
if($status!="on")  header("Location:./login.php");
$t = strtotime("$date $time");
$h=date('H', $t);
$m=date('i', $t);
?>

<!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=windows-874" />
<title>Add</title>
</head>
<script type="text/javascript" src="calendarDateInput.js">

/***********************************************
* Jason's Date Input Calendar- By Jason Moon http://calendar.moonscript.com/dateinput.cfm
* Script featured on and available at http://www.dynamicdrive.com
* Keep this notice intact for use.
***********************************************/
</script>
<body>
<table border="0" cellpadding="0" cellspacing="5" bgcolor="#FF9900">
  <tr>
    <td bgcolor="#FF9900">Username : <?php echo $uid ?> </td>
    <td bgcolor="#FFCC00"><a href="form2.php">Main</a></td>
    <td>&nbsp;</td>
    <td bgcolor="#FFCCCC"><a href="logout.php">Logout</a></td>
  </tr>
</table>
<br />
<form action="ac_edit.php" method="get">
  <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td width="33%" align="right">      วันที่</td>
      <td width="67%"><script>DateInput('date', true, 'YYYY-MM-DD','<?php echo $date ?>')</script></td>
    </tr>
    <tr>
      <td align="right">
	  เวลา
      <input name="id" type="hidden" id="id" value="<?php echo $id ?>" /></td>
      <td><select name="h1" id="h1">
          <?php 
	     for($i=0;$i<24;$i++)
		 {
		       if($h==$i) $t1="selected=\"selected\""; else  $t1="";
		      $ii=sprintf("%02d",$i);
		      echo "<option value=$ii $t1>$ii</option>";
		 }
	  ?>
        </select>
        นาฬิกา
  <select name="m1" id="m1">
    <?php 
	     for($i=0;$i<60;$i++)
		 {
		       if($m==$i) $t1="selected=\"selected\""; else  $t1="";
		      $ii=sprintf("%02d",$i);
		      echo "<option value=$ii $t1>$ii</option>";
		 }
	  ?>
</select></td>
    </tr>
    <tr>
      <td align="right">ทองคำแท่ง 
        96.5%รับซื้อบาทละ</td>
      <td><label>
        <input name="b96bb" type="text" id="b96bb" value="<?php echo $b96bb ?>" />
      </label></td>
    </tr>
    <tr>
      <td align="right">ทองคำแท่ง 
        96.5%
      ขายบาทละ</td>
      <td><input name="b96sb" type="text" id="b96sb" value="<?php echo $b96sb ?>" /></td>
    </tr>
    <tr>
      <td align="right">ทองรูปพรรณ 
        96.5%
      รับซื้อกรัมละ </td>
      <td><input name="o96bg" type="text" id="o96bg" value="<?php echo $o96bg ?>" /></td>
    </tr>
    <tr>
      <td align="right">ทองรูปพรรณ 
        96.5%
      รับซื้อบาทละ </td>
      <td><input name="o96bb" type="text" id="o96bb" value="<?php echo $o96bb ?>" /></td>
    </tr>
    <tr>
      <td align="right">ทองรูปพรรณ 
        96.5%
      ขายบาทละ</td>
      <td><input name="o96sb" type="text" id="o96sb" value="<?php echo $o96sb ?>" /></td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" />
        <label>
        <input type="reset" name="Submit2" value="Reset" />
      </label></td>
    </tr>
  </table>
</form>
</body>
</html>
