Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: da2fda3964
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (30 sloc) 1.111 kb
<?php defined('SYSPATH') or die('No direct script access.');
/**
* @author d1ffuz0r gladk0w@mail.ru
* @license GPLv3
* @copyright 2011
*/
class Controller_Admin extends Controller_Tpl
{
/**
* @param POST читаем имя пользователя
* @return HTML выводим главную страницы админки
* @111
*/
public function action_index()
{
$username = Cookie::get('username');
$user = Model::factory('users');
if($user->get_rang($username) == 1)
{
$this->template->title = __('Администратор');
$this->template->content = View::factory('admin/index');
}
else
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
->set('msg',Kohana::message('msg', 'no_access'));
}
}
}
Jump to Line
Something went wrong with that request. Please try again.