Beispiel #1
0
         $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;
     $password = isset($_REQUEST['listkey']) ? $_REQUEST['listkey'] : '';
     $list = new cachelist($options['listid']);
     if (!$list->allowView($password)) {
         $tpl->redirect("cachelists.php");
     }
     $options['cachelist'] = cachelist::getListById($options['listid']);
     // null for invalid ID
     $options['cachelist_pw'] = $password;
 } elseif (isset($_REQUEST['searchall'])) {
     if (!$login->logged_in() && !(isset($_REQUEST['country']) && $_REQUEST['country'] != '') && !(isset($_REQUEST['language']) && $_REQUEST['language'] != '')) {
         // 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');
     } else {
         // Set default search type; this prevents errors in outputSearchForm()