Вход Регистрация
Файл: adultscript-2.0.3-pro/files/modules/user/components/videos.php
Строк: 34
<?php
defined
('_VALID') or die('Restricted Access!');
class 
VComponent_user_videos extends VModule_user
{
    public function 
__construct()
    {
        
parent::__construct();
    }
    
    public function 
render()
    {
        
VAuth::check('Registered');
        
        
$user_id        = (int) $_SESSION['user_id'];
        
$page            = (isset($_GET['page'])) ? (int) $_GET['page'] : 1;
        
        
$sql_count        "SELECT COUNT(*) AS total_videos
                             FROM #__video
                           WHERE user_id = "
.$user_id."
                           AND status = 1"
;
        
$total_videos    $this->db->get_field($sql_count'total_videos');
        
$pagination        VPagination::get($page$total_videos20);
        
$sql            "SELECT video_id, title, slug, likes, rating, rated_by, ext,
                                  thumb, thumbs, duration, total_views, add_time, hd
                           FROM #__video
                           WHERE user_id = "
.$user_id."
                           AND status = 1
                           ORDER BY video_id DESC
                           LIMIT "
.$pagination['limit'];
        
$videos            $this->db->get_rows($sql);
    
        
$this->tpl->menu        'community';
        
$this->tpl->colmenu        'manage';
        
$this->tpl->submenu        'user-videos';
        
        
$this->tpl->title        e(__('my-videos'));
        
$this->tpl->meta_title    __('my-videos');
        
        
$this->tpl->videos        $videos;
        
$this->tpl->pagination    $pagination;
        
        
$this->tpl->load(array('header''user_videos''footer'));
        
$this->tpl->display();
    }
}
Онлайн: 1
Реклама