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


PHP paging::checkDisplay方法代碼示例

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


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

示例1: ksort

             $domain_array[$row['aliasdomain']]['domainaliasid'] = $row['id'];
             $domain_array[$row['aliasdomain']]['domainalias'] = $row['domain'];
         }
     }
     /**
      * We need ksort/krsort here to make sure idna-domains are also sorted correctly
      */
     if ($paging->sortfield == 'd.domain' && $paging->sortorder == 'asc') {
         ksort($domain_array);
     } elseif ($paging->sortfield == 'd.domain' && $paging->sortorder == 'desc') {
         krsort($domain_array);
     }
     $i = 0;
     $count = 0;
     foreach ($domain_array as $row) {
         if (isset($row['domain']) && $row['domain'] != '' && $paging->checkDisplay($i)) {
             $row['customername'] = getCorrectFullUserDetails($row);
             $row = htmlentities_array($row);
             // display a nice list of IP's
             $row['ipandport'] = str_replace("\n", "<br />", $row['ipandport']);
             eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";");
             $count++;
         }
         $i++;
     }
     $domainscount = $numrows_domains;
     // Display the list
     eval("echo \"" . getTemplate("domains/domains") . "\";");
 } elseif ($action == 'delete' && $id != 0) {
     $result_stmt = Database::prepare("\n\t\t\tSELECT `d`.* FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`\n\t\t\tWHERE `d`.`id` = :id AND `d`.`id` <> `c`.`standardsubdomain`" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = :adminid"));
     $params = array('id' => $id);
開發者ID:mowamed,項目名稱:Froxlor,代碼行數:31,代碼來源:admin_domains.php

示例2: elseif

} elseif ($page == 'accounts') {
    if ($action == '') {
        $log->logAction(USR_ACTION, LOG_NOTICE, 'viewed customer_ftp::accounts');
        $fields = array('username' => $lng['login']['username'], 'homedir' => $lng['panel']['path']);
        $paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $result = $db->query('SELECT `id`, `username`, `homedir` FROM `' . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit());
        $paging->setEntries($db->num_rows($result));
        $sortcode = $paging->getHtmlSortCode($lng);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
        $i = 0;
        $count = 0;
        $accounts = '';
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
                    $row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
                } else {
                    $row['documentroot'] = $row['homedir'];
                }
                $row['documentroot'] = makeCorrectDir($row['documentroot']);
                $row = htmlentities_array($row);
                eval('$accounts.="' . getTemplate('ftp/accounts_account') . '";');
                ++$count;
            }
            ++$i;
        }
        $ftps_count = $db->num_rows($result);
        eval('echo "' . getTemplate('ftp/accounts') . '";');
    } elseif ($action == 'delete' && $id != 0) {
開發者ID:markc,項目名稱:syscp,代碼行數:31,代碼來源:customer_ftp.php


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