$this->url = $this->StrSift($url); //Determine whether the value of $url is legal.
$this->Aque = $_GET; //The parameters originally passed by the page .
$this->page = $this->StrSift($_GET['page']); //Current page GET (global variable) mode parameters, current page number.
$this->page = is_numeric( $this->page) ? $this->page : 1; //When the current page number is not a number, set it to 1.
$this->pages = ceil($total/$pageNum); //Total number of pages.
if($this->page<1) $this->page = 1; //When the page number is less than 1, set it to 1.
//if($this- >page>$this->pages) $this->page = $this->pages; //When the page number is greater than the maximum page number, set it to the maximum page number.
$str = str_replace("?","",$str ); //Removal will result in "??".
$str = str_replace(">","",$str);
$str = str_replace("<","",$str);
$ str = str_replace("%","",$str);
$str = str_replace("*","",$str);
$str = str_replace("&","",$str);
$str = str_replace(".","",$str);
return $str;
}
//End of class
}
?>
Copy code
Friends who are interested can also refer to the following articles:
A good php paging class code
A practical php paging class
Pagination style sheet:
/*Drop-down menu or text input box style*/
#JumpSelect{
background:#159bd0;
border:1px solid #ffff66;
color :#ffff66;
width:37px;
font-size:11px;
padding:0 0 0 0;
margin:0 0 0 0;
SCROLLBAR-FACE-COLOR: #d0dff7;
SCROLLBAR-HIGHLIGHT-COLOR: # d0dff7;
SCROLLBAR-SHADOW-COLOR: #FFFFFF;
SCROLLBAR-3DLIGHT-COLOR: #FFFFFF;
SCROLLBAR-ARROW-COLOR: #ffffff;
SCROLLBAR-TRACK-COLOR: #ffffff;
SCROLLBAR-DARKSHADOW-COLOR: # d0dff7;
base-color: #ededed;
scrollbar-arrow-color: #000;
scrollbar-highlight-color: #fafafa;
scrollbar-shadow-color: #fafafa;
scrollbar-track-color: #ededed;
scrollbar-face-color: #fafafa;
scrollbar-darkshadow-color: #ededed;
scrollbar-3dlight-color: #ededed;
}
Copy code
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn