Beispiel #1
0
 function SB_Writer_search()
 {
     parent::__construct();
     $this->switches['flat'] = 1;
     $this->tree->sortMode = 'hits';
     $this->search = SB_safeVal($_COOKIE, 'SB3SEARCH');
     if (SB_reqChk('q') != '') {
         $this->search = SB_reqVal('q');
     }
     $this->type = $this->um->getParam('user', 'default_search');
     // Check search pattern
     if (preg_match("/^(url|desc|name|all):(.*)\$/i", $this->search, $matches)) {
         $this->type = $matches[1];
         // If we have pattern then use it
         if ($this->type == 'url' || $this->type == 'desc' || $this->type == 'name' || $this->type == 'all') {
             $this->search = $matches[2];
         }
     }
     $url = $this->um->getParamB64('user', 'search_engine_url');
     $url = str_replace('%SEARCH%', $this->search, $url);
     $url = str_replace('%BASEURL%', urlencode(SB_Page::absBaseUrlShort()), $url);
     $url = str_replace('%LOGO%', urlencode(SB_Page::absBaseUrl() . SB_Skin::imgsrc('logo')), $url);
     $this->engineURL = $url;
     // We would not get here if no engine is specified
     if ($this->um->getParam('user', 'hide_xslt') || SB_reqVal("web") == 1) {
         header('Location: ' . $this->engineURL);
         exit;
     }
 }
Beispiel #2
0
 function SB_Writer_news()
 {
     parent::__construct();
     $this->switches['flat'] = 1;
 }