本文整理汇总了PHP中pagination::Items方法的典型用法代码示例。如果您正苦于以下问题:PHP pagination::Items方法的具体用法?PHP pagination::Items怎么用?PHP pagination::Items使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pagination
的用法示例。
在下文中一共展示了pagination::Items方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pagination
public function pagination()
{
$string = $_SERVER["REQUEST_URI"];
$pattern = "/(&page=[0-9]+)/i";
$replacement = "";
$target = preg_replace("/([&?]+page=[0-9]+)/i", "", $_SERVER["REQUEST_URI"]);
$this->load->library("pagination");
$page = new pagination();
$page->target($target);
@$page->limit($this->paged->page_size);
@$page->currentPage($this->paged->current_page);
@$page->Items($this->paged->total_rows);
return $page->show();
}
示例2: pagination
function pagination()
{
$string = $_SERVER['REQUEST_URI'];
$pattern = '/(&page=[0-9]+)/i';
$replacement = '';
$target = preg_replace('/([&?]+page=[0-9]+)/i', '', $_SERVER['REQUEST_URI']);
$this->load->library('pagination');
$page = new pagination();
$page->target($target);
$page->limit($this->paged->page_size);
@$page->currentPage($this->paged->current_page);
$page->Items($this->paged->total_rows);
return $page->show();
}
示例3: pagination
</div>
';
if ($total > 0) {
//постраничная разбивка
$page_href = $mod_page;
if ($search_username) {
$page_href .= "&search_username=" . $search_username;
}
if ($search_status) {
$page_href .= "&search_status=" . $search_status;
}
if ($search_date) {
$page_href .= "&search_date=" . $search_date;
}
$pg = new pagination();
$pg->Items($total);
$pg->limit($pnum);
$pg->target($page_href);
$pg->currentPage($page);
$pg->nextT = ' <a href="[+link+]">' . $langTxt['next'] . '</a> ';
$pg->prevT = ' <a href="[+link+]">' . $langTxt['prev'] . '</a> ';
$pager = $pg->getOutput();
//Данные заказов
$data_query = $modx->db->query("SELECT shk.id, shk.short_txt, shk.price, shk.currency, shk.note, shk.status, shk.userid, DATE_FORMAT(shk.date,'%d.%m.%Y %k:%i') AS date, DATE_FORMAT(shk.sentdate,'%d.%m.%Y %k:%i') AS sentdate " . $data_q . $orderby_q);
//$data_query = $modx->db->select("id, short_txt, price, currency, note, status, userid, DATE_FORMAT(date,'%d.%m.%Y %k:%i') AS date, DATE_FORMAT(sentdate,'%d.%m.%Y %k:%i') AS sentdate", $shkm->mod_table, "", "id DESC", "$start,$pnum");
//Данные пользователей
$userData_query = $modx->db->select("DISTINCT wu.id, wu.username", $dbprefix . "web_users wu, {$shkm->mod_table} shk", "wu.id = shk.userid", "", "");
$users_id_list = "0";
while ($userData = mysql_fetch_row($userData_query)) {
$userName[$userData[0]] = $userData[1];
$users_id_list .= "," . $userData[0];
示例4: pagination
return;
}
$output = $ctlView->renderRows($products, $cv_config['tpl']);
$pagination = '';
if ($cv_config['paginate'] && !$cv_config['randomize'] && $cv_config['display'] > 0) {
//pagination
require_once MODX_BASE_PATH . "assets/snippets/catalogView/classes/pagination.class.php";
$p = new pagination();
$p->nextT = $langTxt['next'];
//' <a href="[+link+]">'.$langTxt['next'].'</a> ';
$p->prevT = $langTxt['prev'];
//' <a href="[+link+]">'.$langTxt['prev'].'</a> ';
$p->numberT = ' <a href="[+link+]" class="' . $cv_config['pageClass'] . '">[+num+]</a> ';
$p->currentT = ' <b class="' . $cv_config['currentPageClass'] . '">[+num+]</b> ';
$p->prevI = '';
$p->Items($total);
$p->limit($ctlView->config['display']);
$p->target($cv_config['thisPageUrl'] . $pagesQueryString);
$p->currentPage($qs_page);
$p->parameterName($cv_config['id_prefix'] . 'page');
$p->changeClass($cv_config['pageParentClass']);
$pagination .= $p->getOutput();
$totalPages = ceil($total / $qs_display);
$ctlView->setMODxPlaceholders(array("pages" => $pagination, "totalPages" => $totalPages));
}
$ctlView->setMODxPlaceholders(array("sortBy" => $qs_sortBy, "sortDir" => $qs_sortDir, "qs_start" => $qs_start, "total" => $total, "currentPage" => $qs_page, "display" => $qs_display, "sortDirOther" => $sortDirOther, "filter" => $qs_filter, "pagesQueryString" => $pagesQueryString, "thisPageUrl" => $cv_config['thisPageUrl']));
if ($cv_config['toPlaceholder']) {
$ctlView->setMODxPlaceholders(array($cv_config['toPlaceholder'] => $output));
$output = '';
}
}
示例5: get
function get($sql = FALSE, $noSplitPage = FALSE)
{
$sql = $sql ? $sql : 'select ' . $this->select . ' from ' . $this->table . ' ' . $this->join . ' ' . $this->where . ' ' . $this->sort . ' ' . $this->order;
//$sql = iconv('UTF-8','TIS-620',$sql);
if ($noSplitPage == FALSE) {
$this->load->library('pagination');
$page = new pagination();
$page->target($this->target);
$page->limit($this->limit);
@$page->currentPage($this->current_page);
$rs = $this->db->PageExecute($sql, $page->limit, $page->page);
$page->Items($rs->_maxRecordCount);
$this->pagination = $page->show();
} else {
$rs = $this->db->Execute($sql);
}
$this->free_result();
$data = $rs->GetArray();
///array_walk($data,'dbConvert');
return $data;
}
示例6: count
function sql_page($sql, $limit = 20)
{
$db = get_instance()->db;
$rs = preg_replace("/select(.*)from/is", "select count(users.id) total from", $sql);
$q = $db->query($rs)->row_array();
$this->sql_page_total = $q['total'];
// $this->sql_page_total = $db->query($sql)->num_rows();
$this->load->library('pagination');
$page = new pagination();
$page->target(preg_replace('/([&?]+page=[0-9]+)/i', '', $_SERVER['REQUEST_URI']));
$page->limit($limit);
@$page->currentPage($_GET['page']);
$page->Items($this->sql_page_total);
$this->sql_pagination = $page->show();
$c_page = $page->page == 1 ? 0 : ($page->page - 1) * $page->limit;
return $db->query($sql . ' limit ' . $c_page . ',' . $page->limit)->result();
}
示例7: count
}
} else {
$buildings_total = Idp_Main::getBuildings(false, 0, 1844674407371, 'published');
$pagination_count = count($buildings_total);
$building_count = $pagination_count;
}
}
if ($pagination_count > 0) {
//Records per page and items per row
$per_page = getPerPageCount($pagination_count);
//Total Page
$total_page = ceil($pagination_count / $per_page);
//initiate the pagination variable
$pag = new pagination();
//Set the pagination variable values
$pag->Items($pagination_count);
$pag->limit($per_page);
$pag->target($current_url);
$pag->currentPage($this_page);
//Done with the pagination
//Now get the entries
//But before that a little anomaly checking
$list_start = ($this_page - 1) * $per_page;
if ($list_start >= $pagination_count) {
//Start of the list should be less than pagination count
$list_start = $pagination_count - $per_page;
}
if ($list_start < 0) {
//list start cannot be negative
$list_start = 0;
}
示例8: pagination
function detail_page($detail)
{
$page = 0;
if (@$_GET["page"]) {
$page = $_GET["page"] - 1;
}
$foo = @split("<!-- pagebreak -->", $detail);
$target = preg_replace("/([&?]+page=[0-9]+)/i", "", $_SERVER["REQUEST_URI"]);
$pagination = new pagination();
$pagination->target($target);
$pagination->limit(1);
@$pagination->currentPage($_GET["page"]);
$pagination->Items(count($foo));
return @$foo[$page] . $pagination->show();
}
示例9: elseif
?>
<p><?php
if ($aux['total'] and isset($busqueda)) {
echo "{$aux['total']} Resultado" . ($aux['total'] > 1 ? 's' : '') . " que coinciden con tu búsqueda \"<strong>{$busqueda}</strong>\".";
} elseif ($aux['total'] and !isset($q)) {
echo "Total de registros: {$aux['total']}";
} elseif (!$aux['total'] and isset($q)) {
echo htmlentities($c) . "No hay registros que coincidan con tu búsqueda \"<strong>{$busqueda}</strong>\"";
}
?>
</p>
<?php
if ($aux['total'] > 0) {
$p = new pagination();
$p->Items($aux['total']);
$p->limit($items);
if (isset($q)) {
$p->target("alumnoBusqueda.php?q=" . urlencode($q));
} else {
$p->target("alumnoBusqueda.php");
}
$p->currentPage($page);
$p->show();
$sql = $sqlStr . $limit;
$rs_list = $cn->query($sql);
$row_list = $rs_list->num_rows;
echo '
<table class="bordered">
<tr>