Пример #1
0
$gBitSmarty->assign('usePart', $_REQUEST['usePart']);
$gBitSmarty->assign('searchType', $_REQUEST['usePart'] ? "Using Partial Word Search" : "Using Exact Word Search");
if (isset($_REQUEST['useAnd']) && $_REQUEST['useAnd'] == 'on') {
    $_REQUEST['useAnd'] = true;
} else {
    $_REQUEST['useAnd'] = false;
}
$gBitSmarty->assign('useAnd', $_REQUEST['useAnd']);
// Build the query using words
if (!isset($_REQUEST["words"]) || empty($_REQUEST["words"])) {
    $_REQUEST["words"] = '';
} else {
    $_REQUEST["words"] = strip_tags($_REQUEST["words"]);
}
$gBitSmarty->assign('words', $_REQUEST["words"]);
$results = $searchlib->find($_REQUEST);
if ($_REQUEST['cant'] != 1) {
    $where2 .= "s";
}
$gBitSmarty->assign('where2', tra($where2));
$gBitSmarty->assign('content_type_guid', $_REQUEST["content_type_guid"]);
$stubContent = new LibertyContent();
if ($_REQUEST['cant'] > 0) {
    foreach (array_keys($results) as $k) {
        if (empty($results[$k]['title'])) {
            $date_format = $gBitSystem->get_long_date_format();
            if ($gBitSystem->mServerTimestamp->get_display_offset()) {
                $date_format = preg_replace("/ ?%Z/", "", $date_format);
            } else {
                $date_format = preg_replace("/%Z/", "UTC", $date_format);
            }