public function __construct() { parent::__construct(); if ($this->session->check("logged") == false) { $this->redirect("admin/login/nosession/"); } $config = new configuration(); $blogConfig = $config->getBlogConfiguration(); $userConfig = $config->getUserConfiguration(1); $this->conf = $blogConfig; $this->userConf = $userConfig; }
public function __construct() { parent::__construct(); $R = registry::getInstance(); $class = $R->router->getClass(); if ($class["action"] != "login" && $class["action"] != "logout") { if ($this->session->check("logged") == false) { $this->redirect("admin/login/nosession/"); } } $this->plugin->call('admin_init'); $C = new configuration(); $this->blogConfig = $C->getBlogConfiguration(); $this->userConf = $C->getUserConfiguration(1); $this->view->blogConfig = $this->blogConfig; $this->view->userConf = $this->userConf; }