Пример #1
0
 } elseif (isset($_REQUEST['searchbycacheid'])) {
     $options['searchtype'] = 'bycacheid';
     $options['cacheid'] = isset($_REQUEST['cacheid']) ? $_REQUEST['cacheid'] : 0;
     if (!is_numeric($options['cacheid'])) {
         $options['cacheid'] = 0;
     }
 } elseif (isset($_REQUEST['searchbywp'])) {
     $options['searchtype'] = 'bywp';
     $options['wp'] = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
 } elseif (isset($_REQUEST['searchbynofilter'])) {
     $options['searchtype'] = 'bynofilter';
 } elseif (isset($_REQUEST['searchbylist'])) {
     $options['searchtype'] = 'bylist';
     $options['listid'] = isset($_REQUEST['listid']) ? $_REQUEST['listid'] + 0 : 0;
     $list = new cachelist($options['listid']);
     if (!$list->exist() || !$list->isMyList() && $list->getVisibility() == 0) {
         $tpl->redirect("cachelists.php");
     }
     $options['cachelist'] = cachelist::getListById($options['listid']);
     // null for invalid ID
 } elseif (isset($_REQUEST['searchall'])) {
     if (!$login->logged_in()) {
         // This operation is very expensive and therefore available only
         // for logged-in users.
         $tpl->error(ERROR_LOGIN_REQUIRED);
     } else {
         $options['searchtype'] = 'all';
     }
 } else {
     if (isset($_REQUEST['showresult'])) {
         $tpl->error('unknown search option');