本文整理汇总了PHP中FileCache::putModeratorQueryResults方法的典型用法代码示例。如果您正苦于以下问题:PHP FileCache::putModeratorQueryResults方法的具体用法?PHP FileCache::putModeratorQueryResults怎么用?PHP FileCache::putModeratorQueryResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileCache
的用法示例。
在下文中一共展示了FileCache::putModeratorQueryResults方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mktime
$ip = $_SERVER['REMOTE_ADDR'];
// Execute query and display results
// Convert wildcards to mysql format
if ($searchButton) {
$name = StringUtil::cleanupQuery($name);
$arr = StringUtil::analyzeQuery($name);
$hasDiacritics = $arr[0];
$hasRegexp = $arr[1];
$isAllDigits = $arr[2];
$field = $hasDiacritics ? 'formNoAccent' : 'formUtf8General';
$userId = '';
if ($nick) {
$user = User::get_by_nick($nick);
if ($user) {
$userId = $user->id;
}
}
$beginTime = mktime(0, 0, 0, $mo1, $da1, $yr1);
$endTime = mktime(23, 59, 59, $mo2, $da2, $yr2);
// Query the database and output the results
$defs = Definition::searchModerator($name, $hasDiacritics, $sourceId, $status, $userId, $beginTime, $endTime);
$searchResults = SearchResult::mapDefinitionArray($defs);
FileCache::putModeratorQueryResults($ip, $searchResults);
} else {
$searchResults = FileCache::getModeratorQueryResults($ip);
}
smarty_assign('searchResults', $searchResults);
smarty_assign('sectionTitle', 'Căutare definiții');
smarty_assign('allStatuses', util_getAllStatuses());
smarty_assign('recentLinks', RecentLink::loadForUser());
smarty_displayWithoutSkin('admin/definitionList.ihtml');
示例2: mktime
}
if ($nextPageButton) {
$page++;
}
$name = StringUtil::cleanupQuery($name);
$arr = StringUtil::analyzeQuery($name);
$hasDiacritics = $arr[0];
$hasRegexp = $arr[1];
$isAllDigits = $arr[2];
$field = $hasDiacritics ? 'formNoAccent' : 'formUtf8General';
$userId = '';
if ($nick) {
$user = User::get_by_nick($nick);
if ($user) {
$userId = $user->id;
}
}
$beginTime = mktime(0, 0, 0, $mo1, $da1, $yr1);
$endTime = mktime(23, 59, 59, $mo2, $da2, $yr2);
// Query the database and output the results
$defs = Definition::searchModerator($name, $hasDiacritics, $sourceId, $status, $userId, $beginTime, $endTime, $page, RESULTS_PER_PAGE);
$searchResults = SearchResult::mapDefinitionArray($defs);
$args = array('name' => $name, 'status' => $status, 'nick' => $nick, 'sourceId' => $sourceId, 'yr1' => $yr1, 'mo1' => $mo1, 'da1' => $da1, 'yr2' => $yr2, 'mo2' => $mo2, 'da2' => $da2, 'page' => $page);
FileCache::putModeratorQueryResults($ip, array($searchResults, $args));
} else {
list($searchResults, $args) = FileCache::getModeratorQueryResults($ip);
}
SmartyWrap::assign('searchResults', $searchResults);
SmartyWrap::assign('args', $args);
SmartyWrap::assign('recentLinks', RecentLink::loadForUser());
SmartyWrap::displayAdminPage('admin/definitionLookup.tpl');