2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
< ? php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
2013-03-15 15:50:47 +01:00
//Set character encoding to UTF-8 - fixes a lot of multibyte character
//headaches
2012-01-10 05:46:09 +01:00
if ( function_exists ( 'mb_internal_encoding' )) {
2012-05-31 23:31:11 +02:00
mb_internal_encoding ( " UTF-8 " );
2012-01-10 05:46:09 +01:00
}
2016-09-30 10:32:48 +02:00
$develop_bypass = 0 ;
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
2013-03-15 15:50:47 +01:00
require_once ( " include/ui.class.php " );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
require_once ( " include/system.class.php " );
2013-03-15 15:50:47 +01:00
require_once ( " include/db.class.php " );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
require_once ( " include/user.class.php " );
2013-03-15 15:50:47 +01:00
require_once ( 'operation/home.php' );
require_once ( 'operation/tactical.php' );
require_once ( 'operation/groups.php' );
require_once ( 'operation/events.php' );
2013-03-20 18:41:35 +01:00
require_once ( 'operation/alerts.php' );
2013-03-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions_groups.php:
changes for to use in the calls in mobile version.
* mobile/index.php, mobile/operation/events.php,
mobile/operation/modules.php, mobile/operation/events,
mobile/operation/events/events.php, mobile/operation/agents.php,
mobile/operation/tactical.php, mobile/operation/alerts.php,
mobile/include/style/main.css, mobile/include/ui.class.php,
mobile/include/user.class.php: changes and improves in the code
of mobile.
* mobile/operation/agents/*, mobile/operation/servers/*: removed
the old files from version pandora mobile 4.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-26 18:24:10 +01:00
require_once ( 'operation/agents.php' );
require_once ( 'operation/modules.php' );
2013-04-04 19:44:07 +02:00
require_once ( 'operation/module_graph.php' );
2013-04-09 11:29:03 +02:00
require_once ( 'operation/agent.php' );
2013-07-03 10:50:50 +02:00
require_once ( 'operation/networkmaps.php' );
require_once ( 'operation/networkmap.php' );
2014-02-06 18:39:39 +01:00
require_once ( 'operation/visualmaps.php' );
require_once ( 'operation/visualmap.php' );
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
$enterpriseHook = enterprise_include ( 'mobile/include/enterprise.class.php' );
2016-10-24 11:58:19 +02:00
$enterpriseHook = enterprise_include ( 'mobile/operation/dashboard.php' );
2014-10-15 18:12:51 +02:00
$enterpriseHook = enterprise_include ( 'mobile/operation/home.php' );
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
2016-08-12 13:35:22 +02:00
if ( ! empty ( $config [ " https " ]) && empty ( $_SERVER [ 'HTTPS' ])) {
$query = '' ;
if ( sizeof ( $_REQUEST ))
//Some (old) browsers don't like the ?&key=var
$query .= 'mobile/index.php?1=1' ;
//We don't clean these variables up as they're only being passed along
foreach ( $_GET as $key => $value ) {
if ( $key == 1 )
continue ;
$query .= '&' . $key . '=' . $value ;
}
foreach ( $_POST as $key => $value ) {
$query .= '&' . $key . '=' . $value ;
}
$url = ui_get_full_url ( $query );
// Prevent HTTP response splitting attacks
// http://en.wikipedia.org/wiki/HTTP_response_splitting
$url = str_replace ( " \n " , " " , $url );
header ( 'Location: ' . $url );
exit ; //Always exit after sending location headers
}
2013-03-15 15:50:47 +01:00
$system = System :: getInstance ();
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
2016-09-23 11:57:07 +02:00
//~ In this moment doesn't work the version mobile when have metaconsole version.
//~ In the future versions of pandora maybe is added a mobile version of PandoraFMS Metaconsole version.
2016-09-28 16:56:05 +02:00
//~ if ($system->getConfig('metaconsole'))
//~ header ("Location: " . $system->getConfig('homeurl') . "enterprise/meta");
2016-09-23 11:57:07 +02:00
2014-12-15 13:47:33 +01:00
require_once ( $system -> getConfig ( 'homedir' ) . '/include/constants.php' );
2013-03-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions_groups.php:
changes for to use in the calls in mobile version.
* mobile/index.php, mobile/operation/events.php,
mobile/operation/modules.php, mobile/operation/events,
mobile/operation/events/events.php, mobile/operation/agents.php,
mobile/operation/tactical.php, mobile/operation/alerts.php,
mobile/include/style/main.css, mobile/include/ui.class.php,
mobile/include/user.class.php: changes and improves in the code
of mobile.
* mobile/operation/agents/*, mobile/operation/servers/*: removed
the old files from version pandora mobile 4.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-26 18:24:10 +01:00
$user = User :: getInstance ();
2015-10-15 13:45:51 +02:00
if ( ! is_object ( $user ) && gettype ( $user ) == 'object' ) {
$user = unserialize ( serialize ( $user ));
}
2014-12-15 13:47:33 +01:00
$user -> saveLogin ();
2012-01-10 05:46:09 +01:00
2014-10-15 18:12:51 +02:00
$page = $system -> getRequest ( 'page' , 'home' );
2013-03-15 15:50:47 +01:00
$action = $system -> getRequest ( 'action' );
2014-12-15 13:47:33 +01:00
// The logout action has priority
if ( $action != 'logout' ) {
if ( ! $user -> isLogged ()) {
$action = 'login' ;
}
else if ( $user -> isWaitingDoubleAuth ()) {
$dauth_period = SECONDS_2MINUTES ;
$now = time ();
$dauth_time = $user -> getLoginTime ();
if ( $now - $dauth_period < $dauth_time ) {
$action = 'double_auth' ;
}
// Expired login
else {
$action = 'logout' ;
}
}
2012-01-10 05:46:09 +01:00
}
2013-05-04 02:29:16 +02:00
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 ();
}
}
2013-03-15 15:50:47 +01:00
switch ( $action ) {
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
case 'ajax' :
$parameter1 = $system -> getRequest ( 'parameter1' , false );
$parameter2 = $system -> getRequest ( 'parameter2' , false );
2014-10-15 18:12:51 +02:00
if ( class_exists ( " Enterprise " )) {
$enterprise = Enterprise :: getInstance ();
$permission = $enterprise -> checkEnterpriseACL ( $parameter1 );
if ( ! $permission ) {
return false ;
}
}
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
switch ( $parameter1 ) {
case 'events' :
$events = new Events ();
$events -> ajax ( $parameter2 );
break ;
2013-03-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions_groups.php:
changes for to use in the calls in mobile version.
* mobile/index.php, mobile/operation/events.php,
mobile/operation/modules.php, mobile/operation/events,
mobile/operation/events/events.php, mobile/operation/agents.php,
mobile/operation/tactical.php, mobile/operation/alerts.php,
mobile/include/style/main.css, mobile/include/ui.class.php,
mobile/include/user.class.php: changes and improves in the code
of mobile.
* mobile/operation/agents/*, mobile/operation/servers/*: removed
the old files from version pandora mobile 4.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-26 18:24:10 +01:00
case 'agents' :
$agents = new Agents ();
$agents -> ajax ( $parameter2 );
break ;
2014-02-10 18:03:08 +01:00
case 'agent' :
$agent = new Agent ();
$agent -> ajax ( $parameter2 );
break ;
2013-03-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions_groups.php:
changes for to use in the calls in mobile version.
* mobile/index.php, mobile/operation/events.php,
mobile/operation/modules.php, mobile/operation/events,
mobile/operation/events/events.php, mobile/operation/agents.php,
mobile/operation/tactical.php, mobile/operation/alerts.php,
mobile/include/style/main.css, mobile/include/ui.class.php,
mobile/include/user.class.php: changes and improves in the code
of mobile.
* mobile/operation/agents/*, mobile/operation/servers/*: removed
the old files from version pandora mobile 4.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-26 18:24:10 +01:00
case 'modules' :
$modules = new Modules ();
$modules -> ajax ( $parameter2 );
break ;
2013-04-04 19:44:07 +02:00
case 'module_graph' :
$module_graph = new ModuleGraph ();
$module_graph -> ajax ( $parameter2 );
break ;
2014-02-06 18:39:39 +01:00
case 'visualmap' :
$visualmap = new Visualmap ();
$visualmap -> ajax ( $parameter2 );
2014-02-11 14:03:31 +01:00
case 'tactical' :
$tactical = new Tactical ();
$tactical -> ajax ( $parameter2 );
2014-02-06 18:39:39 +01:00
break ;
2016-10-24 11:58:19 +02:00
default :
if ( class_exists ( " Enterprise " )) {
$enterprise -> enterpriseAjax ( $parameter1 , $parameter2 );
}
break ;
2013-03-20 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/events.php, mobile/include/ui.class.php,
mobile/index.php: added first version of events section.
* include/functions_incidents.php, include/functions_users.php,
include/functions.php, include/functions_groups.php,
include/functions_events.php, include/functions_html.php,
operation/events/events.build_table.php,
operation/events/events.build_query.php,
operation/events/events_list.php: some changes for interact with
mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7872 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-20 13:29:33 +01:00
}
return ;
break ;
2013-03-15 15:50:47 +01:00
case 'login' :
2014-12-15 13:47:33 +01:00
if ( $user -> login () && $user -> isLogged ()) {
if ( $user -> isWaitingDoubleAuth ()) {
if ( $user -> validateDoubleAuthCode ()) {
$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 ();
}
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
$home -> show ();
}
else {
$user -> showDoubleAuthPage ();
}
}
else {
$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 ();
}
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
$home -> show ();
}
2013-03-15 15:50:47 +01:00
}
else {
2014-12-15 13:47:33 +01:00
$user -> showLoginPage ();
}
break ;
case 'double_auth' :
if ( $user -> isLogged ()) {
if ( $user -> validateDoubleAuthCode ()) {
2013-05-04 02:29:16 +02:00
$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 ();
}
2014-10-15 18:12:51 +02:00
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
2013-03-15 15:50:47 +01:00
$home -> show ();
}
else {
2014-12-15 13:47:33 +01:00
$user -> showDoubleAuthPage ();
2013-03-15 15:50:47 +01:00
}
}
2014-12-15 13:47:33 +01:00
else {
$user -> showLoginPage ();
}
2013-03-15 15:50:47 +01:00
break ;
case 'logout' :
$user -> logout ();
2014-12-15 13:47:33 +01:00
$user -> showLoginPage ();
2013-03-15 15:50:47 +01:00
break ;
default :
2014-10-15 18:12:51 +02:00
if ( class_exists ( " Enterprise " )) {
$enterprise = Enterprise :: getInstance ();
if ( $page != " home " ) {
$permission = $enterprise -> checkEnterpriseACL ( $page );
if ( ! $permission ) {
$error [ 'type' ] = 'onStart' ;
$error [ 'title_text' ] = __ ( 'You don\'t have access to this page' );
$error [ 'content_text' ] = __ ( 'Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br><br>Please know that all attempts to access this page are recorded in security logs of Pandora System Database' );
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
$home -> show ( $error );
return ;
}
}
}
2013-03-15 15:50:47 +01:00
switch ( $page ) {
case 'home' :
default :
2014-10-15 18:12:51 +02:00
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
2013-03-15 15:50:47 +01:00
$home -> show ();
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
break ;
2013-03-15 15:50:47 +01:00
case 'tactical' :
$tactical = new Tactical ();
$tactical -> show ();
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
break ;
2013-03-15 15:50:47 +01:00
case 'groups' :
$groups = new Groups ();
$groups -> show ();
break ;
case 'events' :
$events = new Events ();
$events -> show ();
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
break ;
2013-03-20 18:41:35 +01:00
case 'alerts' :
$alerts = new Alerts ();
$alerts -> show ();
break ;
2013-03-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions_groups.php:
changes for to use in the calls in mobile version.
* mobile/index.php, mobile/operation/events.php,
mobile/operation/modules.php, mobile/operation/events,
mobile/operation/events/events.php, mobile/operation/agents.php,
mobile/operation/tactical.php, mobile/operation/alerts.php,
mobile/include/style/main.css, mobile/include/ui.class.php,
mobile/include/user.class.php: changes and improves in the code
of mobile.
* mobile/operation/agents/*, mobile/operation/servers/*: removed
the old files from version pandora mobile 4.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7891 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-03-26 18:24:10 +01:00
case 'agents' :
$agents = new Agents ();
$agents -> show ();
break ;
case 'modules' :
$modules = new Modules ();
$modules -> show ();
break ;
2013-04-04 19:44:07 +02:00
case 'module_graph' :
$module_graph = new ModuleGraph ();
$module_graph -> show ();
break ;
2013-04-09 11:29:03 +02:00
case 'agent' :
$agent = new Agent ();
$agent -> show ();
break ;
2013-07-03 10:50:50 +02:00
case 'networkmaps' :
$networkmaps = new Networkmaps ();
$networkmaps -> show ();
break ;
case 'networkmap' :
$networkmap = new Networkmap ();
$networkmap -> show ();
break ;
2014-02-06 18:39:39 +01:00
case 'visualmaps' :
$visualmaps = new Visualmaps ();
$visualmaps -> show ();
break ;
case 'visualmap' :
$visualmap = new Visualmap ();
$visualmap -> show ();
break ;
2016-10-24 11:58:19 +02:00
case 'dashboard_list' :
if ( class_exists ( " Dashboards " )) {
$dashboard = new Dashboards ();
$dashboard -> showDashboards ();
}
else {
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
$home -> show ();
}
break ;
case 'dashboard' :
if ( class_exists ( " Dashboards " )) {
$dashboard = new Dashboards ();
$dashboard -> show ();
}
else {
if ( class_exists ( " HomeEnterprise " ))
$home = new HomeEnterprise ();
else
$home = new Home ();
$home -> show ();
}
break ;
2010-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: in function "get_agent_module_info" added
the return "status" and "alert_value".
* include/auth/mysql.php: in function "process_user_login" cleaned the
source code style.
* include/functions_ui.php: in function "print_timestamp" added in the
parameter $option the check of units ('large' and 'tiny' at the moment).
Added the function "print_group_icon2" that it is the same of
"print_group_icon" but it has a new parameter $path for to set the images
path.
* include/functions.php: in function "human_time_comparation" added the
parameter $units to set the type return text for time unit (at the moment
only "large" and "tiny"). And in the function "human_time_description_raw"
added the paramter $units for to set the type of return text for units, at
the moment only "large" and "tiny".
* include/functions_db.php, operation/agentes/ver_agente.php: cleaned source
code.
* mobile/index.php, mobile/operation/agents,
mobile/operation/agents/view_agents.php, mobile/include/db.class.php,
mobile/include/style, mobile/include/style/main.css,
mobile/include/user.class.php, mobile/include/functions_web.php,
mobile/include/system.class.php, mobile/images/bricks.png,
mobile/images/up.png, mobile/images/zoom.png, mobile/images/down.png: added
first version of file for Pandora Mobile version.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3246 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-15 17:54:59 +02:00
}
2013-03-15 15:50:47 +01:00
break ;
}
2010-12-17 10:58:21 +01:00
?>