2006-07-11 16:14:09 +02:00
|
|
|
<?php
|
|
|
|
|
2008-07-25 20:37:32 +02:00
|
|
|
// Pandora FMS - the Flexible Monitoring System
|
|
|
|
// ============================================
|
|
|
|
// Copyright (c) 2008 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
|
|
|
|
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
|
|
|
$build_version="PC080226";
|
|
|
|
$pandora_version="v2.0-dev";
|
2007-05-30 19:32:35 +02:00
|
|
|
global $build_version;
|
|
|
|
global $pandora_version;
|
|
|
|
|
2007-06-12 20:10:57 +02:00
|
|
|
// Set to 1 to do not check for installer or config file (for development!).
|
2007-09-08 20:05:06 +02:00
|
|
|
$develop_bypass = 1;
|
2007-04-11 05:12:48 +02:00
|
|
|
|
2007-02-20 19:09:54 +01:00
|
|
|
if ($develop_bypass != 1){
|
|
|
|
// If no config file, automatically try to install
|
|
|
|
if (! file_exists("include/config.php")){
|
2007-04-11 05:12:48 +02:00
|
|
|
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;
|
|
|
|
} else
|
|
|
|
include ("install.php");
|
2007-02-20 19:09:54 +01:00
|
|
|
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") &&
|
2007-03-19 20:39:40 +01:00
|
|
|
(substr(sprintf('%o', fileperms('include/config.php')), -4) != "0660") &&
|
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
|
|
|
(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
|
|
|
|
2007-08-08 20:36:18 +02:00
|
|
|
if ((! file_exists("include/config.php")) OR (! 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
|
2007-05-30 19:32:35 +02:00
|
|
|
session_start();
|
2008-07-21 14:23:28 +02:00
|
|
|
require_once ("include/config.php");
|
|
|
|
require_once ("include/languages/language_".$config["language"].".php");
|
2008-07-02 14:30:56 +02:00
|
|
|
require_once ("include/functions.php");
|
|
|
|
require_once ("include/functions_db.php");
|
2008-07-21 14:23:28 +02:00
|
|
|
//We should require this or you might end up with some empty strings
|
2008-08-04 10:15:16 +02:00
|
|
|
load_extensions ($config['extensions']);
|
2006-03-27 05:37:27 +02:00
|
|
|
?>
|
2006-06-29 21:31:53 +02:00
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<?php
|
2008-07-02 14:30:56 +02:00
|
|
|
// Pure mode (without menu, header and footer).
|
2008-08-04 10:15:16 +02:00
|
|
|
$config["pure"] = get_parameter ("pure", 0);
|
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-07-02 14:30:56 +02:00
|
|
|
// Auto Refresh page
|
2008-08-04 10:15:16 +02:00
|
|
|
$intervalo = get_parameter ("refr", 0);
|
2008-07-02 14:30:56 +02:00
|
|
|
if ($intervalo > 0){
|
|
|
|
// Agent selection filters and refresh
|
|
|
|
$query = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': '') . '://' . $_SERVER['SERVER_NAME'];
|
|
|
|
if ($_SERVER['SERVER_PORT'] != 80)
|
|
|
|
$query .= ":" . $_SERVER['SERVER_PORT'];
|
|
|
|
|
|
|
|
$query .= $_SERVER['SCRIPT_NAME'];
|
|
|
|
if (isset ($_REQUEST["refr"])) {
|
|
|
|
$query .= '?';
|
|
|
|
|
|
|
|
foreach ($_POST as $key => $value) {
|
|
|
|
$query .= '&'.$key.'='.$value;
|
|
|
|
}
|
|
|
|
foreach ($_GET as $key => $value) {
|
|
|
|
$query .= '&'.$key.'='.$value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset ($_POST["ag_group"])) {
|
|
|
|
$ag_group = $_POST["ag_group"];
|
|
|
|
$query = 'http://' . $_SERVER['SERVER_NAME'];
|
2007-08-06 13:44:49 +02:00
|
|
|
if ($_SERVER['SERVER_PORT'] != 80)
|
|
|
|
$query .= ":" . $_SERVER['SERVER_PORT'];
|
2008-07-02 14:30:56 +02:00
|
|
|
$query .= $_SERVER['REQUEST_URI'] . '&ag_group_refresh=' . $ag_group;
|
|
|
|
} else {
|
|
|
|
echo '<meta http-equiv="refresh" content="' . $intervalo . '; URL=' . $query . '">';
|
2007-05-20 19:12:31 +02:00
|
|
|
}
|
2008-07-02 14:30:56 +02:00
|
|
|
}
|
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
|
|
|
|
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
|
|
|
<title>Pandora FMS - <?php echo lang_string("header_title"); ?></title>
|
2006-03-27 05:37:27 +02:00
|
|
|
<meta http-equiv="expires" content="0">
|
2007-08-20 17:32:27 +02:00
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
2006-03-27 05:37:27 +02:00
|
|
|
<meta name="resource-type" content="document">
|
|
|
|
<meta name="distribution" content="global">
|
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
|
|
|
<meta name="author" content="Sancho Lerena">
|
2006-03-27 05:37:27 +02:00
|
|
|
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others">
|
|
|
|
<meta name="keywords" content="pandora, monitoring, system, GPL, software">
|
|
|
|
<meta name="robots" content="index, follow">
|
|
|
|
<link rel="icon" href="images/pandora.ico" type="image/ico">
|
2008-07-07 19:33:31 +02:00
|
|
|
<link rel="stylesheet" href="include/styles/<?php echo $config['style']; ?>.css" type="text/css">
|
2007-06-27 19:45:42 +02:00
|
|
|
|
2007-05-20 19:12:31 +02:00
|
|
|
<script type="text/javascript" src="include/javascript/wz_jsgraphics.js"></script>
|
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
|
|
|
<script type="text/javascript" src="include/javascript/pandora.js"></script>
|
2006-03-27 05:37:27 +02:00
|
|
|
</head>
|
2007-02-16 19:29:37 +01:00
|
|
|
|
|
|
|
<?php
|
2008-06-26 16:57:11 +02:00
|
|
|
// Show custom background
|
|
|
|
if ($config["pure"] == 0)
|
2008-07-02 14:30:56 +02:00
|
|
|
echo '<body bgcolor="#555555">';
|
2008-06-26 16:57:11 +02:00
|
|
|
else
|
2008-07-02 14:30:56 +02:00
|
|
|
echo '<body bgcolor="#FFFFFF">';
|
|
|
|
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
|
2006-12-15 16:25:19 +01:00
|
|
|
|
2008-06-26 16:57:11 +02:00
|
|
|
// Login process
|
2008-08-04 16:29:41 +02:00
|
|
|
if (! isset ($_SESSION['id_usuario']) && isset ($_GET["login"])) {
|
2008-06-26 16:57:11 +02:00
|
|
|
$nick = get_parameter_post ("nick");
|
|
|
|
$pass = get_parameter_post ("pass");
|
|
|
|
// Connect to Database
|
2008-08-04 16:29:41 +02:00
|
|
|
$sql = sprintf("SELECT `id_usuario`, `password` FROM `tusuario` WHERE `id_usuario` = '%s'",$nick);
|
|
|
|
$row = get_db_row_sql ($sql);
|
2008-06-26 16:57:11 +02:00
|
|
|
|
|
|
|
// For every registry
|
2008-08-04 16:29:41 +02:00
|
|
|
if ($row !== false) {
|
|
|
|
if ($row["password"] == md5 ($pass)) {
|
2008-06-26 16:57:11 +02:00
|
|
|
// Login OK
|
|
|
|
// Nick could be uppercase or lowercase (select in MySQL
|
|
|
|
// is not case sensitive)
|
|
|
|
// We get DB nick to put in PHP Session variable,
|
|
|
|
// to avoid problems with case-sensitive usernames.
|
|
|
|
// Thanks to David Muñiz for Bug discovery :)
|
|
|
|
$nick = $row["id_usuario"];
|
|
|
|
unset ($_GET["sec2"]);
|
|
|
|
$_GET["sec"] = "general/logon_ok";
|
|
|
|
update_user_contact ($nick);
|
|
|
|
logon_db ($nick, $REMOTE_ADDR);
|
|
|
|
$_SESSION['id_usuario'] = $nick;
|
2008-08-04 16:29:41 +02:00
|
|
|
$config['id_user'] = $nick;
|
2008-06-26 16:57:11 +02:00
|
|
|
} else {
|
|
|
|
// Login failed (bad password)
|
2006-12-15 16:25:19 +01:00
|
|
|
unset ($_GET["sec2"]);
|
2006-03-27 05:37:27 +02:00
|
|
|
include "general/logon_failed.php";
|
2008-06-26 16:57:11 +02:00
|
|
|
// change password to do not show all string
|
|
|
|
$primera = substr ($pass,0,1);
|
2006-12-15 16:25:19 +01:00
|
|
|
$ultima = substr ($pass, strlen ($pass) - 1, 1);
|
|
|
|
$pass = $primera . "****" . $ultima;
|
|
|
|
audit_db ($nick, $REMOTE_ADDR, "Logon Failed",
|
2008-06-26 16:57:11 +02:00
|
|
|
"Incorrect password: " . $nick . " / " . $pass);
|
2006-03-27 05:37:27 +02:00
|
|
|
exit;
|
|
|
|
}
|
2008-07-21 14:23:28 +02:00
|
|
|
} else {
|
2008-06-26 16:57:11 +02:00
|
|
|
// User not known
|
|
|
|
unset ($_GET["sec2"]);
|
|
|
|
include "general/logon_failed.php";
|
|
|
|
$primera = substr ($pass, 0, 1);
|
|
|
|
$ultima = substr ($pass, strlen ($pass) - 1, 1);
|
|
|
|
$pass = $primera . "****" . $ultima;
|
|
|
|
audit_db ($nick, $REMOTE_ADDR, "Logon Failed",
|
|
|
|
"Invalid username: " . $nick . " / " . $pass);
|
|
|
|
exit;
|
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
|
|
|
|
include "general/login_page.php";
|
|
|
|
exit;
|
|
|
|
} 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"])) {
|
|
|
|
include "general/logoff.php";
|
|
|
|
$iduser = $_SESSION["id_usuario"];
|
|
|
|
logoff_db ($iduser, $REMOTE_ADDR);
|
|
|
|
session_unregister ("id_usuario");
|
|
|
|
exit;
|
|
|
|
}
|
2008-08-04 10:15:16 +02:00
|
|
|
$page = "";
|
2008-06-26 16:57:11 +02:00
|
|
|
if (isset ($_GET["sec2"])){
|
|
|
|
$sec2 = get_parameter_get ('sec2');
|
|
|
|
$sec2 = parameter_extra_clean ($sec2);
|
2008-08-04 10:15:16 +02:00
|
|
|
$page = $sec2;
|
2008-06-26 16:57:11 +02:00
|
|
|
} else
|
|
|
|
$sec2 = "";
|
|
|
|
|
|
|
|
if (isset ($_GET["sec"])){
|
|
|
|
$sec = get_parameter_get ('sec');
|
|
|
|
$sec = parameter_extra_clean ($sec);
|
2008-08-04 10:15:16 +02:00
|
|
|
$page = $sec2;
|
2008-07-02 14:30:56 +02:00
|
|
|
} else {
|
2008-06-26 16:57:11 +02:00
|
|
|
$sec = "";
|
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!
|
|
|
|
session_write_close();
|
|
|
|
|
|
|
|
// Header
|
2008-08-04 10:15:16 +02:00
|
|
|
if ($config["pure"] == 0) {
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '<div id="container">';
|
|
|
|
echo '<div id="head">';
|
2008-07-02 14:30:56 +02:00
|
|
|
require ("general/header.php");
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '</div>';
|
|
|
|
echo '<div id="page">';
|
2008-07-02 14:30:56 +02:00
|
|
|
echo '<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
|
|
|
|
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
|
|
|
|
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') {
|
|
|
|
extension_godmode_function (basename ($page));
|
|
|
|
} else {
|
|
|
|
extension_main_function (basename ($page));
|
|
|
|
}
|
|
|
|
}
|
2008-06-26 16:57:11 +02:00
|
|
|
} else {
|
|
|
|
echo "<br><b class='error'>".lang_string("Sorry! I can't find the page!")."</b>";
|
2008-08-04 10:15:16 +02:00
|
|
|
}
|
2008-06-26 16:57:11 +02:00
|
|
|
} else
|
|
|
|
require ("general/logon_ok.php"); //default
|
|
|
|
|
|
|
|
if ($config["pure"] == 0){
|
|
|
|
echo '</div>'; // main
|
|
|
|
echo '<div style="clear:both"></div>';
|
|
|
|
echo '</div>'; // page
|
|
|
|
} else {
|
|
|
|
echo "</div>";
|
|
|
|
}
|
|
|
|
|
|
|
|
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>';
|
|
|
|
echo '</div>';
|
|
|
|
}
|
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
|
|
|
echo '</body></html>';
|
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-18 Esteban Sanchez <estebans@artica.es>
* functions.php: Added documentation to all the functions in JavaDoc
format, which is an facto-standard. Deleted unused functions. Improved
the code of some functions. Tab and blankspaces style correction.
Replaced old lang_label with lang_string(). Some functions to print
selects were replaced with a functio to get an array with all the
possible values so the caller will use print_select() with them.
* godmode/agentes/agent_manager.php: Use print_select() instead of
deleted function.
* godmode/agentes/alert_manager_editor.php: Use print_select() instead
of deleted function. Use print_checkbox(). Style correction
* godmode/reporting/map_builder.php, operation/agentes/ver_agente.php,
operation/messages/message.php,
operation/reporting/reporting_viewer_pdf.php:
Replaced deleted functions with their equivalents.
* include/functions_db.php: Documented some functions, some work is
still required. Added get_reports() to get all the reports a user can
see. Deleted unused functions. Replaced deleted functions with their
equivalents. Added get_db_row_sql(), get_previous_data(). Fixed errors
when calculating average, max, min and sum values of an agent module.
* include/functions_reporting.php: Fixed errors when calculating SLA.
* operation/events/events.php: Tab and blankspaces correction.
Replaced form_priority with print_select(). Style correction.
* operation/reporting/custom_reporting.php: Show all the reports a
user can see. Use Pandora functions.
* operation/reporting/reporting_viewer.php: Show unknown label if SLA
can not be calculated.
* operation/snmpconsole/snmp_alert.php: Avoid an extra indentation
level by using check_login() properly. Tab and blankspaces correction.
* index.php, operation/users/user_edit.php: Adopted to renamed
function.
* godmode/db/db_sanity.php, reporting/fgraph.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-19 11:01:12 +02:00
|
|
|
?>
|