public function init() { parent::init(); if (!isset($_SESSION["login"])) { $_SESSION["login"] = LOGIN_NULL; } if ($_SESSION["login"] != LOGIN_OK && $_GET["a"] != "login") { $this->login_get(); exit; } if (isset($_SESSION["username"])) { $this->assign("username", $_SESSION["username"]); } }