本文整理汇总了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;
}