pandorafms/pandora_console/index.php

286 lines
8.9 KiB
PHP
Raw Normal View History

<?php
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 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 Lesser General Public License
// as published by the Free Software Foundation; 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.
//Set character encoding to UTF-8 - fixes a lot of multibyte character headaches
if (function_exists ('mb_internal_encoding')) {
mb_internal_encoding ("UTF-8");
}
// Set to 1 to do not check for installer or config file (for development!).
// Activate gives more error information, not useful for production sites
$develop_bypass = 1;
if ($develop_bypass != 1) {
// If no config file, automatically try to install
if (! file_exists ("include/config.php")) {
if (! file_exists ("install.php")) {
include ("general/error_noconfig.php");
exit;
} else {
include ("install.php");
exit;
}
}
if (filesize("include/config.php") == 0) {
include ("install.php");
exit;
}
// Check for installer presence
if (file_exists ("install.php")) {
include "general/error_install.php";
exit;
}
// Check perms for config.php
if ((substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0600") &&
(substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0660") &&
(substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0640")) {
include "general/error_perms.php";
exit;
}
}
2009-02-11 Esteban Sanchez <estebans@artica.es> * general/main_menu.php, include/styles/menu.css: Selected menu style is done with a CSS classs. Slide effect removed. Submenus have now white background. * godmode/agentes/alert_manager.php: Allow creation of alerts without actions which have sense in compound alerts. * include/javascript/jquery.pandora.js: Added showMessage() function. * godmode/agentes/module_manager_editor.php: Use new showMessage() jQuery function. * godmode/alerts/configure_alert_compound.php: Added to repository. New compound alert editor interface. * godmode/alerts/alert_compounds.php: Added to repository. Compound alert list. * godmode/alerts/configure_alert_template.php: Better style for steps of the editor. * godmode/menu.php: Added compound alerts option. Changed default page on Manage alerts. * include/styles/pandora.css: Added style for editor steps. Added new generic classes. * include/functions.php: Added a new line when creating script list. * include/functions_agents.php: Fixed alert tables fields. Renamed get_agent_alerts_compound() and improved the returning value of get_agent_alerts(). * include/functions_alerts.php: Added new functions to manage compound alerts. Avoid SQL errors when using process_sql functions. * include/functions_reporting.php: Temporary disabled compound alert reports. * include/functions_ui.php: Fixed format_alert_row() to fit compound alerts. * operation/agentes/alerts_status.php: Allow compound alert validation. Removed effect of cluetip. * pandoradb.sql, pandoradb_migrate_20_to_21.sql: New compound alert tables (talert_compound, talert_compound_elements and talert_compound_actions). * godmode/alerts/alert_list.php: Added to repository. Shows a list of all the alerts defined. Would be improved in the future to allow sorting and filtering. * index.php, godmode/snmpconsole/snmp_alert.php, include/functions_db.php: Code style correction. * godmode/agentes/configurar_agente.php: Removed old compound alerts code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-11 17:55:04 +01:00
if ((! file_exists ("include/config.php")) || (! is_readable ("include/config.php"))) {
2008-07-02 Esteban Sanchez <estebans@artica.es> * general/logon_ok.php: Style correction. * include/languages/language_en.php: Added a couple of strings. * include/styles/pandora.css: Container div has now variable width, so Pandora console is wider now. * include/config.php: Replaced default values from last commit. Change homeurl variable, which now points to base url directory. * include/config_process.php: Style correction. Use pandora functions and indent the code properly. * reporting/fgraph.php, include/functions.php, ajax.php: Use require_once instead of require which speeds up the code parsing. * index.php: Use require_once instead of require which speeds up the code parsing. Add all GET and POST variables when refreshing a page. Style corrections. Use $_SERVER instead getenv. * include/functions_db.php: Avoid including config.php and use global instead. Replaced some id_user with the respective variable holds in config array. Replaced SQL syntax, removed an undeclared variable and renamed to english in event_insert(). Renamed return_moduledata_*_value() to get_agent_module_value_*(). Fixed an error in the sumatory when the module is incremental. * include/functions_reporting.php: Renamed return_module_SLA() to get_agent_module_sla(). * include/functions_reporting_pdf.php: Tabs and blankspaces correction. Style correction. Added new reports rendering, and fixed images references. Removed old and deprecated functions. * operation/agentes/networkmap.php: Style correction. * operation/agentes/sla_view.php, reporting/stat_win.php: Use renamed functions. * operation/reporting/reporting_viewer.php: Table reports width are now wider. Fixed some colspan problems. Generate custom graph ids better. Added agent and module name to SLAs. Style correction in the use of rowclass structure since now each content has its own table. * operation/reporting/custom_reporting.php: Removed unused variable for PDF reporting generation link. * operation/reporting/reporting_viewer_pdf.php: Rewrite the code to make style corrections and use pandora functions. * operation/menu.php: Tabs and blankspaces correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-02 14:30:56 +02:00
include ("general/error_noconfig.php");
exit;
}
// Real start
2009-02-11 Esteban Sanchez <estebans@artica.es> * general/main_menu.php, include/styles/menu.css: Selected menu style is done with a CSS classs. Slide effect removed. Submenus have now white background. * godmode/agentes/alert_manager.php: Allow creation of alerts without actions which have sense in compound alerts. * include/javascript/jquery.pandora.js: Added showMessage() function. * godmode/agentes/module_manager_editor.php: Use new showMessage() jQuery function. * godmode/alerts/configure_alert_compound.php: Added to repository. New compound alert editor interface. * godmode/alerts/alert_compounds.php: Added to repository. Compound alert list. * godmode/alerts/configure_alert_template.php: Better style for steps of the editor. * godmode/menu.php: Added compound alerts option. Changed default page on Manage alerts. * include/styles/pandora.css: Added style for editor steps. Added new generic classes. * include/functions.php: Added a new line when creating script list. * include/functions_agents.php: Fixed alert tables fields. Renamed get_agent_alerts_compound() and improved the returning value of get_agent_alerts(). * include/functions_alerts.php: Added new functions to manage compound alerts. Avoid SQL errors when using process_sql functions. * include/functions_reporting.php: Temporary disabled compound alert reports. * include/functions_ui.php: Fixed format_alert_row() to fit compound alerts. * operation/agentes/alerts_status.php: Allow compound alert validation. Removed effect of cluetip. * pandoradb.sql, pandoradb_migrate_20_to_21.sql: New compound alert tables (talert_compound, talert_compound_elements and talert_compound_actions). * godmode/alerts/alert_list.php: Added to repository. Shows a list of all the alerts defined. Would be improved in the future to allow sorting and filtering. * index.php, godmode/snmpconsole/snmp_alert.php, include/functions_db.php: Code style correction. * godmode/agentes/configurar_agente.php: Removed old compound alerts code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-11 17:55:04 +01:00
session_start ();
require_once ("include/config.php");
/* Enterprise support */
if (file_exists (ENTERPRISE_DIR."/load_enterprise.php")) {
include_once (ENTERPRISE_DIR."/load_enterprise.php");
}
/**
* Load the basic configurations of extension and add extensions into menu.
*/
load_extensions ($config['extensions']);
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;
}
header ('Location: '.$query);
exit; //Always exit after sending location headers
}
2008-07-02 Esteban Sanchez <estebans@artica.es> * general/logon_ok.php: Style correction. * include/languages/language_en.php: Added a couple of strings. * include/styles/pandora.css: Container div has now variable width, so Pandora console is wider now. * include/config.php: Replaced default values from last commit. Change homeurl variable, which now points to base url directory. * include/config_process.php: Style correction. Use pandora functions and indent the code properly. * reporting/fgraph.php, include/functions.php, ajax.php: Use require_once instead of require which speeds up the code parsing. * index.php: Use require_once instead of require which speeds up the code parsing. Add all GET and POST variables when refreshing a page. Style corrections. Use $_SERVER instead getenv. * include/functions_db.php: Avoid including config.php and use global instead. Replaced some id_user with the respective variable holds in config array. Replaced SQL syntax, removed an undeclared variable and renamed to english in event_insert(). Renamed return_moduledata_*_value() to get_agent_module_value_*(). Fixed an error in the sumatory when the module is incremental. * include/functions_reporting.php: Renamed return_module_SLA() to get_agent_module_sla(). * include/functions_reporting_pdf.php: Tabs and blankspaces correction. Style correction. Added new reports rendering, and fixed images references. Removed old and deprecated functions. * operation/agentes/networkmap.php: Style correction. * operation/agentes/sla_view.php, reporting/stat_win.php: Use renamed functions. * operation/reporting/reporting_viewer.php: Table reports width are now wider. Fixed some colspan problems. Generate custom graph ids better. Added agent and module name to SLAs. Style correction in the use of rowclass structure since now each content has its own table. * operation/reporting/custom_reporting.php: Removed unused variable for PDF reporting generation link. * operation/reporting/reporting_viewer_pdf.php: Rewrite the code to make style corrections and use pandora functions. * operation/menu.php: Tabs and blankspaces correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-02 14:30:56 +02:00
// Pure mode (without menu, header and footer).
2009-02-11 Esteban Sanchez <estebans@artica.es> * general/main_menu.php, include/styles/menu.css: Selected menu style is done with a CSS classs. Slide effect removed. Submenus have now white background. * godmode/agentes/alert_manager.php: Allow creation of alerts without actions which have sense in compound alerts. * include/javascript/jquery.pandora.js: Added showMessage() function. * godmode/agentes/module_manager_editor.php: Use new showMessage() jQuery function. * godmode/alerts/configure_alert_compound.php: Added to repository. New compound alert editor interface. * godmode/alerts/alert_compounds.php: Added to repository. Compound alert list. * godmode/alerts/configure_alert_template.php: Better style for steps of the editor. * godmode/menu.php: Added compound alerts option. Changed default page on Manage alerts. * include/styles/pandora.css: Added style for editor steps. Added new generic classes. * include/functions.php: Added a new line when creating script list. * include/functions_agents.php: Fixed alert tables fields. Renamed get_agent_alerts_compound() and improved the returning value of get_agent_alerts(). * include/functions_alerts.php: Added new functions to manage compound alerts. Avoid SQL errors when using process_sql functions. * include/functions_reporting.php: Temporary disabled compound alert reports. * include/functions_ui.php: Fixed format_alert_row() to fit compound alerts. * operation/agentes/alerts_status.php: Allow compound alert validation. Removed effect of cluetip. * pandoradb.sql, pandoradb_migrate_20_to_21.sql: New compound alert tables (talert_compound, talert_compound_elements and talert_compound_actions). * godmode/alerts/alert_list.php: Added to repository. Shows a list of all the alerts defined. Would be improved in the future to allow sorting and filtering. * index.php, godmode/snmpconsole/snmp_alert.php, include/functions_db.php: Code style correction. * godmode/agentes/configurar_agente.php: Removed old compound alerts code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
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 19:41:54 +01:00
// Auto Refresh page (can now be disabled anywhere in the script)
2009-02-11 Esteban Sanchez <estebans@artica.es> * general/main_menu.php, include/styles/menu.css: Selected menu style is done with a CSS classs. Slide effect removed. Submenus have now white background. * godmode/agentes/alert_manager.php: Allow creation of alerts without actions which have sense in compound alerts. * include/javascript/jquery.pandora.js: Added showMessage() function. * godmode/agentes/module_manager_editor.php: Use new showMessage() jQuery function. * godmode/alerts/configure_alert_compound.php: Added to repository. New compound alert editor interface. * godmode/alerts/alert_compounds.php: Added to repository. Compound alert list. * godmode/alerts/configure_alert_template.php: Better style for steps of the editor. * godmode/menu.php: Added compound alerts option. Changed default page on Manage alerts. * include/styles/pandora.css: Added style for editor steps. Added new generic classes. * include/functions.php: Added a new line when creating script list. * include/functions_agents.php: Fixed alert tables fields. Renamed get_agent_alerts_compound() and improved the returning value of get_agent_alerts(). * include/functions_alerts.php: Added new functions to manage compound alerts. Avoid SQL errors when using process_sql functions. * include/functions_reporting.php: Temporary disabled compound alert reports. * include/functions_ui.php: Fixed format_alert_row() to fit compound alerts. * operation/agentes/alerts_status.php: Allow compound alert validation. Removed effect of cluetip. * pandoradb.sql, pandoradb_migrate_20_to_21.sql: New compound alert tables (talert_compound, talert_compound_elements and talert_compound_actions). * godmode/alerts/alert_list.php: Added to repository. Shows a list of all the alerts defined. Would be improved in the future to allow sorting and filtering. * index.php, godmode/snmpconsole/snmp_alert.php, include/functions_db.php: Code style correction. * godmode/agentes/configurar_agente.php: Removed old compound alerts code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
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
ob_start ();
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
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>';
//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');
// Enterprise main
enterprise_include ('index.php');
// 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";
2009-02-09 19:41:54 +01:00
ob_start ('process_page_body');
$config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
$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);
$searchPage = false;
$search = get_parameter_get("head_search_keywords");
if (strlen($search) > 0) {
$config['search_keywords'] = trim(get_parameter('keywords'));
2009-08-05 Sancho Lerena <slerena@artica.es> * include/styles/pandora.css: Adjusted head and removed small heigh problems in some tabs (agent and search sections). * include/javascript/pandora.js: winopeng call for module graph is now widther. * index.php: Now defined a default search for agents(). * general/header.php: Redesign of header. * general/pandora_help.php: Some visual changes in background and footer. * godmode/modificar_agente.php: Create button replaced. * fgraph.php: Fixed the string graphs and fixed a lot other issues. * include/functions_visual_map.php: Module images are shown in pure mode (without title) and adding the title defined by user in map definition. * include/pandora_graph.php: Added default colors (up to 9) for combined graphs. * include/pchart_graph.php: Created a new method to render datetime data in X axis legend. Reformatted combined and static graph to remove transparent background, title and other issues reported. Also combined stack graph now works adding data from one series to another. * include/help/en/help_agent_status.php: new help file for agent status. * include/pChart/pChart.class: Added new method for format datetime in two lines with full date and time information. * operation/search_results.php: reformatted tabs. * operation/agentes/estado_agente.php: removed status information legend and added a help icon. * godmode/reporting/graph_builder.php, operation/reporting/graph_viewer.php: Added new graph mode: stacked line. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1829 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
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');
if (($config['search_keywords'] != 'Enter keywords to search') && (strlen($config['search_keywords']) > 0))
$searchPage = true;
}
// Hash login process
if (! isset ($config['id_user']) && isset ($_GET["loginhash"])) {
$loginhash_data = get_parameter("loginhash_data", "");
$loginhash_user = get_parameter("loginhash_user", "");
if ($loginhash_data == md5($loginhash_user.$config["loginhash_pwd"])) {
logon_db ($loginhash_user, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $loginhash_user;
$config["id_user"] = $loginhash_user;
} else {
require_once ('general/login_page.php');
audit_db ("system", $_SERVER['REMOTE_ADDR'], "Logon Failed (loginhash", "");
while (@ob_end_flush ());
exit ("</html>");
}
} elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
2009-02-11 Esteban Sanchez <estebans@artica.es> * general/main_menu.php, include/styles/menu.css: Selected menu style is done with a CSS classs. Slide effect removed. Submenus have now white background. * godmode/agentes/alert_manager.php: Allow creation of alerts without actions which have sense in compound alerts. * include/javascript/jquery.pandora.js: Added showMessage() function. * godmode/agentes/module_manager_editor.php: Use new showMessage() jQuery function. * godmode/alerts/configure_alert_compound.php: Added to repository. New compound alert editor interface. * godmode/alerts/alert_compounds.php: Added to repository. Compound alert list. * godmode/alerts/configure_alert_template.php: Better style for steps of the editor. * godmode/menu.php: Added compound alerts option. Changed default page on Manage alerts. * include/styles/pandora.css: Added style for editor steps. Added new generic classes. * include/functions.php: Added a new line when creating script list. * include/functions_agents.php: Fixed alert tables fields. Renamed get_agent_alerts_compound() and improved the returning value of get_agent_alerts(). * include/functions_alerts.php: Added new functions to manage compound alerts. Avoid SQL errors when using process_sql functions. * include/functions_reporting.php: Temporary disabled compound alert reports. * include/functions_ui.php: Fixed format_alert_row() to fit compound alerts. * operation/agentes/alerts_status.php: Allow compound alert validation. Removed effect of cluetip. * pandoradb.sql, pandoradb_migrate_20_to_21.sql: New compound alert tables (talert_compound, talert_compound_elements and talert_compound_actions). * godmode/alerts/alert_list.php: Added to repository. Shows a list of all the alerts defined. Would be improved in the future to allow sorting and filtering. * index.php, godmode/snmpconsole/snmp_alert.php, include/functions_db.php: Code style correction. * godmode/agentes/configurar_agente.php: Removed old compound alerts code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-11 17:55:04 +01:00
// Login process
$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
// 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
$nick = process_user_login ($nick, $pass);
if ($nick !== false) {
unset ($_GET["sec2"]);
$_GET["sec"] = "general/logon_ok";
logon_db ($nick, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $nick;
$config['id_user'] = $nick;
//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();
}
} else {
// User not known
$login_failed = true;
require_once ('general/login_page.php');
audit_db ($nick, $_SERVER['REMOTE_ADDR'], "Logon Failed", "Invalid login: ".$nick);
while (@ob_end_flush ());
exit ("</html>");
2007-02-27 Sancho Lerena <slerena@openideas.info> * include/styles/god.css: Moved style block. * include/styles/link.css: Moved style block. * include/styles/op.css: Moved style block. * include/styles/pandora.css: Added some clases for new appearance. Needs to be improved, not finished yet !. * include/config.inc.php: Changed version number. * index.php: Some changes for new block disposition using data_box class and other changes. * operation/agentes/ver_agente.php: Now shows data in three tabs. Needs to be improved, but functional. * operation/agentes/estado_generalagente.php: Change in title order. This should be the way to show title and subtitle since now. * operation/messages/message.php: Changed icon, and fix problem in CSS. Deleted class: Classes with only fix weight should be avoided from now and added in code just with a style attribute, it generates too many classes in main CSS. * images/bottom-*-corner.gif: Added. * general/footer.php: Needs to be updated. * general/links_menu.php: New style in use (different color for top). * godmode/agentes/module_manager.php: New file to manage in tabs agent configuration. Almost functional, needs fix. * godmode/agentes/alert_manager.php: Content of alert management for agent manager, now in a individual file to be shown in a tab. * godmode/agentes/configurar_agente.php; * godmode/agentes/agent_manager.php: New file to manage in tabs agent configuration. Almost functional, needs fix. * godmode/menu.php: New style in use (different color for top). This is a partial commit not fully functional, need to be done due to many changes in a temporal development computer. Sorry for problems to people that are testing SVN version. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@387 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-02-27 20:03:56 +01:00
}
} elseif (! isset ($config['id_user'])) {
// There is no user connected
require_once ('general/login_page.php');
while (@ob_end_flush ());
exit ("</html>");
}
2007-02-27 Sancho Lerena <slerena@openideas.info> * include/styles/god.css: Moved style block. * include/styles/link.css: Moved style block. * include/styles/op.css: Moved style block. * include/styles/pandora.css: Added some clases for new appearance. Needs to be improved, not finished yet !. * include/config.inc.php: Changed version number. * index.php: Some changes for new block disposition using data_box class and other changes. * operation/agentes/ver_agente.php: Now shows data in three tabs. Needs to be improved, but functional. * operation/agentes/estado_generalagente.php: Change in title order. This should be the way to show title and subtitle since now. * operation/messages/message.php: Changed icon, and fix problem in CSS. Deleted class: Classes with only fix weight should be avoided from now and added in code just with a style attribute, it generates too many classes in main CSS. * images/bottom-*-corner.gif: Added. * general/footer.php: Needs to be updated. * general/links_menu.php: New style in use (different color for top). * godmode/agentes/module_manager.php: New file to manage in tabs agent configuration. Almost functional, needs fix. * godmode/agentes/alert_manager.php: Content of alert management for agent manager, now in a individual file to be shown in a tab. * godmode/agentes/configurar_agente.php; * godmode/agentes/agent_manager.php: New file to manage in tabs agent configuration. Almost functional, needs fix. * godmode/menu.php: New style in use (different color for top). This is a partial commit not fully functional, need to be done due to many changes in a temporal development computer. Sorry for problems to people that are testing SVN version. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@387 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-02-27 20:03:56 +01:00
// Log off
if (isset ($_GET["bye"])) {
include ("general/logoff.php");
$iduser = $_SESSION["id_usuario"];
logoff_db ($iduser, $_SERVER['REMOTE_ADDR']);
// Unregister Session (compatible with 5.2 and 6.x, old code was deprecated
unset($_SESSION['id_usuario']);
unset($iduser);
while (@ob_end_flush ());
exit ("</html>");
}
2008-07-02 Esteban Sanchez <estebans@artica.es> * general/logon_ok.php: Style correction. * include/languages/language_en.php: Added a couple of strings. * include/styles/pandora.css: Container div has now variable width, so Pandora console is wider now. * include/config.php: Replaced default values from last commit. Change homeurl variable, which now points to base url directory. * include/config_process.php: Style correction. Use pandora functions and indent the code properly. * reporting/fgraph.php, include/functions.php, ajax.php: Use require_once instead of require which speeds up the code parsing. * index.php: Use require_once instead of require which speeds up the code parsing. Add all GET and POST variables when refreshing a page. Style corrections. Use $_SERVER instead getenv. * include/functions_db.php: Avoid including config.php and use global instead. Replaced some id_user with the respective variable holds in config array. Replaced SQL syntax, removed an undeclared variable and renamed to english in event_insert(). Renamed return_moduledata_*_value() to get_agent_module_value_*(). Fixed an error in the sumatory when the module is incremental. * include/functions_reporting.php: Renamed return_module_SLA() to get_agent_module_sla(). * include/functions_reporting_pdf.php: Tabs and blankspaces correction. Style correction. Added new reports rendering, and fixed images references. Removed old and deprecated functions. * operation/agentes/networkmap.php: Style correction. * operation/agentes/sla_view.php, reporting/stat_win.php: Use renamed functions. * operation/reporting/reporting_viewer.php: Table reports width are now wider. Fixed some colspan problems. Generate custom graph ids better. Added agent and module name to SLAs. Style correction in the use of rowclass structure since now each content has its own table. * operation/reporting/custom_reporting.php: Removed unused variable for PDF reporting generation link. * operation/reporting/reporting_viewer_pdf.php: Rewrite the code to make style corrections and use pandora functions. * operation/menu.php: Tabs and blankspaces correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-02 14:30:56 +02:00
// http://es2.php.net/manual/en/ref.session.php#64525
// Session locking concurrency speedup!
2009-02-11 Esteban Sanchez <estebans@artica.es> * general/main_menu.php, include/styles/menu.css: Selected menu style is done with a CSS classs. Slide effect removed. Submenus have now white background. * godmode/agentes/alert_manager.php: Allow creation of alerts without actions which have sense in compound alerts. * include/javascript/jquery.pandora.js: Added showMessage() function. * godmode/agentes/module_manager_editor.php: Use new showMessage() jQuery function. * godmode/alerts/configure_alert_compound.php: Added to repository. New compound alert editor interface. * godmode/alerts/alert_compounds.php: Added to repository. Compound alert list. * godmode/alerts/configure_alert_template.php: Better style for steps of the editor. * godmode/menu.php: Added compound alerts option. Changed default page on Manage alerts. * include/styles/pandora.css: Added style for editor steps. Added new generic classes. * include/functions.php: Added a new line when creating script list. * include/functions_agents.php: Fixed alert tables fields. Renamed get_agent_alerts_compound() and improved the returning value of get_agent_alerts(). * include/functions_alerts.php: Added new functions to manage compound alerts. Avoid SQL errors when using process_sql functions. * include/functions_reporting.php: Temporary disabled compound alert reports. * include/functions_ui.php: Fixed format_alert_row() to fit compound alerts. * operation/agentes/alerts_status.php: Allow compound alert validation. Removed effect of cluetip. * pandoradb.sql, pandoradb_migrate_20_to_21.sql: New compound alert tables (talert_compound, talert_compound_elements and talert_compound_actions). * godmode/alerts/alert_list.php: Added to repository. Shows a list of all the alerts defined. Would be improved in the future to allow sorting and filtering. * index.php, godmode/snmpconsole/snmp_alert.php, include/functions_db.php: Code style correction. * godmode/agentes/configurar_agente.php: Removed old compound alerts code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-11 17:55:04 +01:00
session_write_close ();
// Header
if ($config["pure"] == 0) {
echo '<div id="container"><div id="head">';
2008-07-02 Esteban Sanchez <estebans@artica.es> * general/logon_ok.php: Style correction. * include/languages/language_en.php: Added a couple of strings. * include/styles/pandora.css: Container div has now variable width, so Pandora console is wider now. * include/config.php: Replaced default values from last commit. Change homeurl variable, which now points to base url directory. * include/config_process.php: Style correction. Use pandora functions and indent the code properly. * reporting/fgraph.php, include/functions.php, ajax.php: Use require_once instead of require which speeds up the code parsing. * index.php: Use require_once instead of require which speeds up the code parsing. Add all GET and POST variables when refreshing a page. Style corrections. Use $_SERVER instead getenv. * include/functions_db.php: Avoid including config.php and use global instead. Replaced some id_user with the respective variable holds in config array. Replaced SQL syntax, removed an undeclared variable and renamed to english in event_insert(). Renamed return_moduledata_*_value() to get_agent_module_value_*(). Fixed an error in the sumatory when the module is incremental. * include/functions_reporting.php: Renamed return_module_SLA() to get_agent_module_sla(). * include/functions_reporting_pdf.php: Tabs and blankspaces correction. Style correction. Added new reports rendering, and fixed images references. Removed old and deprecated functions. * operation/agentes/networkmap.php: Style correction. * operation/agentes/sla_view.php, reporting/stat_win.php: Use renamed functions. * operation/reporting/reporting_viewer.php: Table reports width are now wider. Fixed some colspan problems. Generate custom graph ids better. Added agent and module name to SLAs. Style correction in the use of rowclass structure since now each content has its own table. * operation/reporting/custom_reporting.php: Removed unused variable for PDF reporting generation link. * operation/reporting/reporting_viewer_pdf.php: Rewrite the code to make style corrections and use pandora functions. * operation/menu.php: Tabs and blankspaces correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-02 14:30:56 +02:00
require ("general/header.php");
echo '</div><div id="page"><div id="menu">';
require ("general/main_menu.php");
2008-07-02 Esteban Sanchez <estebans@artica.es> * general/logon_ok.php: Style correction. * include/languages/language_en.php: Added a couple of strings. * include/styles/pandora.css: Container div has now variable width, so Pandora console is wider now. * include/config.php: Replaced default values from last commit. Change homeurl variable, which now points to base url directory. * include/config_process.php: Style correction. Use pandora functions and indent the code properly. * reporting/fgraph.php, include/functions.php, ajax.php: Use require_once instead of require which speeds up the code parsing. * index.php: Use require_once instead of require which speeds up the code parsing. Add all GET and POST variables when refreshing a page. Style corrections. Use $_SERVER instead getenv. * include/functions_db.php: Avoid including config.php and use global instead. Replaced some id_user with the respective variable holds in config array. Replaced SQL syntax, removed an undeclared variable and renamed to english in event_insert(). Renamed return_moduledata_*_value() to get_agent_module_value_*(). Fixed an error in the sumatory when the module is incremental. * include/functions_reporting.php: Renamed return_module_SLA() to get_agent_module_sla(). * include/functions_reporting_pdf.php: Tabs and blankspaces correction. Style correction. Added new reports rendering, and fixed images references. Removed old and deprecated functions. * operation/agentes/networkmap.php: Style correction. * operation/agentes/sla_view.php, reporting/stat_win.php: Use renamed functions. * operation/reporting/reporting_viewer.php: Table reports width are now wider. Fixed some colspan problems. Generate custom graph ids better. Added agent and module name to SLAs. Style correction in the use of rowclass structure since now each content has its own table. * operation/reporting/custom_reporting.php: Removed unused variable for PDF reporting generation link. * operation/reporting/reporting_viewer_pdf.php: Rewrite the code to make style corrections and use pandora functions. * operation/menu.php: Tabs and blankspaces correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-02 14:30:56 +02:00
echo '</div>';
} else {
echo '<div id="main_pure">';
}
// Main block of content
if ($config["pure"] == 0) {
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
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
}
// Page loader / selector
if ($searchPage) {
require ('operation/search_results.php');
}
else {
if ($page != "") {
$page .= '.php';
// 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)){
require ($page);
}
else {
if ($sec[0] == 'g')
extension_call_godmode_function (basename ($page));
else
extension_call_main_function (basename ($page));
}
}
else echo '<br /><strong class="error">'.__('Sorry! I can\'t find the page!').'</strong>';
}
else require ("general/logon_ok.php");
}
if ($config["pure"] == 0) {
echo '</div>'; // main
echo '<div style="clear:both">&nbsp;</div>';
echo '</div>'; // page (id = page)
} else {
echo "</div>"; // main_pure
}
if ($config["pure"] == 0) {
echo '<div id="foot">';
2008-07-02 Esteban Sanchez <estebans@artica.es> * general/logon_ok.php: Style correction. * include/languages/language_en.php: Added a couple of strings. * include/styles/pandora.css: Container div has now variable width, so Pandora console is wider now. * include/config.php: Replaced default values from last commit. Change homeurl variable, which now points to base url directory. * include/config_process.php: Style correction. Use pandora functions and indent the code properly. * reporting/fgraph.php, include/functions.php, ajax.php: Use require_once instead of require which speeds up the code parsing. * index.php: Use require_once instead of require which speeds up the code parsing. Add all GET and POST variables when refreshing a page. Style corrections. Use $_SERVER instead getenv. * include/functions_db.php: Avoid including config.php and use global instead. Replaced some id_user with the respective variable holds in config array. Replaced SQL syntax, removed an undeclared variable and renamed to english in event_insert(). Renamed return_moduledata_*_value() to get_agent_module_value_*(). Fixed an error in the sumatory when the module is incremental. * include/functions_reporting.php: Renamed return_module_SLA() to get_agent_module_sla(). * include/functions_reporting_pdf.php: Tabs and blankspaces correction. Style correction. Added new reports rendering, and fixed images references. Removed old and deprecated functions. * operation/agentes/networkmap.php: Style correction. * operation/agentes/sla_view.php, reporting/stat_win.php: Use renamed functions. * operation/reporting/reporting_viewer.php: Table reports width are now wider. Fixed some colspan problems. Generate custom graph ids better. Added agent and module name to SLAs. Style correction in the use of rowclass structure since now each content has its own table. * operation/reporting/custom_reporting.php: Removed unused variable for PDF reporting generation link. * operation/reporting/reporting_viewer_pdf.php: Rewrite the code to make style corrections and use pandora functions. * operation/menu.php: Tabs and blankspaces correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-07-02 14:30:56 +02:00
require ("general/footer.php");
echo '</div>';
2009-02-19 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandoradb_migrate_20_to_21.sql, pandora_db.sql: Altered tmensajes for unixtime * general/header.php: New messages function added flashing acknowledgment in case of new messages * general/logon_ok.php: Since messages are now in header, they don't need to be there per se * images/close.png, images/transparent.png: Background and close button for overlays. * include/javascript/jquery.pandora.js: Used for loop for flashing thing and added overlay function * include/javascript/jquery.overlay.js: You'll need this for overlay * include/functions_messages.php: Message functions are here. Messages are fully abstracted so they can be drop-in replaced with something else * include/functions_ui.php: Small fixes. Not necessary to load en language files for javascript since they're empty, it only adds to load/interpret * include/functions_db.php: Added get_group_users and get_db_array. Useful * include/functions_html.php: Small doc fixes and fixed table heads * include/styles/pandora.css: Added Overlay classes * ajax.php: We need to call safe_url_extraclean for cross scripting * operation/messages/message.php: Rebuilt to use new functions * operation/menu.php: New message link instead of group link * operation/visual_console/render_view.php: Fixed conflict with timer * index.php: Added div for overlay (not in pure mode) and fixed erroneous div in pure mode. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1469 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 22:34:27 +01:00
echo '</div>'; //container div
}
while (@ob_end_flush ());
print_database_debug ();
2009-02-09 19:41:54 +01:00
echo '</html>';
$run_time = format_numeric (microtime (true) - $config['start_time'], 3);
echo "\n<!-- Page generated in $run_time seconds -->\n";
?>