/** * The before() method is called before controller action * * @uses ACL::required */ public function before() { ACL::required('administer comment'); $this->_destination = '?destination=' . Route::get('admin/comment')->uri(array('action' => $this->request->action())); $this->_form_action = Route::get('admin/comment')->uri(array('action' => 'process')) . $this->_destination; parent::before(); }
public function before() { parent::before(); if ($this->current_user->group->id != 6) { \Response::redirect('admin'); } }
public function before() { parent::before(); $this->template->scripts[] = 'media/js/jquery-1.6.2.min.js'; $this->template->scripts[] = 'media/js/jquery.MultiFile.pack.js'; $this->template->scripts[] = 'media/js/upload.js'; }
public function before() { parent::before(); if (!$this->auth->logged_in('admin')) { header('Location: /auto/login'); exit; } }
public function before() { parent::before(); if (is_null($this->_model)) { throw new Extasy_Exception('Model not defined'); } $this->template->set_layout(Kohana::$config->load('layout')->admin); }
public function before() { Core::close_buffers(false); $this->phprpc = PHPRPC::server(); $this->auto_add_action(); $this->before_start(); if (IS_DEBUG) { $this->phprpc->setDebugMode(true); } $this->phprpc->start(); parent::before(); }
public function before() { parent::before(); $this->template->title = 'Видео'; \View::set_global('subnav', array('videos' => 'active')); }
public function action_login() { if (HTTP_Request::POST == $this->request->method() && Security::check(Arr::get($this->request->post(), 'csrf', '')) && Captcha::valid($_POST['captcha'])) { $remember = array_key_exists('remember', $this->request->post()) ? (bool) $this->request->post('remember') : FALSE; $user = Auth::instance()->login($this->request->post('username'), $this->request->post('password'), $remember); if ($user) { HTTP::redirect($this->config->get('admin_url')); } else { Session::instance()->set('error', 'Логин или пароль не верный'); $errors = array('Логин или пароль не верный.'); } } $this->template = 'login'; parent::before(); $captcha = Captcha::instance(); $csrf = Security::token(true); $this->template->title = 'Вход в админ панель'; $this->template->bind('errors', $errors)->bind('csrf', $csrf)->bind('captcha', $captcha); $errors = null; if (Auth::instance()->get_user()) { $auth = Auth::instance(); $has_admin_role = $auth->logged_in('admin'); if ($has_admin_role) { $session = Session::instance(); $session->set('redirectAfterLogin', $_SERVER['REQUEST_URI']); HTTP::redirect('/' . $this->admin_url . '/'); } } }
/** * The before() method is called before controller action * * @uses ACL::required */ public function before() { ACL::required('administer users'); parent::before(); }
public function before() { parent::before(); list(, $this->user_id) = Auth::get_user_id(); }
public function before() { $this->template = Session::get('template'); parent::before(); }
/** * Get upload base */ public function before() { parent::before(); $this->_base = DOCROOT . Kohana::config('cms.upload.folder') . '/'; }
public function before() { parent::before(); \View::set_global('subnav', array('competitions' => 'active')); $this->template->title = "Сезоны"; }
public function before() { parent::before(); Breadcrumbs::instance()->add('Management', 'admin')->add('Announcements', 'admin/announcements'); }
public function before() { parent::before(); $menu = Request::factory('widgets/menu')->execute(); $this->template->block_left = array($menu); }
public function before() { parent::before(); \View::set_global('subnav', array('media' => 'active')); }
public function before() { parent::before(); $this->template->title = "Фотогалереи"; \View::set_global('subnav', array('media' => 'active')); }
public function before() { parent::before(); $config_main = (array) Kohana::$config->load('main'); $this->admin_url = $config_main['admin_url']; }
public function before() { parent::before(); $this->template->title = 'Голосования'; \View::set_global('subnav', array('votes' => 'active')); }
public function before() { parent::before(); $this->template->title = "Команда"; \View::set_global('subnav', array('players' => 'active')); }
public function before() { parent::before(); $this->template->scripts = array('media/js/jquery-1.7.2.min.js', 'media/tinymce/tinymce.min.js', 'media/js/edit_tech.js'); $this->template->submenu = Widget::load('SubMenuMain'); }
public function before() { //parent::before(); $this->_paginationConfig = array('prev_img' => Asset::img('pagination/prev.png', array("alt" => "Previous", 'class' => "prev-img")), 'prev_img_active' => Asset::img('pagination/prev.png', array("alt" => "Previous", 'class' => "prev-img-active")), 'first_img' => Asset::img('pagination/first.png', array("alt" => "first", 'class' => "first-img")), 'first_img_active' => Asset::img('pagination/first.png', array("alt" => "first", 'class' => "first-img-active")), 'next_img' => Asset::img('pagination/next.png', array("alt" => "Next", 'class' => "next-img")), 'next_img_active' => Asset::img('pagination/next.png', array("alt" => "Next", 'class' => "next-img-active")), 'last_img' => Asset::img('pagination/last.png', array("alt" => "Last", 'class' => "last-img")), 'last_img_active' => Asset::img('pagination/last.png', array("alt" => "Last", 'class' => "last-img-active")), 'css_id_prefix' => 'Dates', 'ajax_method' => 'loadDatesGrid', 'limit_default' => 30, 'limiter_choices' => array(30, 60, 100), 'limiter_prefix' => 'Dates'); parent::before(); }
public function before() { parent::before(); }
public function before() { parent::before(); $this->template->submenu = null; }