<?php
include("../../../include/FunctionDB.php");
include(
"../../../include/Function.php");
ConnectDB();
  
$sql ="SELECT * FROM personal_tb WHERE Username='$Username'";
  
$result mysql_query($sql) or die("Cannot Select").mysql_error();
  
$rs mysql_fetch_array($result);
   
$rs[Research_code] = mysql_insert_id();
?>

<html>
<head>
<title>Form insert accessories</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" href="../../css/cart4.css" type="text/css">
<link href="../../../css/style1.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td> <table width="100%" border="0" cellpadding="0" cellspacing="1">
        <tr > 
          <td width="25%" background="../../../Image/barm.jpg" class="table"> 
            <div align="center"><strong><font size="2" face="Tahoma"><a href="../../menu_support.php" class="d">กลับหน้าหลัก</a></font></strong></div></td>
          <td width="25%" background="../../../Image/barm.jpg" class="table"> 
            <div align="center"><strong><font size="2" face="Tahoma"><a href="../EditAccList.php?Teacher_code=<? echo  $rs[Teacher_code?>" class="d">แก้ไข</a></font></strong></div></td>
          <td width="25%" background="../../../Image/barm.jpg" class="table"> 
            <div align="center"><strong><font size="2" face="Tahoma"><a href="AccTypeList.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d">แสดง</a></font></strong></div></td>
          <td width="25%" background="../../../Image/barm.jpg" class="table"> 
            <div align="center"><strong><font size="2" face="Tahoma"><a href="../../../logout.php" class="d">Logout</a></font></strong></div></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" style="border:1px solid gray">
  <tr bgcolor="#E8E8FF" > 
    <td height="25" colspan="3"> <div align="center"><font color="#000000" size="4" face="Tahoma"><strong>เพิ่มข้อมูลชนิดรายการครุภัณฑ์</strong></font></div></td>
  </tr>
  <form name="form1" method="POST" action="InsertAccType.php">
    <tr bgcolor="#FFFFFF"> 
      <td width="26%" bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">ชื่อชนิดครุภัณฑ์</font></div></td>
      <td width="2%" bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td>
      <td width="72%" bgcolor="#EEEEEE"> <input name="Acc_type" type="text" id="Acc_type" size="50"></td>
    </tr>
    <tr bgcolor="#EEEEEE"> 
      <td height="22" bgcolor="#EEEEEE"> <div align="center"><font size="2" face="Tahoma">ชื่อชนิดครุภัณฑ์</font> 
          <font size="2" face="Tahoma">(English) </font></div></td>
      <td><div align="center"><font color="#FF0000" size="4" face="Tahoma"></font></div></td>
      <td bgcolor="#EEEEEE"> <input name="Acc_Etype" type="text" class="input" id="Acc_Etype" size="50"> 
      </td>
    </tr>
    <tr bgcolor="#E8E8FF" > 
      <td height="25" colspan="3"> <div align="center"> 
          <input type="hidden" name="Teacher_code" value="<? echo $rs[Teacher_code]?>">
          <input type="submit" name="Submit" value=" บันทึก " class="button">
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          <input type="reset" name="Submit2" value="เริ่มใหม่" class="button">
        </div></td>
    </tr>
  </form>
</table>
</body>
</html>