Файл: profile.php
Строк: 44
<?php
define('DIR', dirname(__FILE__));
include_once(DIR.'/core/Base.php');
include_once(DIR.'/model/M_Friendship.php');
class Profile extends Base
{
protected function act_index() {
if(empty($_GET['__query'])) {
if($this->user != null) {
Request::redirect('/'.$this->user['screen_name']);
die();
}
}
$user = $this->mUser->Get($_GET['__query']);
$isCurUser = $this->user['id_user'] == $user['id_user'];
if(!$user) Request::_404();
$isOnline = $user['online'];
Cur::$set['title'] = $user['full_name'];
Cur::$set['htitle'] = $this->view('profile/v_profile_htitle.php', array(
'isOnline' => $isOnline,
'user' => $user
));
$mFship = M_Friendship::Instance(); // Не успел реализовать :(
// ХЕШ для изменения статуса.
Cur::$set['info_hash'] = md5('info&'.Cur::get('id'));
$vars['content'] = $this->view('profile/v_profile_index.php', array(
'user' => $user,
'curUser' => $this->user,
'isCurUser' => $isCurUser
));
$this->setVarsMainTempl($vars);
/*
$content .= $this->view('test/v_test.php', array(
'mTest' => $mTest->test(),
'forFrame' => array(
'to' => 'content'
)
));
*/
$vars['content'] .= $content;
$this->setVarsMainTempl($vars);
Cur::$set['js'] = $this->view('profile/js/js_profile_index.js');
}
} Loader::init(__FILE__);