代码如下 | 复制代码 |
//index.php文件 |
pagination.js文件
代码如下 | 复制代码 |
function $() var xmlhttp function statechanged() function getxmlhttpobject() |
代码如下 | 复制代码 |
/* if($numrows % $recpage != 0){
if($previous < 0){ $anc .= " $anc .= " }else{ $anc .= " $anc .= " } ################if you dont want the numbers just comment this block############### $norepeat = 4;//no of pages showing in the left and right side of the current page in the anchors $j = 1; $anch = ""; for($i=$page_showing; $i>1; $i--){ $fpreviouspage = $i-1; $page = ceil($fpreviouspage*$recpage)-$recpage; $anch = " if($j == $norepeat) break; $j++; } $anc .= $anch; $anc .= " $j = 1; for($i=$page_showing; $i<$total_page; $i++){ $fnextpage = $i+1; $page = ceil($fnextpage*$recpage)-$recpage; $anc .= " if($j==$norepeat) break; $j++; } ############################################################ if($next >= $numrows){ $anc .= " $anc .= " }else{ $anc .= " $anc .= " } $anc .= " $this->anchors = $anc; $this->total = "page : $page_showing of $total_page . total records found: $numrows"; } } ?> |
-- phpmyadmin sql dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2010 年 07 月 07 日 09:26
-- 服务器版本: 5.1.41
-- php 版本: 5.3.1
set sql_mode="no_auto_value_on_zero";
--
-- 数据库: `mydemo`
--
-- --------------------------------------------------------
--
-- 表的结构 `students`
--
create table if not exists `students` (
`id` int(11) not null auto_increment,
`name` varchar(50) not null default '',
primary key (`id`)
) engine=myisam default charset=utf8 auto_increment=21 ;
--
-- 转存表中的数据 `students`
--
insert into `students` (`id`, `name`) values
(1, '小明'),
(2, 'aniesh'),
(3, 'babu'),
(4, '小黄'),
(5, 'praveesh'),
(6, 'dixon'),
(7, 'sanju'),
(8, 'neeraj'),
(9, 'siju'),
(10, 'noble'),
(11, 'bibin'),
(12, 'febin'),
(13, 'binu'),
(14, 'charles'),
(15, 'jaggu'),
(16, 'mani'),
(17, 'milu'),
(18, 'aravind'),
(19, 'jay'),
(20, 'hari');