<? include "chksession.php"; $regin = $_GET[regin]; $office = $_GET[office]; $info = $_GET[info]; $datebookstart = $_GET[datebookstart]; $selectedit = $_GET[selectedit]; if($selectedit == 1) { $chk1 = " checked "; } else if($selectedit == 2) { $chk2 = " checked "; } else if($selectedit == 3) { $chk3 = " checked "; } else if($selectedit == 4) { $chk4 = " checked "; } if($regin != "") { $where .= " and regin like '%$regin%' "; } if($office != "") { $where .= " and `office` like '%$office%' "; } if($info != "") { $where .= " and info like '%$info%' "; } if($datebookstart != "") { $where .= " and datein like '%$datebookstart%' "; } ?> <SCRIPT LANGUAGE="JavaScript"> <!-- function del_other(id) { if(id == 0) { //search.regin.value = ""; search.office.value = ""; search.info.value = ""; search.datebookstart.value=""; } else if(id == 1) { search.regin.value = ""; //search.office.value = ""; search.info.value = ""; search.datebookstart.value=""; } else if(id == 2) { search.regin.value = ""; search.office.value = ""; //search.info.value = ""; search.datebookstart.value=""; } else if(id == 3) { search.regin.value = ""; search.office.value = ""; search.info.value = ""; //search.datebookstart.value=""; } } //--> </SCRIPT> <FORM METHOD="GET" ACTION="" name="search"> <div align="center"> <INPUT TYPE="hidden" NAME="detail" value="<? echo $_GET[detail]; ?>"> <table width="1067"> <tr> <th width="845" scope="col"><table width="500" border="0" align="center"> <tr bgcolor="#BDDCEC" class="unnamed1"> <td height="40" colspan="5" bgcolor="#FFCCFF"><div align="center"><b>ระบุเงื่อนไขการค้นหาหนังสือเข้า</b></div></td> </tr> <tr class="unnamed1"> <td width="63" height="40"><div align="right"> <input name="selectedit" type="radio" value="1" <? echo $chk1; ?> onfocus="selectedit(0).checked=true;del_other(0);" /> </div></td> <td width="140" height="40">เลขที่หนังสือ</td> <td height="40" colspan="2">===></td> <td width="242" height="40"><input name="regin" id="regin" type="text" onfocus="selectedit(0).checked=true;del_other(0);" size="20" value="<? echo $regin; ?>" /></td> </tr> <tr class="unnamed1"> <td height="40"><div align="right"> <input name="selectedit" type="radio" value="2" <? echo $chk2; ?> onfocus="selectedit(1).checked=true;del_other(1);" /> </div></td> <td height="40">หนังสือถึงหน่วยงาน</td> <td height="40" colspan="2">===></td> <td height="40"><input name="office" type="text" id="office" size="20" onfocus="selectedit(1).checked=true;del_other(1);" value="<? echo $office; ?>" /></td> </tr> <tr class="unnamed1"> <td height="40"><div align="right"> <input name="selectedit" type="radio" value="3" <? echo $chk3; ?> onfocus="selectedit(2).checked=true;del_other(2);" /> </div></td> <td height="40">เรื่องของหนังสือ</td> <td height="40" colspan="2">===></td> <td height="40"><input name="info" type="text" id="info" size="20" onfocus="selectedit(2).checked=true;del_other(2);" value="<? echo $info; ?>" /></td> </tr> <tr class="unnamed1"> <td height="40"><div align="right"> <input name="selectedit" type="radio" value="4" <? echo $chk4; ?> onfocus="selectedit(3).checked=true;del_other(3);" /> </div></td> <td height="40">วันที่ของหนังสือ</td> <td height="40" colspan="2">===></td> <td height="40"><input name="datebookstart" type="text" id="datebookstart" onfocus='selectedit(3).checked=true;del_other(3);' value="<? echo $datebookstart; ?>" size="8" /> <input type="button" name="Submit" value="เลือกวัน" onclick="showCalendar('datebookstart','YYYY/MM/DD'); selectedit(3).checked=true;del_other(3);" /></td> </tr> </table></th> </div> </form> <hr> <table border=1 cellpadding=0 cellspacing=0 width="99%"> <td width="102" height="35" bgcolor="#FEC3F3"><div align="center"> <div align="center"><strong>เลขทะเบียนรับ</strong></div> </div></td> <td width="100" height="35" bgcolor="#FEC3F3"><div align="center"> <div align="center"><strong>เลขที่หนังสือ</strong></div> </div></td> <td width="50" height="35" bgcolor="#FEC3F3"><div align="center"><strong>ลงวันที่</strong></div></td> <td width="139" height="35" bgcolor="#FEC3F3"><div align="center"><strong>จาก/ผู้ส่ง</strong></div></td> <td width="122" height="35" bgcolor="#FEC3F3"><div align="center"><strong>ถึง/ผู้รับ</strong></div></td> <td width="161" height="35" bgcolor="#FEC3F3"><div align="center"><strong>เรื่อง</strong></div></td> <td width="40" height="35" bgcolor="#FEC3F3"><div align="center"><strong>แก้ไข</strong></div></td> <td width="37" height="35" bgcolor="#FEC3F3"><div align="center"><strong>ลบ</strong></div></td> </tr> <? include "connect.php"; $sql="select * from regin where id != '' $where order by regin ASC"; //echo $sql; $result=mysql_query($sql); while($record=mysql_fetch_array($result)) { $id = $record[id]; $regin = $record[regin]; $reginno = $record[reginno]; $datein = $record[datein]; $from = $record[from]; $office = $record[office]; $info = $record[info]; $note = $record[note]; if($reginno != "") { $regin = "<a href='regin/$regin' target='_blank'>$regin</a>"; } else { $regin = $reginno; } $sql2="select * from member where id = '$office' "; $result2=mysql_query($sql2); $r2=mysql_fetch_array($result2); mysql_free_result($result2); $to_of = $r2[office]; echo " <tr > <td><div align='center' height='30'>$regin</div></td> <td><div align='center'height='30'>$reginno</div></td> <td><div align='center'height='30'>$datein</div></td> <td><div align='center'height='30'>$from</div></td> <td><div align='center'height='30'>$office </div></td><td><div align='center'height='30'>$info</div></td> <td><div align='center'height='25'><a href=\"regin_edit.php?id_edit=$id\"><img border='0' src='im/แก้ไข.gif' width='35' height='30' onclick=\"return confirm('ยืนยันการแก้ไขข้อมูลหนังสือเข้าค่ะ')\"></a></div></td> <td><div align='center'><a href=\"regin_delete.php?id_del=$id\" onclick=\"return confirm('ยืนยันการลบข้อมูลหนังสือเข้าค่ะ ')\"><img border='0' src='im/ลบ.gif' width='35' height='30'></div></a></td> </tr> "; } ?> </table> <p> </p>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง