<?php $sql="SELECT * FROM hr_games WHERE category ='5' "; $result=mysql_query($sql); $num_rows=mysql_num_rows($result);[ ?>
<?php </td> </tr> <tr> <td valign="top"><?php $sql=mysql_query("SELECT * FROM hr_games where category='$category' "); $num_rows=mysql_num_rows($sql); $pagelen = 6 ; if(empty($page)) {$page=1;} $totalpage =ceil($num_rows/$pagelen); $goto = ($page-1) * $pagelen; // Retrieve data from database $sql="SELECT * FROM hr_games where category='$category' order by id DESC LIMIT $goto,$totalpage "; $result=mysql_query($sql); echo"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign=\"top\" ><tr>"; $intRows = 0; while($rows = mysql_fetch_array($result)) { $intRows++; echo "<td valign=\"top\" >"; ?> <table width="120" height="90" border="0" cellpadding="0" cellspacing="0" class="choosegame"> <tr> <td valign="top"><div align="center"> <?php $pic_game=$rows[pic_game]; echo "<img src='../img_game/$pic_game' width='100' height='80' border='0' /></img>" ?> </div></td> </tr> <tr> <td valign="top"><div align="center" class="name_game"> <?php $name_game=$rows[name_game]; $id=$rows[id]; echo"<a href='play-games.php?category=$category&id=$id' target='_blank'>$name_game </a>" ;?> </strong></div></td> </tr> <tr> <td valign="top"><div class="details_game_show"> <div align="center"> <?php $details_game=$rows[details_game]; echo "$details_game" ?> </div> </div></td> </tr> <tr> <td align="center" valign="top"><?php $click_game=$rows[click_game]; echo "[$click_game]" ?></td> </tr> </table> <? echo"</td>"; if(($intRows)%6==0) { echo"</tr>"; } else { echo "<td>"; } } echo"</tr></table>"; ?></td> </tr> <tr> <td><table width="400" border="0" align="right" cellpadding="0" cellspacing="0" class="gamemenu"> <tr> <td>Total <?php if($page >1){ echo " <a href='?category=$category&page=",$page-1,"'>Previous</a> |"; } for($i=1;$i<=$totalpage;$i++){ if($page==$i){ echo" <b>".$i."</b> |"; }else{ echo " <a href='?category=$category&page=$i'>$i</a> |"; } } if($page < $totalpage){ $next=$page +1 ; echo" <a href='?category=$category&page=",$next,"'>Next</a>"; } ?></td> </tr> </table></td> ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง