2006-07-11 16:14:09 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:26:14 +02:00
|
|
|
//Pandora FMS- http://pandorafms.com
|
|
|
|
// ==================================================
|
2011-01-11 21:42:08 +01:00
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
2009-06-08 20:26:14 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2007-06-22 14:00:04 +02:00
|
|
|
|
2006-06-29 21:31:53 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2009-06-08 20:26:14 +02:00
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
2006-06-29 21:31:53 +02:00
|
|
|
// 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.
|
2007-02-20 02:38:59 +01:00
|
|
|
|
2009-01-05 19:41:14 +01:00
|
|
|
//Set character encoding to UTF-8 - fixes a lot of multibyte character headaches
|
2009-01-16 13:37:47 +01:00
|
|
|
if (function_exists ('mb_internal_encoding')) {
|
2009-01-05 19:41:14 +01:00
|
|
|
mb_internal_encoding ("UTF-8");
|
|
|
|
}
|
|
|
|
|
2007-06-12 20:10:57 +02:00
|
|
|
// Set to 1 to do not check for installer or config file (for development!).
|
2010-03-02 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php: Solved issue with several undefined
vars.
* include/functions_servers.php: Solved issue with several undefined
vars.
* include/functions_config.php: Added metaconsola witch to readconfig.
* include/config_process.php: Update build.. is YYMMDD !
* include/functions_ui.php: Removed deprecated call to split and replaced
by preg_split.
* index.php: Activated developer mode.
* operation/agentes/estado_monitores.php: Solved small problem with modules
without history, filling missing column in table. Added headers
* godmode/alerts/configure_alert_compound.php,
operation/agentes/status_monitor.php
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_commands.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php: Removed deprecated call to include
config.php and in some cases, added new header style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-02 15:13:00 +01:00
|
|
|
// Activate gives more error information, not useful for production sites
|
2011-01-11 21:42:08 +01:00
|
|
|
$develop_bypass = 1;
|
2007-04-11 05:12:48 +02:00
|
|
|
|
2008-11-17 16:49:29 +01:00
|
|
|
if ($develop_bypass != 1) {
|
2007-02-20 19:09:54 +01:00
|
|
|
// If no config file, automatically try to install
|
2008-11-17 16:49:29 +01:00
|
|
|
if (! file_exists ("include/config.php")) {
|
|
|
|
if (! file_exists ("install.php")) {
|
2007-08-08 20:36:18 +02:00
|
|
|
include ("general/error_noconfig.php");
|
2007-04-11 05:12:48 +02:00
|
|
|
exit;
|
2008-11-17 16:49:29 +01:00
|
|
|
} else {
|
2007-04-11 05:12:48 +02:00
|
|
|
include ("install.php");
|
2008-11-17 16:49:29 +01:00
|
|
|
exit;
|
|
|
|
}
|
2007-02-20 19:09:54 +01:00
|
|
|
}
|
2010-06-01 16:42:27 +02:00
|
|
|
if (filesize("include/config.php") == 0) {
|
|
|
|
include ("install.php");
|
|
|
|
exit;
|
|
|
|
}
|
2007-02-20 19:09:54 +01:00
|
|
|
// Check for installer presence
|
2008-11-17 16:49:29 +01:00
|
|
|
if (file_exists ("install.php")) {
|
2007-02-20 19:09:54 +01:00
|
|
|
include "general/error_install.php";
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
// Check perms for config.php
|
2008-11-17 16:49:29 +01:00
|
|
|
if ((substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0600") &&
|
2009-01-20 17:43:49 +01:00
|
|
|
(substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0660") &&
|
|
|
|
(substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0640")) {
|
2007-02-20 19:09:54 +01:00
|
|
|
include "general/error_perms.php";
|
|
|
|
exit;
|
|
|
|
}
|
2007-02-20 02:38:59 +01:00
|
|
|
}
|
2007-02-05 18:45:14 +01:00
|
|
|
|
2009-02-11 17:55:04 +01:00
|
|
|
if ((! file_exists ("include/config.php")) || (! is_readable ("include/config.php"))) {
|
2008-07-02 14:30:56 +02:00
|
|
|
include ("general/error_noconfig.php");
|
|
|
|
exit;
|
2007-08-08 20:36:18 +02:00
|
|
|
}
|
|
|
|
|
2007-02-20 19:09:54 +01:00
|
|
|
// Real start
|
2009-02-11 17:55:04 +01:00
|
|
|
session_start ();
|
2008-07-21 14:23:28 +02:00
|
|
|
require_once ("include/config.php");
|
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
|
|
|
|
2008-10-22 14:01:36 +02:00
|
|
|
/* Enterprise support */
|
2008-11-05 14:12:45 +01:00
|
|
|
if (file_exists (ENTERPRISE_DIR."/load_enterprise.php")) {
|
2010-03-02 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php: Solved issue with several undefined
vars.
* include/functions_servers.php: Solved issue with several undefined
vars.
* include/functions_config.php: Added metaconsola witch to readconfig.
* include/config_process.php: Update build.. is YYMMDD !
* include/functions_ui.php: Removed deprecated call to split and replaced
by preg_split.
* index.php: Activated developer mode.
* operation/agentes/estado_monitores.php: Solved small problem with modules
without history, filling missing column in table. Added headers
* godmode/alerts/configure_alert_compound.php,
operation/agentes/status_monitor.php
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_commands.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php: Removed deprecated call to include
config.php and in some cases, added new header style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-02 15:13:00 +01:00
|
|
|
include_once (ENTERPRISE_DIR."/load_enterprise.php");
|
2008-10-22 14:01:36 +02:00
|
|
|
}
|
|
|
|
|
2009-08-27 18:57:19 +02:00
|
|
|
/**
|
|
|
|
* Load the basic configurations of extension and add extensions into menu.
|
|
|
|
*/
|
2008-11-05 14:12:45 +01:00
|
|
|
load_extensions ($config['extensions']);
|
|
|
|
|
2009-01-30 16:09:16 +01:00
|
|
|
if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
|
|
|
|
$query = 'https://' . $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
|
|
|
|
if (sizeof ($_REQUEST))
|
|
|
|
//Some (old) browsers don't like the ?&key=var
|
|
|
|
$query .= '?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;
|
|
|
|
}
|
2010-08-18 13:35:42 +02:00
|
|
|
|
|
|
|
// Prevent HTTP response splitting attacks
|
|
|
|
// http://en.wikipedia.org/wiki/HTTP_response_splitting
|
|
|
|
$query = str_replace ("\n", "", $query);
|
|
|
|
|
2009-01-30 16:09:16 +01:00
|
|
|
header ('Location: '.$query);
|
|
|
|
exit; //Always exit after sending location headers
|
|
|
|
}
|
|
|
|
|
2008-07-02 14:30:56 +02:00
|
|
|
// Pure mode (without menu, header and footer).
|
2009-02-11 17:55:04 +01:00
|
|
|
$config["pure"] = (bool) get_parameter ("pure");
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
// Auto Refresh page (can now be disabled anywhere in the script)
|
2009-02-11 17:55:04 +01:00
|
|
|
$config["refr"] = (int) get_parameter ("refr");
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
2009-08-07 16:57:11 +02:00
|
|
|
|
2009-08-14 18:29:53 +02:00
|
|
|
ob_start ();
|
2009-03-03 16:21:13 +01:00
|
|
|
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
|
|
|
|
echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
|
|
|
|
echo '<head>';
|
|
|
|
|
2009-08-14 18:29:53 +02:00
|
|
|
//This starts the page head. In the call back function, things from $page['head'] array will be processed into the head
|
|
|
|
ob_start ('process_page_head');
|
|
|
|
|
2010-02-22 20:03:55 +01:00
|
|
|
// Enterprise main
|
2008-10-22 14:01:36 +02:00
|
|
|
enterprise_include ('index.php');
|
|
|
|
|
2010-02-22 20:03:55 +01:00
|
|
|
// This tag is included in the buffer passed to process_page_head so
|
|
|
|
// technically it can be stripped
|
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
|
|
|
echo '</head>'."\n";
|
2007-02-16 19:29:37 +01:00
|
|
|
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
ob_start ('process_page_body');
|
2008-08-21 23:07:20 +02:00
|
|
|
|
2008-11-14 16:37:32 +01:00
|
|
|
$config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
|
2006-12-15 16:25:19 +01:00
|
|
|
|
2008-12-23 22:41:05 +01:00
|
|
|
$sec2 = get_parameter_get ('sec2');
|
|
|
|
$sec2 = safe_url_extraclean ($sec2);
|
|
|
|
$page = $sec2; //Reference variable for old time sake
|
|
|
|
|
|
|
|
$sec = get_parameter_get ('sec');
|
|
|
|
$sec = safe_url_extraclean ($sec);
|
|
|
|
|
2009-07-24 12:27:14 +02:00
|
|
|
$searchPage = false;
|
|
|
|
$search = get_parameter_get("head_search_keywords");
|
|
|
|
if (strlen($search) > 0) {
|
|
|
|
$config['search_keywords'] = trim(get_parameter('keywords'));
|
2009-08-06 20:55:54 +02:00
|
|
|
// If not search category providad, we'll use an agent search
|
|
|
|
$config['search_category'] = get_parameter('search_category', 'agents');
|
2009-07-24 12:27:14 +02:00
|
|
|
if (($config['search_keywords'] != 'Enter keywords to search') && (strlen($config['search_keywords']) > 0))
|
|
|
|
$searchPage = true;
|
|
|
|
}
|
|
|
|
|
2009-01-20 11:37:04 +01:00
|
|
|
// Hash login process
|
2009-03-05 13:52:59 +01:00
|
|
|
if (! isset ($config['id_user']) && isset ($_GET["loginhash"])) {
|
2009-01-20 17:43:49 +01:00
|
|
|
$loginhash_data = get_parameter("loginhash_data", "");
|
|
|
|
$loginhash_user = get_parameter("loginhash_user", "");
|
|
|
|
|
2010-08-18 13:35:42 +02:00
|
|
|
if ($config["loginhash_pwd"] != "" && $loginhash_data == md5($loginhash_user.$config["loginhash_pwd"])) {
|
2010-03-09 17:59:23 +01:00
|
|
|
logon_db ($loginhash_user, $_SERVER['REMOTE_ADDR']);
|
2009-01-20 11:37:04 +01:00
|
|
|
$_SESSION['id_usuario'] = $loginhash_user;
|
|
|
|
$config["id_user"] = $loginhash_user;
|
2010-09-22 18:52:29 +02:00
|
|
|
}
|
|
|
|
else {
|
2009-01-20 17:43:49 +01:00
|
|
|
require_once ('general/login_page.php');
|
2010-10-27 Miguel de Dios <miguel.dedios@artica.es>
* godmode/admin_access_logs.php: added hooks to enterprise code, and added
new filter with more options.
* include/functions_db.php: erase the deprecated function "audit_db", and
added in function "pandora_audit" two new parameters $user_id, $ip for
pass this values when it are differents to the default values. Finally
replaced the depecrated "audit_db" for "pandora_audit".
* include/functions_events.php, include/functions_filemanager.php,
include/ajax/reporting.ajax.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
include/functions_incidents.php, index.php, extensions/agents_modules.php,
extensions/insert_data.php, extensions/system_info.php,
extensions/dbmanager.php, extensions/update_manager/settings.php,
extensions/pandora_logs.php, extensions/plugin_registration.php,
operation/incidents/incident.php, operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php, operation/extensions.php,
operation/visual_console/render_view.php,
operation/agentes/status_monitor.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/custom_fields.php, operation/agentes/estado_agente.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php, operation/agentes/sla_view.php,
operation/agentes/gis_view.php, operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/graphs.php,
operation/agentes/agent_fields.php, operation/agentes/tactical.php,
operation/agentes/group_view.php, operation/agentes/networkmap.php,
operation/servers/view_server.php,operation/servers/view_server_detail.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/render_view.php, operation/events/event_statistics.php,
operation/events/sound_events.php, operation/events/events_validate.php,
operation/events/events_list.php, operation/events/events_marquee.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
mobile/operation/agents/view_agents.php, mobile/index.php,
godmode/groups/modu_group_list.php, godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php, godmode/groups/group_list.php,
godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php,
godmode/db/db_event.php, godmode/db/db_purge.php,
godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php,
godmode/servers/manage_export.php, godmode/servers/recon_script.php,
godmode/servers/manage_export_form.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_commands.php, godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php, godmode/setup/file_manager.php,
godmode/setup/os.list.php, godmode/setup/news.php,
godmode/setup/gis_step_2.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/setup/os.php,
godmode/setup/performance.php, godmode/setup/setup_auth.php,
godmode/setup/gis.php, godmode/setup/os.builder.php,
godmode/setup/setup_visuals.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/users/configure_profile.php,
godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php,
godmode/massive/massive_add_alerts.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_delete_agents.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.preview.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/graph_builder.php,
godmode/reporting/visual_console_builder.preview.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/graphs.php, godmode/reporting/graph_builder.preview.php:
Replaced the depecrated "audit_db" for "pandora_audit".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-27 12:47:07 +02:00
|
|
|
pandora_audit("Logon Failed (loginhash", "", "system");
|
2009-02-17 19:20:04 +01:00
|
|
|
while (@ob_end_flush ());
|
|
|
|
exit ("</html>");
|
2009-01-20 17:43:49 +01:00
|
|
|
}
|
2010-09-22 18:52:29 +02:00
|
|
|
}
|
|
|
|
elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
|
2009-02-11 17:55:04 +01:00
|
|
|
// Login process
|
2010-10-08 13:35:18 +02:00
|
|
|
include_once('include/functions_db.php');//Include it to use escape_string_sql function
|
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
|
|
|
$config["auth_error"] = ""; //Set this to the error message from the authorization mechanism
|
|
|
|
$nick = get_parameter_post ("nick"); //This is the variable with the login
|
|
|
|
$pass = get_parameter_post ("pass"); //This is the variable with the password
|
2010-10-08 13:35:18 +02:00
|
|
|
$nick = escape_string_sql($nick);
|
|
|
|
$pass = escape_string_sql($pass);
|
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
|
|
|
// process_user_login is a virtual function which should be defined in each auth file.
|
|
|
|
// It accepts username and password. The rest should be internal to the auth file.
|
|
|
|
// The auth file can set $config["auth_error"] to an informative error output or reference their internal error messages to it
|
|
|
|
// process_user_login should return false in case of errors or invalid login, the nickname if correct
|
2010-10-27 13:33:17 +02:00
|
|
|
$nick_in_db = process_user_login ($nick, $pass);
|
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
|
|
|
|
2010-10-27 13:33:17 +02:00
|
|
|
if ($nick_in_db !== false) {
|
2009-01-07 11:42:38 +01:00
|
|
|
unset ($_GET["sec2"]);
|
|
|
|
$_GET["sec"] = "general/logon_ok";
|
2010-10-27 13:33:17 +02:00
|
|
|
logon_db ($nick_in_db, $_SERVER['REMOTE_ADDR']);
|
|
|
|
$_SESSION['id_usuario'] = $nick_in_db;
|
|
|
|
$config['id_user'] = $nick_in_db;
|
2009-01-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* ajax.php, include/config.inc.php, include/config_process.php,
include/functions.php, include/functions_db.php,
include/functions_ui.php, index.php, install.php,
operation/users/user.php, operation/users/user_edit.php,
reporting/fgraph.php: Added pluggable authentication and moved functions
* general/login_page.php, general/logon_ok.php,
godmode/agentes/modificar_agente.php,
godmode/users/configure_users.php, godmode/users/user_list.php,
operation/agentes/estado_agente.php, operation/incidents/incident.php,
operation/incidents/incident_search.php: Updated functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1366 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-20 19:21:20 +01:00
|
|
|
//Remove everything that might have to do with people's passwords or logins
|
|
|
|
unset ($_GET['pass'], $pass, $_POST['pass'], $_REQUEST['pass'], $login_good);
|
2009-11-27 Sancho lerena <slerena@artica.es>
* operation/menu.php: User section has no ACL check, always can be seen.
* index.php: Added suppor for user-defined custom language (this code was
on my disk for 3 months, pending to be commited!).
* include/functions_db.php,
* include/functions_agents.php,
* godmode/alerts/alert_list.php,
* godmode/agentes/modificar_agente.php,
* godmode/agentes/configurar_agente.php: Added audit calls to several
management operations who don't have or have insufficient audit info.
* godmode/users/configure_user.php: Fixed several annoyings bugs. Added
custom language support, and added more audit info on management operations.
* godmode/users/user_list.php: More audit info.
* include/config_process.php: Add new debug option to render error log to
/pandora_console.log. Also set timezone if not defined (this makes warnings
on several PHP 5.x setups). Added user custom language support.
* include/functions_events.php: More audit info. Fixed problems with HTML
encoding render.
* functions_io.php: Some cleaning.
* include/functions_messages.php: Fixed problems with HTML
encoding render.
* functions_ui.php: Fixed problems with HTML encoding render in
print_string_substr() function.
* auth/mysql.php: is_user_admin() functions seems to be broken ¿?¿!. Fixed.
* styles/pandora.css: removed green colored left border in default style.
* message.php, incident*: Fixed problems with HTML encoding render.
* user.php: Better ACL check before let user to view/edit another user.
* user_edit: Removed some un-used form fields, some arrangements in layout,
and FIXED forever problems with password change (new code written).
* users/user_statistics.php: Now user can see its own audit records.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-11-27 21:02:12 +01:00
|
|
|
|
|
|
|
// Set user language if provided, overriding System language
|
|
|
|
$userinfo = get_user_info ($config['id_user']);
|
|
|
|
if ($userinfo["language"] != ""){
|
|
|
|
$config['language'] = $userinfo["language"];
|
|
|
|
}
|
|
|
|
|
|
|
|
$l10n = NULL;
|
|
|
|
if (file_exists ('./include/languages/'.$config["language"].'.mo')) {
|
|
|
|
$l10n = new gettext_reader (new CachedFileReader ('./include/languages/'.$config["language"].'.mo'));
|
|
|
|
$l10n->load_tables();
|
|
|
|
}
|
2010-09-22 18:52:29 +02:00
|
|
|
}
|
|
|
|
else {
|
2008-06-26 16:57:11 +02:00
|
|
|
// User not known
|
2009-01-07 11:42:38 +01:00
|
|
|
$login_failed = true;
|
|
|
|
require_once ('general/login_page.php');
|
2010-10-27 Miguel de Dios <miguel.dedios@artica.es>
* godmode/admin_access_logs.php: added hooks to enterprise code, and added
new filter with more options.
* include/functions_db.php: erase the deprecated function "audit_db", and
added in function "pandora_audit" two new parameters $user_id, $ip for
pass this values when it are differents to the default values. Finally
replaced the depecrated "audit_db" for "pandora_audit".
* include/functions_events.php, include/functions_filemanager.php,
include/ajax/reporting.ajax.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
include/functions_incidents.php, index.php, extensions/agents_modules.php,
extensions/insert_data.php, extensions/system_info.php,
extensions/dbmanager.php, extensions/update_manager/settings.php,
extensions/pandora_logs.php, extensions/plugin_registration.php,
operation/incidents/incident.php, operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php, operation/extensions.php,
operation/visual_console/render_view.php,
operation/agentes/status_monitor.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/custom_fields.php, operation/agentes/estado_agente.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php, operation/agentes/sla_view.php,
operation/agentes/gis_view.php, operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/graphs.php,
operation/agentes/agent_fields.php, operation/agentes/tactical.php,
operation/agentes/group_view.php, operation/agentes/networkmap.php,
operation/servers/view_server.php,operation/servers/view_server_detail.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
operation/gis_maps/render_view.php, operation/events/event_statistics.php,
operation/events/sound_events.php, operation/events/events_validate.php,
operation/events/events_list.php, operation/events/events_marquee.php,
operation/events/events.php, operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
mobile/operation/agents/view_agents.php, mobile/index.php,
godmode/groups/modu_group_list.php, godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php, godmode/groups/group_list.php,
godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php,
godmode/db/db_event.php, godmode/db/db_purge.php,
godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php,
godmode/servers/manage_export.php, godmode/servers/recon_script.php,
godmode/servers/manage_export_form.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_commands.php, godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php, godmode/setup/file_manager.php,
godmode/setup/os.list.php, godmode/setup/news.php,
godmode/setup/gis_step_2.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/setup/os.php,
godmode/setup/performance.php, godmode/setup/setup_auth.php,
godmode/setup/gis.php, godmode/setup/os.builder.php,
godmode/setup/setup_visuals.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/users/configure_profile.php,
godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php,
godmode/massive/massive_add_alerts.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_delete_agents.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.preview.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/map_builder_wizard.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/graph_builder.php,
godmode/reporting/visual_console_builder.preview.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/graphs.php, godmode/reporting/graph_builder.preview.php:
Replaced the depecrated "audit_db" for "pandora_audit".
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-27 12:47:07 +02:00
|
|
|
pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick);
|
2009-02-17 19:20:04 +01:00
|
|
|
while (@ob_end_flush ());
|
|
|
|
exit ("</html>");
|
2007-02-27 20:03:56 +01:00
|
|
|
}
|
2010-09-22 18:52:29 +02:00
|
|
|
}
|
|
|
|
elseif (! isset ($config['id_user'])) {
|
2008-06-26 16:57:11 +02:00
|
|
|
// There is no user connected
|
2009-01-07 11:42:38 +01:00
|
|
|
require_once ('general/login_page.php');
|
2009-02-17 19:20:04 +01:00
|
|
|
while (@ob_end_flush ());
|
|
|
|
exit ("</html>");
|
2008-06-26 16:57:11 +02:00
|
|
|
}
|
2007-02-27 20:03:56 +01:00
|
|
|
|
2008-06-26 16:57:11 +02:00
|
|
|
// Log off
|
|
|
|
if (isset ($_GET["bye"])) {
|
2009-01-16 11:55:29 +01:00
|
|
|
include ("general/logoff.php");
|
2008-06-26 16:57:11 +02:00
|
|
|
$iduser = $_SESSION["id_usuario"];
|
2010-03-09 17:59:23 +01:00
|
|
|
logoff_db ($iduser, $_SERVER['REMOTE_ADDR']);
|
2010-02-10 18:10:10 +01:00
|
|
|
// Unregister Session (compatible with 5.2 and 6.x, old code was deprecated
|
|
|
|
unset($_SESSION['id_usuario']);
|
|
|
|
unset($iduser);
|
2009-02-17 19:20:04 +01:00
|
|
|
while (@ob_end_flush ());
|
|
|
|
exit ("</html>");
|
2008-06-26 16:57:11 +02:00
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
|
2008-06-26 16:57:11 +02:00
|
|
|
// http://es2.php.net/manual/en/ref.session.php#64525
|
|
|
|
// Session locking concurrency speedup!
|
2009-02-11 17:55:04 +01:00
|
|
|
session_write_close ();
|
2008-06-26 16:57:11 +02:00
|
|
|
|
|
|
|
// Header
|
2008-08-04 10:15:16 +02:00
|
|
|
if ($config["pure"] == 0) {
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '<div id="container"><div id="head">';
|
2008-07-02 14:30:56 +02:00
|
|
|
require ("general/header.php");
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '</div><div id="page"><div id="menu">';
|
2008-06-26 16:57:11 +02:00
|
|
|
require ("general/main_menu.php");
|
2008-07-02 14:30:56 +02:00
|
|
|
echo '</div>';
|
2011-02-24 10:40:14 +01:00
|
|
|
}
|
|
|
|
else {
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '<div id="main_pure">';
|
|
|
|
}
|
|
|
|
|
|
|
|
// Main block of content
|
2008-10-22 14:01:36 +02:00
|
|
|
if ($config["pure"] == 0) {
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '<div id="main">';
|
|
|
|
}
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
// Check permissions
|
2009-03-16 18:50:06 +01:00
|
|
|
if (!is_writable ("attachment")){
|
|
|
|
echo '<h3 class="error">'.__('Attachment directory is not writable by HTTP Server').'</h3>';
|
|
|
|
echo '<p>'.__('Please check that the web server has write rights on the {HOMEDIR}/attachment directory').'</p>';
|
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
|
|
|
}
|
|
|
|
|
2008-06-26 16:57:11 +02:00
|
|
|
// Page loader / selector
|
2009-07-24 12:27:14 +02:00
|
|
|
if ($searchPage) {
|
|
|
|
require ('operation/search_results.php');
|
|
|
|
}
|
2010-02-22 20:03:55 +01:00
|
|
|
else {
|
2009-07-24 12:27:14 +02:00
|
|
|
if ($page != "") {
|
|
|
|
$page .= '.php';
|
2010-02-22 20:03:55 +01:00
|
|
|
// Enterprise ACL check
|
|
|
|
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $sec, $sec2)) == false){
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
}
|
|
|
|
elseif (file_exists ($page)) {
|
|
|
|
if (! is_extension ($page)){
|
2009-07-24 12:27:14 +02:00
|
|
|
require ($page);
|
2010-02-22 20:03:55 +01:00
|
|
|
}
|
2009-07-24 12:27:14 +02:00
|
|
|
else {
|
|
|
|
if ($sec[0] == 'g')
|
|
|
|
extension_call_godmode_function (basename ($page));
|
|
|
|
else
|
|
|
|
extension_call_main_function (basename ($page));
|
2008-08-04 10:15:16 +02:00
|
|
|
}
|
2009-07-24 12:27:14 +02:00
|
|
|
}
|
|
|
|
else echo '<br /><strong class="error">'.__('Sorry! I can\'t find the page!').'</strong>';
|
2008-08-04 10:15:16 +02:00
|
|
|
}
|
2009-07-24 12:27:14 +02:00
|
|
|
else require ("general/logon_ok.php");
|
2008-08-21 23:07:20 +02:00
|
|
|
}
|
2008-06-26 16:57:11 +02:00
|
|
|
|
2009-01-16 11:55:29 +01:00
|
|
|
if ($config["pure"] == 0) {
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '</div>'; // main
|
2008-12-19 22:45:20 +01:00
|
|
|
echo '<div style="clear:both"> </div>';
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '</div>'; // page (id = page)
|
2008-06-26 16:57:11 +02:00
|
|
|
} else {
|
2008-08-21 23:07:20 +02:00
|
|
|
echo "</div>"; // main_pure
|
2008-06-26 16:57:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($config["pure"] == 0) {
|
|
|
|
echo '<div id="foot">';
|
2008-07-02 14:30:56 +02:00
|
|
|
require ("general/footer.php");
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '</div>';
|
2009-02-19 22:34:27 +01:00
|
|
|
echo '</div>'; //container div
|
2008-06-26 16:57:11 +02:00
|
|
|
}
|
2009-02-25 14:48:40 +01:00
|
|
|
while (@ob_end_flush ());
|
2009-02-25 13:24:06 +01:00
|
|
|
|
|
|
|
print_database_debug ();
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
echo '</html>';
|
2009-02-26 13:09:21 +01:00
|
|
|
|
|
|
|
$run_time = format_numeric (microtime (true) - $config['start_time'], 3);
|
|
|
|
echo "\n<!-- Page generated in $run_time seconds -->\n";
|
2010-02-22 20:03:55 +01:00
|
|
|
?>
|