Вход Регистрация
Файл: adultscript-2.0.3-pro/files/mobile/components/kb_view.php
Строк: 24
<?php
defined
('_VALID') or die('Restricted Access!');
class 
VComponent_mobile_kb_view extends VComponent_mobile_kb
{
    public function 
__construct()
    {
        
parent::__construct();
    }
    
    public function 
render()
    {
        if (!
VUri::match('kb/')) {
            
$this->notfound();
        }
    
        if (!
$articles $this->cache->get('popular_articles'3600)) {
            
$this->db->query("
                  SELECT kb_id, kb_title, total_views
                FROM #__kb
                WHERE status = '1'
                ORDER BY total_views DESC
                LIMIT 10
            "
);
            
            if (
$this->db->affected_rows()) {
                
$articles   $this->db->fetch_rows();
                
$this->cache->store('popular_articles'$articles3600);
            } else {
                
$articles   = array();
            }
        }
        
        
VLanguage::load('frontend.kb');
    
        
$this->tpl->menu        'kb';

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

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

        
$this->tpl->articles       $articles;
        
$this->tpl->categories    $this->get_kb_categories();

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