本文整理汇总了PHP中pagination::dropdown方法的典型用法代码示例。如果您正苦于以下问题:PHP pagination::dropdown方法的具体用法?PHP pagination::dropdown怎么用?PHP pagination::dropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pagination
的用法示例。
在下文中一共展示了pagination::dropdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createTable
private static function createTable($data, $headers = NULL, $pagination = TRUE, $formID = NULL)
{
$table = new tableObject("array");
$table->summary = "Object Listing";
$table->sortable = FALSE;
$table->class = "table table-striped table-bordered";
$table->id = "objectListingTable";
$table->layout = TRUE;
if (isnull($headers)) {
$headers = array();
$headers[] = "System IDNO";
$headers[] = "Form IDNO";
$headers[] = "Title";
$headers[] = "View";
$headers[] = "Edit";
// $headers[] = "Revisions";
}
$table->headers($headers);
$userPaginationCount = users::user('pagination', 25);
if ($pagination && sizeof($data) > $userPaginationCount) {
$engine = mfcs::$engine;
$pagination = new pagination(sizeof($data));
$pagination->itemsPerPage = $userPaginationCount;
$pagination->currentPage = isset($engine->cleanGet['MYSQL'][$pagination->urlVar]) ? $engine->cleanGet['MYSQL'][$pagination->urlVar] : 1;
$startPos = $userPaginationCount * ($pagination->currentPage - 1);
$dataNodes = array_slice($data, $startPos, $userPaginationCount);
$tableHTML = $table->display($dataNodes);
$tableHTML .= $pagination->nav_bar();
$tableHTML .= sprintf('<p><span class="paginationJumpLabel">Jump to Page:</span> %s</p>', $pagination->dropdown());
$tableHTML .= sprintf('<p><span class="paginationJumpLabel">Records per page:</span> %s</p>', $pagination->recordsPerPageDropdown());
$tableHTML .= sprintf('<p><form id="jumpToIDNOForm"><span class="paginationJumpLabel">Jump to IDNO:</span> <input type="text" name="jumpToIDNO" id="jumpToIDNO" data-formid="%s" value="" /></form></p>', isnull($formID) ? "" : htmlSanitize($formID));
return $tableHTML;
} else {
return $table->display($data);
}
}