ob_start(); include "conn.php"; if (empty($_GET['id'])) { $id="1"; } else { $id=$_GET['id'];} $sql_amount="select count(*) from subcate where cate_id=".$id.""; $result_amount=mysql_query($sql_amount); $rs_amount=mysql_fetch_array($result_amount); $total_amount=$rs_amount[0]; //echo $total_amount; $pagesize=9; $page_amount=ceil($total_amount/$pagesize); if (empty($_GET['page'])) { $page=1; } else { $page=$_GET['page']; if ($page<1) { $page=1;} if ($page>$page_amount) { $page=$page_amount;} } //echo $page; echo $page_amount; $sql_cate="select * from cate where id=".$id.""; $result_cate=mysql_query($sql_cate); $rs_cate=mysql_fetch_array($result_cate); $cate=$rs_cate['cate']; ?>
| include "top.php";?> | ||||||||||||||
|
||||||||||||||
| include "foot.php";?> | ||||||||||||||