Вход Регистрация
Файл: adultscript-2.0.3-pro/files/mobile/components/video_playlists.php
Строк: 36
<?php
defined
('_VALID') or die('Restricted Access!');
class 
VComponent_mobile_video_playlists extends VComponent_mobile_video
{
    public function 
__construct()
    {
        
parent::__construct();
    }
    
    public function 
render()
    {
        if (!
VCfg::get('video.playlists')) {
            
$this->notfound('Playlists disabled!');
        }    
    
        
$page                = (VUri::request(1)) ? (int) VUri::request(1) : 1;
    
        
$sql                = "SELECT p.playlist_id, p.user_id, p.name, p.type, p.slug, p.likes, p.rated_by,
                                      p.total_videos, p.total_views, p.duration, p.thumb_id, v.thumb, v.slug as vslug
                               FROM #__playlist AS p
                               LEFT JOIN #__video AS v ON (v.video_id = p.thumb_id AND v.status = 1)"
;
        
$sql_count          = "SELECT COUNT(*) AS total_playlists
                               FROM #__playlist AS p"
;

        
$total_playlists    = $this->db->get_field($sql_count, 'total_playlists');
        
$pagination            = VPagination::get($page, $total_playlists, 10);
        
$playlists            = $this->db->get_rows($sql." LIMIT ".$pagination['limit']);
    
        
$page_add        = ($page > 1) ? ' - '.__('page').' '.$page : '';
    
        
$this->tpl->menu        = 'video';

        
$this->tpl->title        = __('playlists-title', array($page_add));
        
$this->tpl->meta_title    = __('playlists-meta-title', array($page_add, $this->mcfg['site_name']));
        
$this->tpl->meta_desc    = __('playlists-meta-desc', array($page_add, $this->mcfg['meta_desc']));
        
$this->tpl->meta_keys    = __('playlists-meta-keys');

        
$this->tpl->canonical    = BASE_URL.'/playlists/';

        
$this->tpl->page        = $page;
        
$this->tpl->playlists    = $playlists;
        
$this->tpl->pagination    = $pagination;
        
        
$this->tpl->load(array('header', 'video_playlists', 'footer'));
        
$this->tpl->display();
    }
}
Онлайн: 2
Реклама