<? include('config.php'); $id_mis=$_REQUEST['id_mis'];?> <table width="574" border="0" align="center"> <tr align="center"> <td><? echo" <a href=selectmis.php?id_mis=$id_mis ><img src=pic/go-back-icon.png ></a>"; ?></td> </tr> <tr align="center"> <td><span class="style25">เพิ่มอุปกรณ์<span class="style35"><span class="style33"> <span class="style41"><span class="style79"><span class="style13"><span class="style59"> </span></span></span></span></span></span></span></td> </tr> <tr align="center"> <td><span class="style41"><span class="style25"><span class="style7"><span class="style14"><span class="style13"><span class="style59">ชื่อสถานศึกษา <? $strSQL4 = ("SELECT * from mis a INNER JOIN school b ON (a.id_school = b.id_school) where id_mis=$id_mis " ); if(empty($_REQUEST['id_mis'])) die("ไม่ได้ระบุ เรคอร์ด"); { $id_mis=$_REQUEST['id_mis']; } $objQuery4 = mysql_query($strSQL4) or die ("Error Query [".$strSQL4."]"); $objResult4 = mysql_fetch_array($objQuery4); echo $objResult4["name"]; ?> </span></span></span></span></span></span></td> </tr> <tr align="center"> <td width="568"><form action="<?=$_SERVER['SCRIPT_NAME'];?>" method="post" name="frmSearch" > <table width="483" border="0"> <tr align="left"> <td width="172" align="right"><span class="style8"><strong><span class="style49">ค้นหาอุปกรณ์</span> : </strong></span></td> <td width="161"><span class="style9"> <input name="name2" type="text" id="name22" value="" size="20" /> </span></td> <td width="136"><span class="style9"><span class="style37"> <input name="submit2" type="submit" value="ค้นหา" /> <span class="style36"><span class="style7"> <? $name2 = $_POST['name2']; if($name2 != "") { $strSQL2 = "SELECT * FROM tool a INNER JOIN addtool b ON (a.id_tool = b.id_tool) where name like '%$name2%' AND id_mis=$id_mis"; if(empty($_REQUEST['id_mis'])) die("ไม่ได้ระบุ เรคอร์ด"); { $id_mis=$_REQUEST['id_mis']; } $objQuery2 = mysql_query($strSQL2) or die ("Error Query [".$strSQL2."]"); $a=1; ?> </span></span> </span></span></td> </tr> <tr align="center"> <td colspan="3"><table width="377" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr bgcolor="#333333"> <td width="45" align="center"><span class="style25 style78 style59 style80"><span class="style25 style78 style59 style82"><strong>ลำดับ</strong></span></span></td> <td width="260" align="center"><span class="style25 style78 style59 style80"><span class="style25 style78 style59 style82"><strong>อุปกรณ์</strong></span></span></td> <td width="58"><span class="style82"></span></td> </tr> <? while($objResult2 = mysql_fetch_array($objQuery2)) { ?> <tr> <td align="center"><span class="style2 style36 style3 style49"> <?=$a;?> </span></td> <td align="left"><span class="style37"><span class="style36"> <?=$objResult2["name"];?> </span></span></td> <td align="center" class="style10"><span class="style36"><span class="style81"><span class="style83 style3 style49"> <? $id_tool=$objResult2["id_tool"]; echo"<a onclick=\"javascript:document.getElementById('name').value='$objResult2[name]';javascript:document.getElementById('id_tool').value='$objResult2[id_tool]'; javascript:document.getElementById('buy').value='$objResult2[buy]';javascript:document.getElementById('sell1').value='$objResult2[sell]';\">เลือก</a>"; ?> </span></span></span></td> </tr> <? $a++; }?> </table> <? }?> </td> </tr> </table> </form></td> </tr> <tr align="center"> <td align="center" valign="top"> <form name="form1" method="post" action="saveaddmis2.php" > <table width="484" border="0" align="center"> <tr align="left"> <td class="style41"><span class="style79"><span class="style13"><span class="style81"><span class="style59">รหัส : </span></span></span></span></td> <td><span class="style41"><span class="style79"><span class="style13"><span class="style59"><span class="style81"> <input name="id_mis" type="text" class="dpDayTD" id="id_mis3" value="<?=$objResult4["id_mis"];?>" size="5" readonly="readonly" /> </span></span></span></span></span></td> </tr> <tr align="left"> <td class="style41"> <span class="style79"><span class="style13"><span class="style59">รหัสอุปกรณ์ : <span class="style81"> </span></span></span></span></td> <td width="323"><span class="style13"><span class="style4"><span class="style59"><span class="style46 style8"> <input name="id_tool" type="text" id="id_tool" value="<?=$objResult2["id_tool"];?>" size="5" readonly="readonly" class="dpDayTD"/> <span class="style5">*</span> </span></span></span> </span></td> </tr> <tr> <td align="left"><span class="style49">ชื่ออุปกรณ์ : </span></td> <td><span class="style4"> <span class="style59"><span class="style46 style8"> <input name="name" type="text" id="name" value="<?=$objResult2["name"];?>" size="30" readonly="readonly" class="dpDayTD"/> </span></span> <span class="style5">*</span> </span></td> </tr> <tr> <td align="left"><span class="style49">ราคาซื้อ : </span></td> <td><span class="style4"> <span class="style59"><span class="style46 style8"> <input name="buy" type="text" id="buy" value="<?=$objResult2["buy"];?>" size="5" readonly="readonly" class="dpDayTD"/> </span></span> <span class="style5">*</span> <span class="style49">บาท</span> </span></td> </tr> <tr> <td align="left"><span class="style59">ราคาขายมาตรฐาน : </span></td> <td><span class="style4"><span class="style59"><span class="style46 style8"> <input name="sell1" type="text" id="sell1" value="<?=$objResult2["sell"];?>" size="5" readonly="readonly" class="dpDayTD"/> <span class="style5">*</span> บาท </span></span></span></td> </tr> <tr> <td align="left"><span class="style59">ราคาขายจริง : </span></td> <td><span class="style4"><span class="style59"><span class="style46 style8"> <input name="sell" type="text" id="sell" size="5" /> <span class="style5">*</span> บาท </span></span></span></td> </tr> <tr> <td align="left"> </td> <td><span class="style4"><span class="style59"><span class="style46 style8"> <input name="vat" type="radio" value="7" checked="checked" /> รวม vat <input name="vat" type="radio" value="100" /> ไม่รวม vat</span></span></span></td> </tr> <tr> <td width="102" align="left"><span class="style59">จำนวน :</span></td> <td><span class="style4"> <input name="quantity" type="text" id="quantity" size="5" /> <span class="style5">*</span> </span></td> </tr> <tr> <td colspan="2" align="center"><span class="style13"><span class="style12"> <input name="submit" type="submit" id="submit" value="บันทึก" /> </span></span></td> </tr> </table> </form></td> </tr> <tr align="center"> <td> </td> </tr> </table>
Quote:<form action="<?=$_SERVER['SCRIPT_NAME'];?>" method="post" name="frmSearch" >
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง