一小部分,其他自己下载
class pdo_pages{
public$activeuser='';
public$db_host='';
public$db_name='';
public$dsn='';
public$db_user='';
public$db_password='';
public$db_char='';
public$db_table='';
public$db_table_field='';
public$db='';
public$page_size=0;
public$link_num=5;
public$page=1;
public$records=0;
public$page_count=0;
public$pagestring='';
public$page_link='';
public$page_select='';
public$page_jump='';
public$file_suffix='.html';
function db_conn(){
try{
$this->db=new pdo("$this->activeuser:dbname=$this->db_name;host=$this->db_host;charset=$this->db_char","$this->db_user","$this->db_password");
return$this->db;
}catch(pdoexception$e){
die($e->getmessage());
}
}
function set_page(){
if(isset($_REQUEST["page"])){
$this->page=intval($_REQUEST["page"]);
}else{
$this->page=1;
}
$this->page_count=ceil($this->records/$this->page_size);
}
function get_records($where){
${"GLOBALS"}["zwpyuihhdjt"]="stmt";
${${"GLOBALS"}["sjwedxipfqe"]}="select count(1) as num from $this->db_table $where";
${"GLOBALS"}["xfvhhfj"]="arrDate";
$haluzjodqi="sql";
${${"GLOBALS"}["zwpyuihhdjt"]}=$this->db->prepare(${$haluzjodqi});
$stmt->execute();
if(${${"GLOBALS"}["xfvhhfj"]}=$stmt->fetch()){
$this->records=${${"GLOBALS"}["ohgjwgxdli"]}["num"];
}
}
function page_link1($link=null){
${"GLOBALS"}["jdkglrdqycec"]="link";
${"GLOBALS"}["mpwxxzykfurj"]="link";
if(${${"GLOBALS"}["mpwxxzykfurj"]}!=null)${${"GLOBALS"}["jdkglrdqycec"]}="&".${${"GLOBALS"}["pfgzggyn"]};
if($this->page==1){
$this->pagestring.="[忑珜] | [奻珨珜]";
}else{
$this->pagestring.="[忑珜] | [page-1)."$link>奻珨珜]";
}
$this->pagestring.=" | ";
if($this->page==$this->page_count||$this->page_count==0){
$this->pagestring.="[狟珨珜] | [帣珜]";
}else{
$this->pagestring.="[page+1)."$link>狟珨珜] | [page_count."$link>帣珜]";
}
}
function page_link11($link=null){
${"GLOBALS"}["bzrgicgzqz"]="link";
if(${${"GLOBALS"}["pfgzggyn"]}!=null)${${"GLOBALS"}["bzrgicgzqz"]}="-".${${"GLOBALS"}["pfgzggyn"]};
if($this->page==1){
$this->pagestring.="[忑珜] | [奻珨珜]";
}else{
$this->pagestring.="[file_suffix>忑珜] | [page-1)."$link$this->file_suffix>奻珨珜]";
}
$this->pagestring.=" | ";
if($this->page==$this->page_count||$this->page_count==0){
$this->pagestring.="[狟珨珜] | [帣珜]";
}else{
$this->pagestring.="[page+1)."$link$this->file_suffix>狟珨珜] | [page_count."$link$this->file_suffix>帣珜]";
}
}
自己下载