<meta http-equiv=Content-Type content="text/html; charset=tis-620"> <title>ระบบจัดการเว็บไซต์</title> <style type="text/css"> body,td,th { font-size: 14px; color: #36F; } </style> <script language="JavaScript"><!-- function goThere(form){ var linkList=form.selectThis.selectedIndex if(!linkList==""){window.location.href=form.selectThis.options[linkList].value;} } //--></script> <link href="main.css" rel="stylesheet" type="text/css"> <td colspan="3" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50"> </td> <td><img src="images/icon/logo1.jpg" width="250" height="80" /></td> <td width="50"> </td> </tr> <tr> <td> </td> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><fieldset> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td width="100" align="center" valign="top"><a href="book_all.php"><img src="images/icon/home (1).png" alt="" width="30" height="30" border="0" /></a></td> <td width="100" align="center" valign="top"><a href="bookform.php"><img src="images/icon/l_book.jpg" alt="" width="30" height="30" border="0" /></a></td> <td width="100" align="center" valign="top"><a href="change_passwd.php"><img src="images/icon/l_admin.jpg" alt="" width="30" height="30" border="0" /></a></td> <td width="100" align="center" valign="top"> </td> <td align="center" valign="middle"> </td> <td align="center" valign="middle"> </td> <td width="100" align="center" valign="middle"><a href="index.php"><img src="images/delete-icon.png" width="30" height="30" /></a></td> <td width="10"> </td> </tr> <tr> <td> </td> <td align="center" valign="bottom"><a href="book_all.php">หน้าแรก</a></td> <td align="center" valign="bottom"><a href="bookform.php">เพิ่มหนังสือ</a></td> <td align="center" valign="bottom"><a href="change_passwd.php">ผู้ดูแลระบบ</a></td> <td align="center" valign="bottom"> </td> <td align="center" valign="middle"> </td> <td align="center" valign="middle"> </td> <td align="center" valign="middle"><a href="index.php">ออกจากระบบ</a></td> <td> </td> </tr> </table> </fieldset></td> </tr> <tr> <td> </td> </tr> <tr> <td><fieldset> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50"> </td> <td align="center" valign="bottom"><form id="form1" name="form1" method="post" action="<?=$_SERVER['SCRIPT_NAME'];?>"> <p><img src="images/icon/l_search.jpg" alt="" width="32" height="30" /> <label for="txtKeyword"></label> <label for="select"></label> <select name="frmSearch" method="post" action="<?=$_SERVER['Name'];?>" > <option value="book_name">ชื่้อหนังสือ</option> <option value="book_author">ชื่อผู้แต่ง</option> <option value="book_isbn">รหัสหนังสือ</option> </select> <input type="text" name="txtKeyword" id="txtKeyword" value="<?=$_GET["txtKeyword"];?>"/> <input type="submit" name="button" id="button" value="ค้นหา" /> </p> </form> </td> <td width="50"> </td> </tr> </table> <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td><fieldset> <legend><form name="dropMenu"> <select name="selectThis" size="1" onChange="goThere(this.form);"> <option selected value="">เลือกประเภทหนังสือ <option value="book_all.php">ทั้งหมด <option value="book_thai.php">ภาษาไทย <option value="book_eng.php">ภาษาอังกฤษ </select> </form> </legend> <table width="50%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="30"><? include('.../include/config.inc.php'); $strSQL = "SELECT * FROM book where 1" ; $objQuery = mysql_query($strSQL); $Num_Rows = mysql_num_rows($objQuery); if($_POST["ddlSelect"] != "" and $_POST["txtKeyword"] != '') { $strSQL .= " AND (".$_POST["ddlSelect"]." LIKE '%".$_POST["txtKeyword"]."%' ) "; } $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Per_Page = 24; // Per Page $Page = $_GET["Page"]; if(!$_GET["Page"]) { $Page=1; } $Prev_Page = $Page-1; $Next_Page = $Page+1; $Page_Start = (($Per_Page*$Page)-$Per_Page); if($Num_Rows<=$Per_Page) { $Num_Pages =1; } else if(($Num_Rows % $Per_Page)==0) { $Num_Pages =($Num_Rows/$Per_Page) ; } else { $Num_Pages =($Num_Rows/$Per_Page)+1; $Num_Pages = (int)$Num_Pages; } $strSQL .=" order by book_id ASC LIMIT $Page_Start , $Per_Page"; $objQuery = mysql_query($strSQL); echo"<table border=\"0\" cellspacing=\"40\" cellpadding=\"0\"><tr>"; $intRows = 0; while($objResult = mysql_fetch_array($objQuery)) { echo "<td>"; $intRows++; ?></td> <td width="500" align="center"><p><img src="myfile/<?=$objResult["book_fcover"];?>" alt="" width="117" height="160" /> <br /> <?=$objResult["book_name"];?> </p> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100"> </td> <td width="50" align="center"><a href="book_show.php?id=<?php echo $objResult["book_id"]; ?>"><img src="images/book-open-icon.png" width="30" height="30" /></a></td> <td width="50" align="center"><a href="bookedit_form.php?id=<?php echo $objResult["book_id"]; ?>"><img src="images/Edit.jpg" width="30" height="30" /></a></td> <td width="50" align="center"><a style="color:#F00" onclick="return confirm('Delete ID=<?php echo $objResult['book_id']; ?> ?')" href="deletebook.php?id=<?php echo base64_encode($objResult['book_id']); ?>"><img src="images/delete-icon.png" width="30" height="30" /></a></td> <td width="100"> </td> </tr> </table> <p> <? echo"</td>"; if(($intRows)%6==0) { echo"</tr>"; } } echo"</tr></table>"; ?> <br /> Total <?= $Num_Rows;?> Record : <?=$Num_Pages;?> Page : <? if($Prev_Page) { echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< Back</a> "; } for($i=1; $i<=$Num_Pages; $i++){ if($i != $Page) { echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i&txtKeyword=$_GET[txtKeyword]'>$i</a> ]"; } else { echo "<b> $i </b>"; } } if($Page!=$Num_Pages) { echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page&txtKeyword=$_GET[txtKeyword]'>Next>></a> "; } ?> <br /> <br /> </p></td> <td width="30"> </td> </tr> <tr> <td width="30"> </td> <td align="center"> </td> <td width="30"> </td> </tr> </table> </fieldset></td> <td width="10"> </td> </tr> </table> <p> </p> </fieldset></td> </tr> <tr> <td> </td> </tr> </table></td> <td> </td> </tr> </table> <br /></td> </tr> </table>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง