!--? php Header ("content-type:text/html; Charset=utf-8 ");
//AK qq:42220796
//Total number of single-page bars the URL address of the current page click on the Get app's JS function displays several displayed addresses
function ajaxpage ($Total, $ListNub, $ CurrentPage, $Url, $AjaxAction, $HalfPer =, $ViewId =)
{
//calculates the total number of pages
$totalPage = @ceil ($Total/$ListNub);
$total = $totalPage-1;
$re = "";
Echo $CurrentPage;
$re. = ($CurrentPage > 0)
?
"href=" javascript: $AjaxAction ($Url =0, $ViewId) "> Home href=" javascript: $AjaxAction (". $Url.") =". ($CurrentPage-1). ", $ViewId)" > previous page
:
"First Prev";
for ($i =
$CurrentPage-$HalfPer, $i > 0 | | $i = 0, $j =
$CurrentPage + $HalfPer, $j < $totalPage | | $j = $totalPage, $i < $j, $i + +
)
{
$re. = $i = = $CurrentPage
?
"[" . ($i + 1).
"]"
: "href=" javascript: $AjaxAction ($Url = $i, $ViewId) ">". ($i + 1).
"";
}
$re. = ($CurrentPage < $total
)
? "href=" javascript: $AjaxAction (". $Url." =". ($CurrentPage + 1). ", $ViewId)" > Next href= "javascript: $AjaxAction (". $Url. ") =". ($total). ", $ViewId)" "> Last"
:
"Next Page last";
$re = "
Style=text-align:center>
$re
";
Return
$re;
}
Total pages, passed page variables-how many pages before and after the URL address of the current page
$page = $_get[page];
Echo
Page (ten, $page, index.php?page,2);
?>
Echo
Ajaxpage (200,20, $page, rand.php?page,ajaxaction,2,nike);
?>
http://www.bkjia.com/PHPjc/486598.html www.bkjia.com true http://www.bkjia.com/PHPjc/486598.html techarticle ? php Header ("content-type:text/html; Charset=utf-8 "); AK qq:42220796//Total number of single page bars the URL address of the current page click on the Get app's JS function shows a few show address fun ...