當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。