Вход Регистрация
Файл: adultscript-2.0.3-pro/files/mobile/components/kb_search.php
Строк: 24
<?php
defined
('_VALID') or die('Restricted Access!');
class 
VComponent_mobile_kb_category extends VComponent_mobile_kb
{
    public function 
__construct()
    {
        
parent::__construct();
    }
    
    public function 
render()
    {
        if (!
VUri::match('kb/search/')) {
            
$this->notfound();
        }
        
        
$query      = (isset($_GET['s'])) ? VF::factory('filter')->get('s''STRING''GET') : '';
    
        
$this->db->query("
            SELECT kb_id, kb_title, total_views
            FROM #__kb
            WHERE kb_title LIKE '%"
.$this->db->escape($query)."%'
            AND status = '1'
            ORDER BY total_views DESC
            LIMIT 10
        "
);
            
        
$articles   $this->db->fetch_rows();
        
        
VLanguage::load('frontend.kb');
    
        
$this->tpl->menu        'kb';

        
$this->tpl->meta_title  __('search-meta-title').' - '.$this->mcfg['site_name'];

        
$this->tpl->canonical   BASE_URL.'/kb/';

        
$this->tpl->query        $query;
        
$this->tpl->category    '';
        
$this->tpl->articles       $articles;
        
$this->tpl->categories    $this->get_kb_categories();

        
$this->tpl->load(array('header''kb_search''footer'));
        
$this->tpl->display();
    }
}
Онлайн: 2
Реклама