<? include('config.php'); // $user=$_REQUEST['name']; $user=$_SESSION[sess_name]; $sql="select * from users where user_name='$user' "; $result=mysql_query($sql); $data=mysql_fetch_array($result); ?> เข้าสู่ระบบโดย คุณ <? echo $data["user_fname"]; ?> <? echo $data["user_lname"]; ?></p> <? include('config.php'); $dep_id= $data ['dep_id']; $sql2="select * from department inner join booking on (department.dep_id=booking.dep_id) where booking.dep_id='$dep_id' "; $result2=mysql_query($sql2); $data2=mysql_fetch_array($result2); ?> <form id="form1" name="form1" method="post" action="regis_data_book.php"> <div align="center"> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <th scope="col"><p>ข้อมูลการจองห้องประชุม</p> <p> </p></th> </tr> </table> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="600"><div align="center">ค้นหาข้อมูลการจองห้องประชุม: <select name="search" id="search"> <option value="">---ค้นหาข้อมูลโดย---</option> <option value="booking.book_sub">เรื่องที่ประชุม</option> <option value="booking.book_begin">วันที่เริ่มต้นใช้งาน</option> <option value="booking.book_quit">วันที่สิ้นสุดใช้งาน</option> </select> <input type="text" name="keyword" id="keyword" /> <input type="submit" name="button" id="button" value="ค้นหา" /> </div> <label for="keyword"></label> <div align="left"></div></td> </tr> </table> </div> <p> </p> <? include('config.php'); if($_POST[keyword]!=""){ //$field_search = "book_begin"; $sql = "select * from booking where $_POST[search] like '%$_POST[keyword]%' "; $result=mysql_query($sql); echo"<br><center>ผลการค้นหาข้อมูล</center><br>"; $rows=mysql_num_rows($result); if($rows==0) { echo "<center>ไม่พบข้อมูลทีคุณค้นหา</center>"; }else{ echo"<table border=1 align='center' bordercolor='black' width='600' class='content' cellspacing='0'>"; echo"<tr>"; echo"<center>"; echo"<td width='100' align='center'><font size='2'>ประชุมเรื่อง</center></font>"; echo"<td width='100' align='center'><font size='2'>กลุ่มงาน</center></font>"; echo"<td width='100' align='center'><font size='2'>ห้องประชุม</center></font>"; echo"<td width='130' align='center'><font size='2'>วันที่เริ่มต้นใช้งาน</center></font>"; echo"<td width='120' align='center'><font size='2'>วันที่สิ้นสุดใช้งาน</center></font>"; echo"<td width='120' align='center'><font size='2'>ชื่อผู้จอง</center></font>"; echo"<td width='60' align='center'><font size='2'>เพิ่มเติม</center></font>"; echo"<td width='30' align='center'><font size='2'>แก้ไข</center></font>"; echo"<td width='30' align='center'><font size='2'>ลบ</center></font>"; echo"</center>"; echo"</tr>"; while($data=mysql_fetch_array($result)){ $i++; echo "<tr align='center'>"; echo "<td><font size='2'>$data[book_sub]</font></td>"; echo "<td><font size='2'>$data[book_dep]</font></td>"; echo "<td><font size='2'>$data[book_room]</font></td>"; echo "<td><font size='2'>$data[book_begin]</font></td>"; echo "<td><font size='2'>$data[book_quit]</font></td>"; echo "<td><font size='2'>$data[book_name]</font></td>"; echo"<td><A href ='regis_show_data.php?id=$data[book_id]'><img src='images/view_icon.gif' width='30' height='30' border='0' ></A>"; echo"<td><A href ='.php?id=$data[book_id]'> <img src='images/edit.gif' width='30' height='30' border='0' ></A>"; echo"<td><A href ='.php?id=$data[book_id]'> <img src='images/del.gif' width='30' height='30' border='0' ></A>"; echo"</tr>"; } echo "</table>"; echo"<center><br><font size='2'><font color='black'> ค้นพบทั้งหมด $i แถว</font></center><br>"; } } ?> </form>
session_start(); if($_SESSION['UserID'] == "") { echo "Please Login!"; exit(); }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง