<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//-->
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="edit_ac.php">
  <table cellspacing="0" cellpadding="0" width="800" align="center" border="0">
    <tbody>
      <tr>
        <td></td>
      </tr>
      <tr>
        <td><table cellspacing="0" cellpadding="0" width="800" align="center" border="0">
          <tbody>
            <tr>
              <td></td>
            </tr>
            <tr>
              <td>
<?php 
	$filename="test.txt";
		if(file_exists($filename)) 
	   {	// ??????????????????
		    $dat01 = file($filename);
 	        $split = explode("|X|",$dat01[0]);
		 }	
?>			  
			  <strong>
                <label>วันที่
               <input name="date" type="text" value="<?php echo  date("d/m/Y H:i ") ; ?>">
                </label>
              </strong> </td>
            </tr>
          </tbody>
        </table></td>
      </tr>
      <tr>
        <td><table cellspacing="1" cellpadding="2" width="100%" border="0">
            <tbody>
              <tr bgcolor="#ffd5d5">
                <td align="middle" width="33%"><STRONG>ชนิดทอง</STRONG></td>
                <td align="middle" width="33%"><STRONG>ราคารับซื้อ กรัมละ </STRONG></td>
                <td align="middle" width="33%"><STRONG>ราคารับซื้อ บาทละ </STRONG></td>
                <td align="middle" width="33%"><STRONG>ราคาขาย บาทละ</STRONG></td>
              </tr>
              <tr>
                <td valign="top" align="middle" width="33%" bgcolor="#ffffec"><strong>ทองคำแท่ง 96.5%</strong></td>
                <td valign="top" align="middle" width="33%" bgcolor="#ffffec">&nbsp;</td>
                <td valign="top" align="middle" width="33%" bgcolor="#ffffec"><label>
                  <input type="text" name="txt01" value="<?php echo $split[1]  ?>" >
                </label></td>
                <td valign="top" align="middle" width="33%" bgcolor="#ffffec"><input type="text" name="txt012"  value="<?php echo $split[2]  ?>" ></td>
              </tr>
              <tr>
                <td valign="top" align="middle" width="33%" bgcolor="#fff5ec"><strong>ทองรูปพรรณ 96.5%</strong></td>
                <td valign="top" align="middle" width="33%" bgcolor="#fff5ec"><input type="text" name="txt013"  value="<?php echo $split[3]  ?>" ></td>
                <td valign="top" align="middle" width="33%" bgcolor="#fff5ec"><strong>
                  <input type="text" name="txt014"  value="<?php echo $split[4]  ?>" >
                </strong></td>
                <td valign="top" align="middle" width="33%" bgcolor="#fff5ec"><input type="text" name="txt015"  value="<?php echo $split[5]  ?>" ></td>
              </tr>
            </tbody>
        </table></td>
      </tr>
      <tr>
        <td><strong>ผลต่างของราคาเมื่อเที่ยบกับเมื่อวาน 
          <input type="text" name="txt016"  value="<?php echo $split[6]  ?>" >
        </strong></td>
      </tr>

      <tr>
        <td><font color="#000000">
          <label>Password
          <input type="password" name="passw">
          </label>
          <br>
            <label>
            <input type="submit" name="Submit" value="Submit">
            </label>
            <label>
            <input type="reset" name="Submit2" value="Reset">
            </label>
        </font></td>
      </tr>
    </tbody>
  </table>
</form>
</body>
</html>
