Пример #1
0
    $contentTypes = array('' => tra('All Content'));
    foreach ($gLibertySystem->mContentTypes as $cType) {
        $contentTypes[$cType['content_type_guid']] = $gLibertySystem->getContentTypeName($cType['content_type_guid']);
    }
}
asort($contentTypes);
$gBitSmarty->assign('contentTypes', $contentTypes);
if (!empty($_REQUEST["highlight"])) {
    $_REQUEST["words"] = $_REQUEST["highlight"];
} else {
    // a nice big, groovy search will be cool to have one day...
    $gBitSystem->display('bitpackage:search/search.tpl', 'Search', array('display_mode' => 'display'));
    die;
}
if ($gBitSystem->isFeatureActive("search_stats")) {
    $searchlib->register_search(isset($_REQUEST["words"]) ? $_REQUEST["words"] : '');
}
if (!isset($_REQUEST["content_type_guid"])) {
    $_REQUEST["content_type_guid"] = '';
    $where2 = "Page";
} else {
    $where2 = $contentTypes[$_REQUEST["content_type_guid"]];
}
LibertyContent::prepGetList($_REQUEST);
if (isset($_REQUEST['usePart']) && $_REQUEST['usePart'] == 'on') {
    $_REQUEST['usePart'] = true;
} else {
    $_REQUEST['usePart'] = false;
}
$gBitSmarty->assign('usePart', $_REQUEST['usePart']);
$gBitSmarty->assign('searchType', $_REQUEST['usePart'] ? "Using Partial Word Search" : "Using Exact Word Search");