public function showPage($selected = '') { if (!FUTURI_Session::isUserAdmin()) { $this->load->view("nopermission_admin"); } $this->load->view("admin_header", array('selected' => $selected)); switch ($selected) { case "usuarios": include "application/controllers/User.php"; define_constants(); $userController = new User(); $userController->showListPage('', 10, false); break; case "estatisticas": break; case "backups": include "application/controllers/Backup.php"; define_constants(); $backupController = new Backup(); $backupController->showListPage('', 10, false); break; case "configs": $this->load->view("admin_configs", array("object_handler" => $this)); break; case "relatorios": include "application/controllers/Report.php"; define_constants(); $reportController = new Report(); $reportController->showListPage('', 10, false); break; case "graficos": include "application/controllers/Chart.php"; define_constants(); $chartController = new Chart(); $chartController->showListPage('', 10, false); break; } }