當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pagination::urlFriendly方法代碼示例

本文整理匯總了PHP中pagination::urlFriendly方法的典型用法代碼示例。如果您正苦於以下問題:PHP pagination::urlFriendly方法的具體用法?PHP pagination::urlFriendly怎麽用?PHP pagination::urlFriendly使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pagination的用法示例。


在下文中一共展示了pagination::urlFriendly方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: basename

     $log->logError($e . " - " . basename(__FILE__));
 }
 echo "<div class=\"page-header\"><h1>" . _("Access Logs") . "</h1></div>";
 echo "<h6>" . _("Options") . " : <a href=\"{$website}/" . ADMIN_DIRECTORY . "/settings#/misc\">" . _("Access Settings") . "</a></h6><br/>";
 echo "<ul class=\"breadcrumb\">\n\t\t<li><a href=\"{$website}/" . ADMIN_DIRECTORY . "/settings\">" . _("Home") . "</a> <span class=\"divider\">/</span></li>\n\t\t<li class=\"active\">" . _("Access Logs") . "</li>\n\t\t</ul>";
 if (!empty($number)) {
     /*
     initializing the ip2country class for converting ip address to country.
     */
     $ip2country = new ip2country($db);
     $p = new pagination();
     $p->items($number);
     $p->limit($max_show);
     $p->currentPage($page);
     $p->parameterName("p");
     $p->urlFriendly();
     $p->target("{$website}/" . ADMIN_DIRECTORY . "/access/%");
     $from2 = $page * $max_show;
     if ($from2 > $number) {
         $diff = $number % $max_show;
         $from2 = $number;
         $from1 = $from2 - $diff;
     } else {
         $from1 = $from2 - $max_show;
     }
     echo "<table class=\"table table-condensed\">";
     echo "<thead><tr>\n\t\t\t<th>" . _("ID") . "</th>\n\t\t\t<th>" . _("IP Address") . "</th>\n\t\t\t<th>" . _("Username") . "</th>\n\t\t\t<th>" . _("Country") . "</th>\n\t\t\t<th>" . _("Access") . "</th>\n\t\t\t</tr></thead>";
     /*
     loading all the tags data in arrays.
     */
     while ($row = $q_do->fetch(PDO::FETCH_ASSOC)) {
開發者ID:Abysmal,項目名稱:AuthManager,代碼行數:31,代碼來源:access.php

示例2: create_paginator

function create_paginator($currentpage, $nb_items, $path)
{
    require_once ROOT_DIR . '/' . INC_DIR . '/paginator-digg/pagination.php';
    $p = new pagination();
    $p->items($nb_items);
    $p->currentPage($currentpage);
    $p->limit(1);
    $p->urlFriendly();
    $p->target(URL . "/{$path}/page/%");
    if ("" === $path) {
        $p->target(URL . "/page/%");
    }
    $p->adjacents(1);
    if (!$p->calculate) {
        if ($p->calculate()) {
            return "<div class=\"{$p->className}\">{$p->pagination}</div>";
        }
    }
}
開發者ID:holdensmagicalunicorn,項目名稱:Volatile,代碼行數:19,代碼來源:functions.php


注:本文中的pagination::urlFriendly方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。