当前位置: 首页>>代码示例>>PHP>>正文


PHP Definition::searchModerator方法代码示例

本文整理汇总了PHP中Definition::searchModerator方法的典型用法代码示例。如果您正苦于以下问题:PHP Definition::searchModerator方法的具体用法?PHP Definition::searchModerator怎么用?PHP Definition::searchModerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Definition的用法示例。


在下文中一共展示了Definition::searchModerator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: util_assertModerator

<?php

require_once "../../phplib/util.php";
util_assertModerator(PRIV_EDIT);
util_assertNotMirror();
RecentLink::createOrUpdate('Definiții nemoderate');
$sourceId = 0;
$sourceUrlName = util_getRequestParameter('source');
if ($sourceUrlName) {
    $source = $sourceUrlName ? Source::get_by_urlName($sourceUrlName) : null;
    $sourceId = $source ? $source->id : 0;
    smarty_assign('src_selected', $sourceId);
}
$ip = $_SERVER['REMOTE_ADDR'];
$defs = Definition::searchModerator('*', '', $sourceId, ST_PENDING, 0, 0, time());
$searchResults = SearchResult::mapDefinitionArray($defs);
FileCache::putModeratorQueryResults($ip, $searchResults);
smarty_assign('searchResults', $searchResults);
smarty_assign('sectionTitle', 'Definiții nemoderate');
smarty_assign('allStatuses', util_getAllStatuses());
smarty_assign('recentLinks', RecentLink::loadForUser());
smarty_displayWithoutSkin('admin/definitionList.ihtml');
开发者ID:nastasie-octavian,项目名称:DEXonline,代码行数:22,代码来源:viewPendingDefinitions.php

示例2: 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');
开发者ID:nastasie-octavian,项目名称:DEXonline,代码行数:31,代码来源:definitionLookup.php

示例3: 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');
开发者ID:florinp,项目名称:dexonline,代码行数:31,代码来源:definitionLookup.php


注:本文中的Definition::searchModerator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。