Пример #1
0
    }
    $sql .= " WHERE id = " . intval($i);
    $ok = $db->Execute($sql);
    if ($ok) {
        $token = new Token();
        $token->setValue("i", $i);
        $smarty->assign('token', $token->getToken());
        $smarty->display('search_refine.tpl');
        exit;
    }
}
$display = $engine->getDisplayclass();
if (isset($_GET['displayclass']) && preg_match('/^\\w+$/', $_GET['displayclass'])) {
    $display = $_GET['displayclass'];
    if ($USER->registered && $USER->user_id == $engine->criteria->user_id && $_GET['displayclass'] != 'search' && $_GET['displayclass'] != 'searchtext') {
        $engine->setDisplayclass($_GET['displayclass']);
    } else {
        //don't store search override permently
        $engine->temp_displayclass = $display;
    }
}
if (empty($display)) {
    $display = 'full';
}
if (strpos($query['orderby'], ' desc') > 0) {
    $smarty->assign('orderby', preg_replace('/ desc$/', '', $query['orderby']));
    $smarty->assign('reverse_order_checked', 'checked="checked"');
} else {
    $smarty->assign('orderby', $query['orderby']);
}
$smarty->assign('breakby', $query['breakby']);