简单好看的分页_第1页
简单好看的分页_第2页
简单好看的分页_第3页
简单好看的分页_第4页
简单好看的分页_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、.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:center; margin:0 2px 0 0x;border: 1px s

2、olid #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;border: 1px solid #d4d4d4; .pages ul li#

3、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:none;.pages ul li#p3 a:hover color:#999966

4、; 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 a:active color: #CDF0F1;.pages ul li#p6

5、 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; myde_count = $this - numeric($myde_count);$this - myde_size = $this - numeric($myde_size);$

6、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 myde_page =1;if($this - myde_count myde_page =0;$this - myde_page_count = ceil($this - myde_count/$this - myde_size);if($

7、this - myde_page_count myde_page_count = 1;if($this - myde_page $this - myde_page_count) $this - myde_page = $this - myde_page_count;$this - page_i = $this - myde_page - 2; $this - page_ub = $this - myde_page + 2; if($this - page_i page_ub = $this - page_ub + (1 - $this - page_i); $this - page_i = 1

8、; if($this - page_ub $this - 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 page_i = 1; private function numeric($id) /判断是否为数字if (strlen($id) if (!preg_match(/0-9+$/i,$id)$id = 1; else$id =

9、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 page_replace(1). title=首页 首页n;elsereturn 首页n;private function myde_prev() /上一页if($this - myde_page !=

10、1)return page_replace($this-myde_page-1) . title=上一页 上一页n;elsereturn 上一页n;private function myde_next() /下一页if($this - myde_page != $this - myde_page_count)return page_replace($this-myde_page+1) . title=下一页 下一页n;elsereturn 下一页n;private function myde_last() /尾页if($this - myde_page != $this - myde_page

11、_count)return page_replace($this - myde_page_count). title=尾页 尾页n;elsereturn 尾页n;function myde_write($id=page) /输出$str = n n ;$str .= 总记录:.$this - myde_count.n;$str .= .$this - myde_page./.$this - myde_page_count.n;$str .= $this - myde_home();$str .= $this - myde_prev();for($page_for_i = $this - pag

12、e_i;$page_for_i page_ub; $page_for_i+)if($this - myde_page = $page_for_i) $str .= .$page_for_i.n;else$str .= page_replace($page_for_i). title=第.$page_for_i.页;$str .= $page_for_i . n; $str .= $this - myde_next();$str .= $this - myde_last();$str .= 跳 myde_page.;$str .= onkeydown=javascript: if(event.k

13、eyCode=13) location=;$str .= $this - page_replace(+this.value+).;return false;$str .= title=输入您想要到达的页码/页n;$str .= n n;return $str;/$page = $_GETpage;/$URL=syxl_list;路径/$aa=$yang-selecttable(syw_syxl,*);/$cc=$yang-query($aa);mysql_query();/$count=$yang-row($cc);mysql_num_rows()查询表里的总记录/$pages = new PageClass($count,5,$page,$URL.php?page=page);/分别为(记录总数,每页显示多少条记录,当前面,显示方式)/特别说明:如果是伪静态分页或者纯静态分页,那么显示方式需要改,比如改成index-page.html/$sql = select * from syw_syxl order by ;/$sql .= id desc limit .$pages - page

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论