#*********************************************************
#文件名称: function.php
#功能描述: 新闻添加修改处理模块
#程序制作:留印(adleyliu)
#联系qq :14339095
#联系邮箱:[email=adleyliu@163.com]adleyliu@163.com[/email]
#官方网站: [url=http://www.115000.com.cn]http://www.115000.com.cn[/url]
#copyright (c) 2007-2008 115000.com.cn all rights reserved.
#最后更新: 2007-11-20
#*********************************************************
#*********************************************************
#分页函数
#*********************************************************
function yl_list_page($pageurl,$rsnum,$pages,$pagecount,$pagesize){
#url
#总记录
#总页数
#当前页码
#每页显示数
//$pageurl='?';
$pcount = $pages;
$page_info = '
$page_info .= '
if (($pcount > 1) && ($pcount == $pagecount) ){
$page_info .= '.$pageurl.'page='.intval($pagecount-1).'>上一页';
}elseif (($pagecount != 1) && ($pcount != $pagecount)){
$page_info .= '.$pageurl.'page='.intval($pagecount-1).'>上一页';
}
$page_info .= '.$pageurl.'page=1>页首';
if ($pagecount > 4){
$page_info .= '.$pageurl.'page=1>[1]...';
}
if ($pcount > $pagecount+2){
$endpage = $pagecount+2;
}else{
$endpage = $pcount;
}
for ($n = ($pagecount-2); $n $endpage; $n++){
if (!($n 1)){
if ($n == intval($pagecount)){
$page_info .= ''.$n.'';
}else{
$page_info .= '.$pageurl.'page='.$n.'>['.$n.']';
}
}
}
if ($pagecount+2 $pcount){
$page_info .= '....$pageurl.'page='.$pcount.'>['.$pcount.']';
}
$page_info .= '.$pageurl.'page='.$pcount.'>页尾';
if (($pagecount == 1) && ($pcount != $pagecount) && ($pcount != 0)){
$page_info .= '.$pageurl.'page='.intval($pagecount + 1).'>下一页';
}else if (($pagecount != 1) && ($pcount != $pagecount)){
$page_info .= '.$pageurl.'page='.intval($pagecount + 1).'>下一页';
}
$page_info .= '
$page_info .= '
$page_info .= '
$page_info .= '
//echo '$page_info .= ' 转到';
$page_info .= '';
$page_info .= '页 ';
//echo '';
$page_info .= '
$page_info .= '
return $page_info;
}

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools

Notepad++7.3.1
Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.