hackInjectConfig(); $action = $system->getRequest('action'); if (!$user->isLogged()) { $action = 'login'; } if ($action != "ajax") { $user_language = get_user_language ($system->getConfig('id_user')); if (file_exists ('../include/languages/'.$user_language.'.mo')) { $l10n = new gettext_reader (new CachedFileReader('../include/languages/'.$user_language.'.mo')); $l10n->load_tables(); } } // Disable mobile console if ALC enterprise is enabled if ($system->getConfig('enterprise_installed') == 1 && $system->getConfig('acl_enterprise') == 1) { $ui = Ui::getInstance(); $system = System::getInstance(); $ui->createPage(); $ui->createHeader(__('Mobile console disabled')); $ui->showFooter(false); $ui->beginContent(); $ui->contentAddHtml(ui_print_info_message(array('title' => '', 'message' => __('Mobile console is not available with ACL enterprise enabled. Please contact with the administrator.'), 'no_close' => true, 'force_style' => 'margin: 0 auto;'), '', true)); $ui->endContent(); $ui->showPage(); return; } switch ($action) { case 'ajax': $parameter1 = $system->getRequest('parameter1', false); $parameter2 = $system->getRequest('parameter2', false); switch ($parameter1) { case 'events': $events = new Events(); $events->ajax($parameter2); break; case 'agents': $agents = new Agents(); $agents->ajax($parameter2); break; case 'agent': $agent = new Agent(); $agent->ajax($parameter2); break; case 'modules': $modules = new Modules(); $modules->ajax($parameter2); break; case 'module_graph': $module_graph = new ModuleGraph(); $module_graph->ajax($parameter2); break; case 'visualmap': $visualmap = new Visualmap(); $visualmap->ajax($parameter2); case 'tactical': $tactical = new Tactical(); $tactical->ajax($parameter2); break; } return; break; case 'login': if (!$user->checkLogin()) { $user->showLogin(); } else { if ($user->isLogged()) { $user_language = get_user_language ($system->getConfig('id_user')); if (file_exists ('../include/languages/'.$user_language.'.mo')) { $l10n = new gettext_reader (new CachedFileReader('../include/languages/'.$user_language.'.mo')); $l10n->load_tables(); } $home = new Home(); $home->show(); } else { $user->showLoginFail(); } } break; case 'logout': $user->logout(); $user->showLogin(); break; default: $page = $system->getRequest('page', 'home'); switch ($page) { case 'home': default: $home = new Home(); $home->show(); break; case 'tactical': $tactical = new Tactical(); $tactical->show(); break; case 'groups': $groups = new Groups(); $groups->show(); break; case 'events': $events = new Events(); $events->show(); break; case 'alerts': $alerts = new Alerts(); $alerts->show(); break; case 'agents': $agents = new Agents(); $agents->show(); break; case 'modules': $modules = new Modules(); $modules->show(); break; case 'module_graph': $module_graph = new ModuleGraph(); $module_graph->show(); break; case 'agent': $agent = new Agent(); $agent->show(); break; case 'networkmaps': $networkmaps = new Networkmaps(); $networkmaps->show(); break; case 'networkmap': $networkmap = new Networkmap(); $networkmap->show(); break; case 'visualmaps': $visualmaps = new Visualmaps(); $visualmaps->show(); break; case 'visualmap': $visualmap = new Visualmap(); $visualmap->show(); break; } break; } ?>