直接上代码
<html>
<meta http-equiv="content-type" content="text/html charset=utf-8"/>
<head><title></title></head>
<body>
<table width="384" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30">
<?php
include_once('adodbconn.php');
include_once("../../adodb5/tohtml.inc.php");
$sql='select * from tb_affiche';
$num=2;
if(isset($_GET['page'])){
$c_page=$_GET['page'];
}else{
$c_page=1;
}
$rst=$conn->PageExecute($sql,$num,$c_page);
if(false!=$rst){
if(!$rst->AtfirstPage()){
?>
<a href="<?php echo '?page=1';?>">首页</a>
<a href="<?php echo '?page='.($rst->AbsolutePage()-1);?>">上一页</a>
<?php
}
if(!$rst->AtLastPage()){
?>
<a href="<?php echo '?page='.($rst->AbsolutePage()+1);?>">下一页</a>
<a href="<?php echo '?page='.($rst->LastPageNo());?>">尾页</a>
<?php
}
}
?>
</td>
</tr>
<tr>
<td>
<?php
rs2html($rst,'width="350" border="1" cellpadding="1" cellspacing="1" bordercoor="#ffffff" bgcolor="green"',array('序号','标题','内容','日期'));
?>
</td>
</tr>
<tr>
<td height="30">
当前是第<?php echo $rst->AbsolutePage();?>页/共<?php echo $rst->LastPageNo();?>页
</td>
</tr>
</table>
</body>
</html>