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


PHP SearchHandler::_assignAdvancedSearchParameters方法代码示例

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


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

示例1: advancedResults

 /**
  * Show advanced search results.
  */
 function advancedResults()
 {
     parent::validate();
     SearchHandler::setupTemplate(true);
     $rangeInfo = Handler::getRangeInfo('search');
     $publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
     $searchConferenceId = Request::getUserVar('searchConference');
     if (!empty($searchConferenceId)) {
         $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
         $conference =& $conferenceDao->getConference($searchConferenceId);
         $yearRange = $publishedPaperDao->getPaperYearRange($conference->getId());
     } else {
         $conference =& Request::getConference();
         $yearRange = $publishedPaperDao->getPaperYearRange(null);
     }
     // Load the keywords array with submitted values
     $keywords = array(null => PaperSearch::parseQuery(Request::getUserVar('query')));
     $keywords[PAPER_SEARCH_AUTHOR] = PaperSearch::parseQuery(Request::getUserVar('author'));
     $keywords[PAPER_SEARCH_TITLE] = PaperSearch::parseQuery(Request::getUserVar('title'));
     $keywords[PAPER_SEARCH_DISCIPLINE] = PaperSearch::parseQuery(Request::getUserVar('discipline'));
     $keywords[PAPER_SEARCH_SUBJECT] = PaperSearch::parseQuery(Request::getUserVar('subject'));
     $keywords[PAPER_SEARCH_TYPE] = PaperSearch::parseQuery(Request::getUserVar('type'));
     $keywords[PAPER_SEARCH_COVERAGE] = PaperSearch::parseQuery(Request::getUserVar('coverage'));
     $keywords[PAPER_SEARCH_GALLEY_FILE] = PaperSearch::parseQuery(Request::getUserVar('fullText'));
     $keywords[PAPER_SEARCH_SUPPLEMENTARY_FILE] = PaperSearch::parseQuery(Request::getUserVar('supplementaryFiles'));
     $fromDate = Request::getUserDateVar('dateFrom', 1, 1);
     if ($fromDate !== null) {
         $fromDate = date('Y-m-d H:i:s', $fromDate);
     }
     $toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
     if ($toDate !== null) {
         $toDate = date('Y-m-d H:i:s', $toDate);
     }
     $results =& PaperSearch::retrieveResults($conference, $keywords, $fromDate, $toDate, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->setCacheability(CACHEABILITY_NO_STORE);
     $templateMgr->assign_by_ref('results', $results);
     SearchHandler::_assignAdvancedSearchParameters($templateMgr, $yearRange);
     $templateMgr->display('search/searchResults.tpl');
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:43,代码来源:SearchHandler.inc.php


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