Файл: adultscript-2.0.3-pro/files/modules/profile/components/connections.php
Строк: 62
<?php
class VComponent_profile_connections extends VModule_profile
{
public function __construct()
{
parent::__construct();
}
public function render()
{
if (!VUri::match('users/'.$this->username.'/connections/')) {
VModule::load('404', true);
}
if (!$this->profile($this->username)) {
return false;
}
VLanguage::load('frontend.global');
VLanguage::load('frontend.profile');
$user_id = $this->user['user_id'];
if ($this->show($this->user['show_friends'])) {
if ($this->tpl->total_friends = $this->get_friends_count($user_id)) {
$this->tpl->friends = $this->get_friends($user_id, 8);
}
}
if ($this->show($this->user['show_subscribers'])) {
if ($this->tpl->total_subscribers = $this->get_subscribers_count($user_id)) {
$this->tpl->subscribers = $this->get_subscribers($user_id, 8);
}
}
if ($this->show($this->user['show_subscriptions'])) {
if ($this->tpl->total_subscriptions = $this->get_subscriptions_count($user_id)) {
$this->tpl->subscriptions = $this->get_subscriptions($user_id, 8);
}
}
$this->tpl->menu = 'community';
$this->tpl->submenu = 'connections';
$this->tpl->meta_title = __('connections-meta-title', array($this->username, VF::cfg_item('site_name')));
$this->tpl->meta_title = __('connections-meta-desc', array($this->username, VF::cfg_item('site_name')));
$this->tpl->user = $this->user;
$this->tpl->username = e($this->username);
$this->tpl->is_subscribed = $this->is_subscribed;
$this->tpl->is_friend = $this->is_friend;
$this->tpl->is_self = $this->is_self;
$this->tpl->is_moderator = $this->is_moderator;
$this->tpl->is_loggedin = $this->is_loggedin;
$this->tpl->is_blocked = $this->is_blocked;
$this->tpl->load(array('header', 'profile', 'footer'));
$this->tpl->display();
}
}