<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="contentWrap">
<div class="pageTitle">
<div style="float: left;">
<div class="pageNavigation">欢迎登陆!!!</div>
</div>
<div style="float: right;">
</div>
</div>
<center>
<div class="pageColumn">
<table border="0" cellspacing="0"
cellpadding="4" style="border-collapse: collapse">
<thead>
<tr>
<td colspan="4">留言列表:</td>
</tr>
</thead>
<tbody>
<tr>
<td width="60%" height="23" class="field_l"><strong>反馈标题</strong></td>
<td width="18%" height="23" class="field_l"><strong>反馈时间</strong></td>
<td width="10%" class="field_l"><strong>审核</strong></td>
<td width="22%" class="field_l"><strong>操作</strong></td>
</tr>
<?php
include("../admin.php");
include("../../db.php");
$pagesize=10;
$url=$_SERVER["REQUEST_URI"];
$url=parse_url($url);
$url=$url['path'];
$numq=mysql_query("select * from book order by id desc");
$num = mysql_num_rows($numq);
if($num > $pagesize){
$allpage = @ceil($num / $pagesize);//总页数
}else{
$allpage=1;
}
if(isset($_GET['page'])){
$pageval=intval($_GET['page']);
if($pageval<1){
$pageval=1;
}else if($pageval>$allpage){
$pageval=$allpage;
}
$page=($pageval-1)*$pagesize;
}else{
$page=0;
}
$rs=mysql_query("select * from book order by id desc limit $page , $pagesize");
while ($rw=mysql_fetch_assoc($rs)){
?>
<tr>
<td height="23" class="field_l"><?=$rw['title']?></td>
<td height="23" class="field_l"><?=$rw['ctime']?></td>
<td class="field_l">
<font color=red>
<?php if($rw['approve']==1){?>
已通过
<?php }else{?>
未通过
<?php }?>
</font>
</td>
<td class="field_l"><a href="edit_book.php?id=<?=$rw['id']?>">修改</a> | <a href="del_book.php?id=<?=$rw['id']?>">删除</a></td>
</tr>
<?php }?>
</tbody>
<tfoot>
<tr>
<td height="23" colspan="5" style="text-align: right;padding-top: 10px;">
<a href="<?=$url?>?page=1">首页</a>
<a href="<?=$url?>?page=<?=($pageval-1)?>">上一页</a>
<a href="<?=$url?>?page=<?=($pageval+1)?>">下一页</a>
<a href="<?=$url?>?page=<?=$allpage?>">末页</a>
页次:<font color='#FF0000'><?=$pageval?></font>/<?=$allpage?>
共<font color='#FF0000'><?=$num?></font>条
</td>
</tr>
</tfoot>
</table>
</div>
</center>
</div>
</body>
</html>
php分页
最新推荐文章于 2021-10-28 20:58:09 发布