本文整理汇总了PHP中Results::launch方法的典型用法代码示例。如果您正苦于以下问题:PHP Results::launch方法的具体用法?PHP Results::launch怎么用?PHP Results::launch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Results
的用法示例。
在下文中一共展示了Results::launch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: launch
function launch()
{
global $module;
global $action;
global $interface;
//Get the search source and determine what to show.
$searchSource = isset($_REQUEST['searchSource']) ? $_REQUEST['searchSource'] : 'local';
//Check the search source
if (preg_match('/library\\d+/', $searchSource)) {
require_once ROOT_DIR . '/Drivers/marmot_inc/LibrarySearchSource.php';
$trimmedId = str_replace('library', '', $searchSource);
$searchSource = new LibrarySearchSource();
$searchSource->id = $trimmedId;
if ($searchSource->find(true)) {
if ($searchSource->searchWhat == 'catalog') {
require_once ROOT_DIR . '/services/Search/Results.php';
$module = 'Search';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
$results = new Search_Results();
$results->launch();
} elseif ($searchSource->searchWhat == 'genealogy') {
require_once ROOT_DIR . '/services/Genealogy/Results.php';
$module = 'Search';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
$results = new Results();
$results->launch();
} elseif ($searchSource->searchWhat == 'tags') {
require_once ROOT_DIR . '/services/Search/Results.php';
$module = 'Search';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
$_REQUEST['basicType'] = 'tag';
$results = new Search_Results();
$results->launch();
} elseif ($searchSource->searchWhat == 'title_browse' || $searchSource->searchWhat == 'author_browse' || $searchSource->searchWhat == 'subject_browse') {
require_once ROOT_DIR . '/services/AlphaBrowse/Results.php';
$module = 'AlphaBrowse';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
$results = new AlphaBrowse_Results();
$results->launch();
} else {
$searchSources = new SearchSources();
$type = isset($_REQUEST['basicType']) ? $_REQUEST['basicType'] : $_REQUEST['type'];
$lookfor = isset($_REQUEST['lookfor']) ? $_REQUEST['lookfor'] : '';
$link = $searchSources->getExternalLink($searchSource, $type, $lookfor);
header('Location: ' . $link);
die;
}
}
} else {
$searchSources = new SearchSources();
$searches = $searchSources->getSearchSources();
if (!isset($searches[$searchSource]) && $searchSource == 'marmot') {
$searchSource = 'local';
}
$searchInfo = $searches[$searchSource];
if (isset($searchInfo['external']) && $searchInfo['external'] == true) {
//Reset to a local search source so the external search isn't remembered
$_SESSION['searchSource'] = 'local';
//Need to redirect to the appropriate search location with the new value for look for
$type = isset($_REQUEST['basicType']) ? $_REQUEST['basicType'] : $_REQUEST['type'];
$lookfor = isset($_REQUEST['lookfor']) ? $_REQUEST['lookfor'] : '';
$filters = isset($_REQUEST['filter']) ? $_REQUEST['filter'] : null;
$link = $searchSources->getExternalLink($searchSource, $type, $lookfor);
header('Location: ' . $link);
die;
} else {
if ($searchSource == 'genealogy') {
require_once ROOT_DIR . '/services/Genealogy/Results.php';
$module = 'Search';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
$results = new Results();
$results->launch();
} else {
$type = isset($_REQUEST['basicType']) ? $_REQUEST['basicType'] : (isset($_REQUEST['type']) ? $_REQUEST['type'] : 'Keyword');
if (strpos($type, 'browse') === 0) {
require_once ROOT_DIR . '/services/AlphaBrowse/Results.php';
$module = 'AlphaBrowse';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
$results = new AlphaBrowse_Results();
$results->launch();
} else {
require_once ROOT_DIR . '/services/Search/Results.php';
$module = 'Search';
$interface->assign('module', $module);
$action = 'Results';
$interface->assign('action', $action);
if ($searchSource == 'econtent') {
if (!isset($_REQUEST['shard'])) {
//.........这里部分代码省略.........