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


PHP cache::getLogsCount方法代碼示例

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


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

示例1: array

}
$tpl->assign('enableCacheNote', $login->userid != 0);
/* Logentries */
/* begin insertion/change Uwe 20091215 for printing purposes
	   reworked on 20100106 for better performance after Olivers intervention
	 */
// See how many logs are in the db for the cache if logprinting is selected
// If not or just five logs may printed, the system will set this fixed values for calling the DB.
$rscount = 99;
//Preset the value
$rsreturn = array(88);
//Preset the value
if (isset($_REQUEST['log']) && $_REQUEST['log'] == 'N') {
    $rscount = 0;
} elseif (isset($_REQUEST['log']) && $_REQUEST['log'] == 'A') {
    $rsreturn = cache::getLogsCount($cacheid);
    $rscount = current($rsreturn);
} else {
    $rscount = 5;
}
$tpl->assign('logcount', $rscount);
$logs = cache::getLogsArray($cacheid, 0, $rscount);
if (isset($logs[$rscount - 1])) {
    unset($logs[$rscount - 1]);
    $tpl->assign('showalllogs', true);
}
$loganz = sizeof($logs);
$tpl->assign('logs', $logs);
$tpl->assign('loganz', $loganz);
/*end insertion Uwe 20091215*/
/* nature protection areas
開發者ID:RH-Code,項目名稱:opencaching,代碼行數:31,代碼來源:viewcache.php

示例2: switch

    $cacheNotePresenter->prepare($tpl);
}
$tpl->assign('enableCacheNote', $login->userid != 0);
/* Logentries */
/* begin insertion/change Uwe 20091215 for printing purposes
	   reworked on 20100106 for better performance after Olivers intervention
	   rewritten 2012-07-22 following for bugfix, first log was lost in print
	 */
$rscount = MAX_LOGENTRIES_ON_CACHEPAGE;
if (isset($_REQUEST['log'])) {
    switch ($_REQUEST['log']) {
        case 'N':
            $rscount = 0;
            break;
        case 'A':
            $rscount = current(cache::getLogsCount($cacheid));
            // This option is also used when referencing logs, e.g. from log lists
            // and picture galleries.
            break;
        default:
            // This is currently used only for the print view function
            // with parameters 5 or 10.
            if ($_REQUEST['log'] >= 0 && $_REQUEST['log'] <= 100) {
                $rscount = $_REQUEST['log'] + 0;
            }
    }
}
$logs = cache::getLogsArray($cacheid, 0, $rscount + 1);
if (isset($logs[$rscount])) {
    unset($logs[$rscount]);
    $tpl->assign('morelogs', true);
開發者ID:PaulinaKowalczuk,項目名稱:oc-server3,代碼行數:31,代碼來源:viewcache.php


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