再一次厚脸皮…分页…页面跳转后仍是当前页面

WBOY
Release: 2016-06-13 12:46:29
Original
865 people have browsed it

再一次厚脸皮…………分页…………页面跳转后还是当前页面

 <?php<br />
    extract($_REQUEST);<br />
    $pages=ceil($count/$list_num);<br />
       echo "<table width=760 border=0 cellspacing=0 cellpadding=0 align=center class='text'><br />
          <tbody> <br />
          <tr> <br />
     <td width='159'><font color='#ff0000'>目前共有".$count."条记录</font> </td><br />
    <td width='205'>共".$pages."页</td>";<br />
 <br />
	  if($offset){<br />
		$preoffset=$offset-$list_num;<br />
	print "<td width='132'><a href=\"?offset=$preoffset\">上一页</a></td>";}<br />
	else {<br />
	  echo "<td width='132'>上一页</td>";<br />
	}<br />
	 $newoffset=$offset+$list_num;<br />
	  if(($pages!=0)&&(($newoffset/$list_num)!=$pages))<br />
	{<br />
	 print("<td width='158'><a  href=\"?offset=$newoffset\">下一页</a></td>");<br />
	}<br />
	 else{ echo "<td width='158'>下一页</td>";}<br />
	$pageno=($offset/$list_num)+1;<br />
	echo "<td width='112' class=text>第<input class=text type='text' size='4'value=".$pageno." readonly><br />
      页</td><br />
    <td width='4'> </td></tr><br />
</table>"; <br />
   ?>  <br />
   
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template