本文整理汇总了PHP中paging::navigation方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::navigation方法的具体用法?PHP paging::navigation怎么用?PHP paging::navigation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paging
的用法示例。
在下文中一共展示了paging::navigation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: customPaging
function customPaging($sql, $ListRecPerPage = 20, $rewrite_url = false)
{
//var_dump($rewrite_url);
global $link;
//===============Paging========================
//$ListRecPerPage = 10;
$pg = new paging($link, "page", $ListRecPerPage, "»", "«", 5, @$CurlLink);
$pg->sql = $sql;
$r = $pg->get_page_result();
// result set
$num_rows = $pg->get_page_num_rows();
// number of records in result set
$data = array();
if ($num_rows > 0) {
while ($o = GetArr($r)) {
array_push($data, $o);
}
}
mysql_data_seek($r, 0);
//if( @$iscurl )
//$nav_links = $pg->navigation_curl(" | ", "price" ); // the navigation links (define a CSS class selector for the current link)
//else $separator = " | ", $css_current = "", $back_forward = false, $rewrite_url = false
$nav_links = $pg->navigation(" ", "current", false, $rewrite_url);
// the navigation links (define a CSS class selector for the current link)
$nav_info = $pg->page_info("to");
// information about the number of records on page ("to" is the text between the number)
$simple_nav_links = $pg->back_forward_link();
// the navigation with only the back and forward links
$total_recs = $pg->get_total_rows();
// the total number of records*/
//=============================================
return array('data' => $data, 'result' => $r, 'total_recs' => $total_recs, 'nav_links' => $nav_links, 'nav_info' => $nav_info, 'simple_nav_links' => $simple_nav_links);
}