admin)) { throw new Exception("Unauthorized", 401); } // For now, in order not to duplicate js and css, keep the regular ("item") // theme in addition to admin theme. $item_theme_name = module::get_var("core", "active_theme", "default"); $item_theme = new Theme_View("album.html", "album", $item_theme_name); // giving default is probably overkill $theme_name = module::get_var("core", "active_admin_theme", "default_admin"); $this->template = new Theme_View("admin.html", "admin", $theme_name); $this->template->item_theme = $item_theme; parent::__construct(); } public function dashboard() { $this->template->subpage = "dashboard.html"; print $this->template; } public function list_users() { $this->template->set_global("users", ORM::factory("user")->find_all()); $this->template->subpage = "list_users.html"; print $this->template; } }