




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、<style type="text/css">.pages clear:both; height:22px; padding:5px 0 5px 0; margin:auto; font-size:12px; font-family:Arial, Helvetica, sans-serif;.pages ul li float:left;height:24px; text-align:center;color:#666;line-height:24px;background:#FFF;.pages ul li#p1 width:60px; text-align:
2、center; margin:0 2px 0 0x;border: 1px solid #d4d4d4;.pages ul li#p2 width:30px; text-align:center;margin:0 2px 0 2px;border: 1px solid #d4d4d4;.pages ul li#p3 width:31px; text-align:center;margin:0 2px 0 2px;border: 1px solid #d4d4d4;.pages ul li#p6 width:40px; text-align:center;margin:0 2px 0 2px;b
3、order: 1px solid #d4d4d4; .pages ul li#p4 width:15px; text-align:center;margin:0 2px 0 2px;border: 1px solid #d4d4d4;.pages ul li#p5 width:60px; text-align:center;margin:0 2px 0 2px;.pages ul li#p3 a:link color:#666666; text-decoration:none;.pages ul li#p3 a:visited color:#009966;text-decoration:non
4、e;.pages ul li#p3 a:hover color:#999966; text-decoration:none;.pages ul li#p3 a:active color:#CDF0F1;.pages ul li#p4 a:link color: #666666; text-decoration:none;.pages ul li#p4 a:visited color: #009966;text-decoration:none;.pages ul li#p4 a:hover color: #999966; text-decoration:none;.pages ul li#p4
5、a:active color: #CDF0F1;.pages ul li#p6 a:link color: #666666; text-decoration:none;.pages ul li#p6 a:visited color: #009966;text-decoration:none;.pages ul li#p6 a:hover color: #999966; text-decoration:none;.pages ul li#p6 a:active color: #CDF0F1;</style><?php/* *-翻页类-* */class PageClasspri
6、vate $myde_count; /总记录数var $myde_size; /每页记录数private $myde_page; /当前页private $myde_page_count; /总页数private $page_url; /页面urlprivate $page_i; /起始页private $page_ub; /结束页var $page_limit;function _construct($myde_count=0, $myde_size=1, $myde_page=1,$page_url)/构造函数1 / 6$this -> myde_count = $this ->
7、; numeric($myde_count);$this -> myde_size = $this -> numeric($myde_size);$this -> myde_page = $this -> numeric($myde_page);$this -> page_limit = ($this -> myde_page * $this -> myde_size) - $this -> myde_size; $this -> page_url = $page_url;if($this -> myde_page < 1) $
8、this -> myde_page =1;if($this -> myde_count < 0) $this -> myde_page =0;$this -> myde_page_count = ceil($this -> myde_count/$this -> myde_size);if($this -> myde_page_count < 1) $this -> myde_page_count = 1;if($this -> myde_page > $this -> myde_page_count) $this
9、-> myde_page = $this -> myde_page_count;$this -> page_i = $this -> myde_page - 2; $this -> page_ub = $this -> myde_page + 2; if($this -> page_i < 1) $this -> page_ub = $this -> page_ub + (1 - $this -> page_i); $this -> page_i = 1; if($this -> page_ub > $this
10、 -> myde_page_count) $this -> page_i = $this -> page_i - ($this -> page_ub - $this -> myde_page_count); $this -> page_ub = $this -> myde_page_count; if($this -> page_i < 1) $this -> page_i = 1; private function numeric($id) /判断是否为数字if (strlen($id) if (!preg_match("
11、/0-9+$/i",$id)$id = 1; else$id = substr($id,0,11); else$id = 1;return $id;private function page_replace($page) /地址替换return str_replace("page", $page, $this -> page_url);private function myde_home() /首页if($this -> myde_page != 1)return " <li id="p3"><a hre
12、f="".$this -> page_replace(1)."" title="首页" >首页</a></li>n"elsereturn " <li id="p3">首页</li>n"private function myde_prev() /上一页if($this -> myde_page != 1)return " <li id="p6"><a href="&
13、quot;.$this -> page_replace($this->myde_page-1) ."" title="上一页" >上一页</a></li>n"elsereturn " <li id="p6">上一页</li>n"private function myde_next() /下一页if($this -> myde_page != $this -> myde_page_count)return " <l
14、i id="p6"><a href="".$this -> page_replace($this->myde_page+1) ."" title="下一页" >下一页</a></li>n"elsereturn " <li id="p6">下一页</li>n"private function myde_last() /尾页if($this -> myde_page != $this -
15、> myde_page_count)return " <li id="p3"><a href="".$this -> page_replace($this -> myde_page_count)."" title="尾页" >尾页</a></li>n"elsereturn " <li id="p3">尾页</li>n"function myde_write($id=&
16、#39;page') /输出$str = "<div id="".$id."" class="pages">n <ul>n "$str .= " <li id="p1">总记录:<span>".$this -> myde_count."</span></li>n"$str .= " <li id="p2"><span>
17、".$this -> myde_page."</span>/<span>".$this -> myde_page_count."</span></li>n"$str .= $this -> myde_home();$str .= $this -> myde_prev();for($page_for_i = $this -> page_i;$page_for_i <= $this -> page_ub; $page_for_i+)if($this ->
18、 myde_page = $page_for_i) $str .= " <li id="p4">".$page_for_i."</li>n"else$str .= " <li id="p4"><a href="".$this -> page_replace($page_for_i)."" title="第".$page_for_i."页">"$str .= $pa
19、ge_for_i . "</a></li>n" $str .= $this -> myde_next();$str .= $this -> myde_last();$str .= " <li id="p5">跳<input type="text" style="width:20px; text-align:center;" value="".$this -> myde_page."""$str .
20、= " onkeydown="javascript: if(event.keyCode=13) location='"$str .= $this -> page_replace("'+this.value+'")."'return false;""$str .= " title="输入您想要到达的页码"/>页</li>n"$str .= " </ul>n <div class="page_clear"></div>n</div>"return $str;/$page = $_GET'page'/$URL="syxl_list"路径/$aa=$yang->selecttable("syw_syxl&qu
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 从生产到消费探讨如何利用区块链优化商品供应链流程
- 医疗器械设计的发展趋势与材料应用
- 医疗设备安全与质量控制
- 医疗大数据的采集、存储与隐私保护技术探讨
- 医药企业药品说明书合规经营策略
- 医疗信息化趋势下的电子健康记录标准化探索
- 医院信息化建设中的多部门协同策略
- 公交卡制作合同范例
- 供销合同范例格式
- 医疗大数据下的患者隐私保护策略研究
- 《基于SLP的丹尼斯卖场仓储布局优化设计案例报告》12000字(论文)
- 班组长的选聘、使用、淘汰制度模版(2篇)
- 量子信息技术国内外标准化进展报告(2024)-量子科技产学研创新联盟
- 2025合法的有限公司劳动合同范本
- 医院预防职务犯罪讲座
- 2025届山东省师大附中高考数学一模试卷含解析
- 房产出租授权委托书
- 音乐引导的运动节奏
- 产后腰痛的健康宣教
- 起重工的安全技术操作规程(4篇)
- 可再生能源技术发展与应用考核试卷
评论
0/150
提交评论