2006-07-11 16:14:09 +02:00
< ? php
2008-07-25 20:37:32 +02:00
// Pandora FMS - the Flexible Monitoring System
// ============================================
2009-01-16 13:37:47 +01:00
// Copyright (c) 2009 Artica Soluciones Tecnologicas, http://www.artica.es
2007-08-08 20:36:18 +02:00
// Please see http://pandora.sourceforge.net 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
// modify it under the terms of the GNU General Public License
2007-06-12 20:10:57 +02:00
// as published by the Free Software Foundation for 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.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2006-03-27 05:37:27 +02:00
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
// Pandora FMS uses icons from famfamfam, licensed under CC Atr. 2.5
2007-02-20 02:38:59 +01:00
// Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/
2008-03-06 Sancho Lerena <slerena@gmail.com>
Pandora FMS 2.0 development first commit. 1.4 version is now 2.0
* pandoradb_data.sql: Added correct tnetwork_components, fixed
ttipo_modulo (categoria values).
* include/styles/pandora.css: Added some server icons, tab style
for module editor has been improved.
* include/functions_db.php: added new functions, lang_string and
check_login, and a first review of several functions that currently
need change for new config session parameters in array $config[]
* include/javascript/pandora.js: Added a new global include for
spare javascript functions before included into a few pages.
* include/languages/language_en.php: New tokens.
* include/help*: New contextual help system.
* include/config_process.php: New way to manage config.
* include/functions.php: Added new functions to manage global
* operation/agentes/estado_ultimopaquete.php: removed old javascript
code from there.
* operation/agentes/estado_agente.php: Removed references to deprecated
field "agent_type".
* operation/agentes/tactical.php: Some code cleanup and progressbar
issues merged from 1.3.1 branch. Need to add support to new server
types and new module types.
* operation/servers/view_server.php: Added support to new servers, code
cleanup.
* reporting/fgraph.php: Code cleanup, changes to use new config method,
and a lot of style change.
* general/pandora_help.php: New source for contextual help in the way
of moodle.
* general/footer.php, general/noaccess.php: Code cleanup and uses of
new config.
* module_manager_editor: New editors for each module family. Need
finish and implement EDITION of data, now only inserts data.
* godmode/agentes/agent_manager.php: Implemented new server assigment
and edition.
* godmode/agentes/configurar_agente.php: Small changes that affects
module management, visualization and agent management.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
// Pandora FMS uses Pear Image::Graph code
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!).
2008-11-23 18:05:38 +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
}
// 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 " );
2008-07-02 14:30:56 +02:00
require_once ( " include/functions.php " );
require_once ( " include/functions_db.php " );
2006-06-29 21:31:53 +02:00
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
if ( ! isset ( $config [ " auth " ])) {
require_once ( " include/auth/mysql.php " );
} else {
require_once ( " include/auth/ " . $config [ " auth " ][ " scheme " ] . " .php " );
}
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 " )) {
include ( ENTERPRISE_DIR . " /load_enterprise.php " );
2008-10-22 14:01:36 +02:00
}
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 ) {
/* Avoid the 1=1 */
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-08-21 23:07:20 +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
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>' ;
2009-02-11 17:55:04 +01: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' );
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
2008-10-22 14:01:36 +02:00
enterprise_include ( 'index.php' );
enterprise_hook ( 'load_html_header' );
2009-02-11 17:55:04 +01:00
//This tag is included in the buffer passed to process_page_head so technically it can be stripped
echo '</head>' ;
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-07-02 14:30:56 +02:00
$REMOTE_ADDR = $_SERVER [ 'REMOTE_ADDR' ];
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-01-20 11:37:04 +01:00
// Hash login process
if ( ! isset ( $_SESSION [ 'id_usuario' ]) && isset ( $_GET [ " loginhash " ])) {
2009-01-20 17:43:49 +01:00
$loginhash_data = get_parameter ( " loginhash_data " , " " );
$loginhash_user = get_parameter ( " loginhash_user " , " " );
if ( $loginhash_data == md5 ( $loginhash_user . $config [ " loginhash_pwd " ])) {
2009-01-20 11:37:04 +01:00
logon_db ( $loginhash_user , $REMOTE_ADDR );
$_SESSION [ 'id_usuario' ] = $loginhash_user ;
$config [ " id_user " ] = $loginhash_user ;
2009-01-20 17:43:49 +01:00
} else {
require_once ( 'general/login_page.php' );
audit_db ( " system " , $REMOTE_ADDR , " Logon Failed (loginhash " , " " );
2009-02-17 19:20:04 +01:00
while ( @ ob_end_flush ());
exit ( " </html> " );
2009-01-20 17:43:49 +01:00
}
2009-02-11 17:55:04 +01:00
} elseif ( ! isset ( $_SESSION [ 'id_usuario' ]) && isset ( $_GET [ " login " ])) {
// Login process
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
2008-06-26 16:57:11 +02:00
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
$nick = process_user_login ( $nick , $pass );
if ( $nick !== false ) {
2009-01-07 11:42:38 +01:00
unset ( $_GET [ " sec2 " ]);
$_GET [ " sec " ] = " general/logon_ok " ;
logon_db ( $nick , $REMOTE_ADDR );
$_SESSION [ 'id_usuario' ] = $nick ;
$config [ 'id_user' ] = $nick ;
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 );
2008-07-21 14:23:28 +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' );
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
audit_db ( $nick , $REMOTE_ADDR , " Logon Failed " , " Invalid login: " . $nick );
2009-02-17 19:20:04 +01:00
while ( @ ob_end_flush ());
exit ( " </html> " );
2007-02-27 20:03:56 +01:00
}
2008-06-26 16:57:11 +02:00
} elseif ( ! isset ( $_SESSION [ 'id_usuario' ])) {
// 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
} else {
// There is session for id_usuario
$config [ " id_user " ] = $_SESSION [ " id_usuario " ];
}
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 " ];
logoff_db ( $iduser , $REMOTE_ADDR );
session_unregister ( " id_usuario " );
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>' ;
2008-06-26 16:57:11 +02:00
} else {
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
2008-06-26 16:57:11 +02:00
// Page loader / selector
2008-08-04 10:15:16 +02:00
if ( $page != " " ) {
$page .= '.php' ;
if ( file_exists ( $page )) {
if ( ! is_extension ( $page )) {
require ( $page );
} else {
if ( $sec [ 0 ] == 'g' ) {
2008-08-05 12:47:40 +02:00
extension_call_godmode_function ( basename ( $page ));
2008-08-04 10:15:16 +02:00
} else {
2008-08-05 12:47:40 +02:00
extension_call_main_function ( basename ( $page ));
2008-08-04 10:15:16 +02:00
}
}
2008-06-26 16:57:11 +02:00
} else {
2009-02-11 17:55:04 +01:00
echo '<br /><strong class="error">' . __ ( 'Sorry! I can\'t find the page!' ) . '</strong>' ;
2008-08-04 10:15:16 +02:00
}
2008-08-21 23:07:20 +02:00
} else {
2008-10-22 14:01:36 +02:00
if ( enterprise_hook ( 'load_logon_ok' ) === ENTERPRISE_NOT_HOOK ) {
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-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 '</div>' ; //container div
2009-02-11 17:55:04 +01:00
while ( @ ob_end_flush ());
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-17 19:20:04 +01:00
?>