本文整理汇总了PHP中Pagenate::paginate方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagenate::paginate方法的具体用法?PHP Pagenate::paginate怎么用?PHP Pagenate::paginate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagenate
的用法示例。
在下文中一共展示了Pagenate::paginate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Pagenate
//Deep search!
// Use the search engine to perform the search
$tickets = $ost->searcher->find($q, $tickets);
}
}
if ($settings['topic_id']) {
$tickets = $tickets->filter(array('topic_id' => $settings['topic_id']));
}
TicketForm::ensureDynamicDataView();
$total = $tickets->count();
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('tickets.php', $qs);
$pageNav->paginate($tickets);
$showing = $total ? $pageNav->showing() : "";
if (!$results_type) {
$results_type = ucfirst($status) . ' ' . __('Tickets');
}
$showing .= $status ? ' ' . $results_type : ' ' . __('All Tickets');
if ($search) {
$showing = __('Search Results') . ": {$showing}";
}
$negorder = $order == '-' ? 'ASC' : 'DESC';
//Negate the sorting
$tickets->order_by($order . $order_by);
$tickets->values('ticket_id', 'number', 'created', 'isanswered', 'source', 'status_id', 'status__state', 'status__name', 'cdata__subject', 'dept_id', 'dept__name', 'dept__ispublic', 'user__default_email__address');
?>
<div class="container topheader"><div class="row">
<div class="search well">