Вход Регистрация
Файл: adultscript-2.0.3-pro/files/modules/user/components/subscribers.php
Строк: 37
<?php
defined
('_VALID') or die('Restricted Access!');
class 
VComponent_user_subscribers 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_subs
                           FROM #__user_subscriptions
                           WHERE user_id = "
.$user_id;
        
$total_subs     $this->db->get_field($sql_count'total_subs');
        
$pagination     VPagination::get($page$total_subs20);
        
$sql            "SELECT u.user_id, u.username, u.avatar, u.gender, u.online
                           FROM #__user_subscriptions AS us
                           LEFT JOIN #__user AS u ON (us.subscriber_id = u.user_id)
                           WHERE us.user_id = "
.$user_id."
                           ORDER BY us.add_date DESC
                           LIMIT "
.$pagination['limit'];
        
$users          $this->db->get_rows($sql);

        
$this->tpl->menu              'home';
        
$this->tpl->colmenu            'manage';        
        
$this->tpl->submenu           'user-subscribers';

        
$this->tpl->title            __('my-subscribers');
        
$this->tpl->meta_title        __('my-subscribers');

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