本文整理匯總了PHP中Pager::prev_next_html方法的典型用法代碼示例。如果您正苦於以下問題:PHP Pager::prev_next_html方法的具體用法?PHP Pager::prev_next_html怎麽用?PHP Pager::prev_next_html使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pager
的用法示例。
在下文中一共展示了Pager::prev_next_html方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: text
<?php
$docRoot = getenv("DOCUMENT_ROOT");
require_once $docRoot . "/mobi-config/mobi_web_constants.php";
require WEBROOT . "/page_builder/page_header.php";
require WEBROOT . "/mobile-about/WhatsNew.php";
$whats_new = new WhatsNew();
$new_items = $whats_new->get_items();
WhatsNew::setLastTime();
$start = !isset($_REQUEST['start']) ? 0 : intval($_REQUEST['start']);
$pager = new Pager($page->max_list_items, $new_items, $start);
$arrows = $pager->prev_next_html($_SERVER['SCRIPT_NAME'], array(), "start");
$items = $pager->items();
require "$page->branch/new.html";
$page->output();
/*
function text($data) {
return htmlentities($data['body']);
}
*/
function date_string($data, $format) {
return date($format, $data['unixtime']);
}
?>
示例2: output
public function output($results)
{
$total = count($results);
//truncate results and determine if a next page is needed
$start = $_REQUEST["start"] ? (int) $_REQUEST["start"] : 0;
$pager = new Pager($this->phone, $results, $start);
$results2 = $results;
$results = $pager->items();
$search_terms = $_REQUEST['filter'];
$params = array_merge(array("filter" => $search_terms), $this->extra_params);
$arrows = $pager->prev_next_html($_SERVER['SCRIPT_NAME'], $params, "start");
$start++;
$end = $pager->last();
require "../templates/{$this->prefix}/search_results.html";
return $this->page;
}