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-10-17 13:16:53 +02:00
|
|
|
$build_version="PC081016";
|
|
|
|
$pandora_version="v2.1-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!).
|
2008-09-01 10:51:04 +02:00
|
|
|
$develop_bypass = 0;
|
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") &&
|
|
|
|
(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
|
|
|
|
2008-11-17 16:49:29 +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
|
2007-05-30 19:32:35 +02: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
|
|
|
|
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']);
|
|
|
|
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>';
|
|
|
|
|
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-11-17 16:49:29 +01:00
|
|
|
if ($intervalo > 0) {
|
2008-07-02 14:30:56 +02:00
|
|
|
// Agent selection filters and refresh
|
|
|
|
$query = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': '') . '://' . $_SERVER['SERVER_NAME'];
|
2008-08-21 23:07:20 +02:00
|
|
|
if ($_SERVER['SERVER_PORT'] != 80 && (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE && $_SERVER['SERVER_PORT'] != 443))
|
2008-07-02 14:30:56 +02:00
|
|
|
$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"];
|
2008-08-21 23:07:20 +02:00
|
|
|
$query = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': '') . '://' . $_SERVER['SERVER_NAME'];
|
|
|
|
if ($_SERVER['SERVER_PORT'] != 80 && (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE && $_SERVER['SERVER_PORT'] != 443))
|
2007-08-06 13:44:49 +02:00
|
|
|
$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
|
|
|
|
2008-10-22 14:01:36 +02:00
|
|
|
enterprise_include ('index.php');
|
|
|
|
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '<title>Pandora FMS - '.__('the Flexible Monitoring System').'</title>
|
2008-10-22 14:01:36 +02:00
|
|
|
<meta http-equiv="expires" content="0" />
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
|
|
<meta name="resource-type" content="document" />
|
|
|
|
<meta name="distribution" content="global" />
|
|
|
|
<meta name="author" content="Sancho Lerena" />
|
|
|
|
<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" />
|
|
|
|
<link rel="stylesheet" href="include/styles/'.$config["style"].'.css" type="text/css" />
|
2007-05-20 19:12:31 +02:00
|
|
|
<script type="text/javascript" src="include/javascript/wz_jsgraphics.js"></script>
|
2008-10-22 14:01:36 +02:00
|
|
|
<script type="text/javascript" src="include/javascript/pandora.js"></script>';
|
|
|
|
|
|
|
|
enterprise_hook ('load_html_header');
|
|
|
|
|
|
|
|
echo '</head>';
|
2007-02-16 19:29:37 +01:00
|
|
|
|
2008-06-26 16:57:11 +02:00
|
|
|
// Show custom background
|
2008-08-21 23:07:20 +02:00
|
|
|
if ($config["pure"] == 0) {
|
2008-07-02 14:30:56 +02:00
|
|
|
echo '<body bgcolor="#555555">';
|
2008-08-21 23:07:20 +02:00
|
|
|
} else {
|
2008-07-02 14:30:56 +02:00
|
|
|
echo '<body bgcolor="#FFFFFF">';
|
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-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-10-22 14:01:36 +02:00
|
|
|
$sql = sprintf ("SELECT `id_usuario`, `password` FROM `tusuario` WHERE `id_usuario` = '%s'", $nick);
|
2008-08-04 16:29:41 +02:00
|
|
|
$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-08-21 23:07:20 +02:00
|
|
|
unset ($_GET['pass'], $pass);
|
2008-06-26 16:57:11 +02:00
|
|
|
} else {
|
|
|
|
// Login failed (bad password)
|
2006-12-15 16:25:19 +01:00
|
|
|
unset ($_GET["sec2"]);
|
2008-08-21 23:07:20 +02:00
|
|
|
require "general/logon_failed.php";
|
|
|
|
// change password to do not show any string
|
|
|
|
// $primera = substr ($pass,0,1);
|
|
|
|
// $ultima = substr ($pass, strlen ($pass) - 1, 1);
|
|
|
|
// $pass = $primera . "****" . $ultima;
|
2006-12-15 16:25:19 +01:00
|
|
|
audit_db ($nick, $REMOTE_ADDR, "Logon Failed",
|
2008-08-21 23:07:20 +02:00
|
|
|
"Incorrect password: " . $nick);
|
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"]);
|
2008-08-21 23:07:20 +02:00
|
|
|
require "general/logon_failed.php";
|
|
|
|
// do not show any password string. Unsafe especially with
|
|
|
|
// short passwords
|
|
|
|
//$primera = substr ($pass, 0, 1);
|
|
|
|
//$ultima = substr ($pass, strlen ($pass) - 1, 1);
|
|
|
|
//$pass = $primera . "****" . $ultima;
|
2008-06-26 16:57:11 +02:00
|
|
|
audit_db ($nick, $REMOTE_ADDR, "Logon Failed",
|
2008-08-21 23:07:20 +02:00
|
|
|
"Invalid username: " . $nick);
|
2008-06-26 16:57:11 +02:00
|
|
|
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";
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '</body></html>';
|
2008-06-26 16:57:11 +02:00
|
|
|
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-10-22 14:01:36 +02:00
|
|
|
$sec2 = "";
|
|
|
|
$sec = "";
|
|
|
|
if (isset ($_GET["sec2"])) {
|
2008-06-26 16:57:11 +02:00
|
|
|
$sec2 = get_parameter_get ('sec2');
|
2008-11-17 16:49:29 +01:00
|
|
|
$sec2 = safe_url_extraclean ($sec2);
|
2008-08-04 10:15:16 +02:00
|
|
|
$page = $sec2;
|
2008-08-21 23:07:20 +02:00
|
|
|
}
|
|
|
|
|
2008-10-22 14:01:36 +02:00
|
|
|
if (isset ($_GET["sec"])) {
|
2008-06-26 16:57:11 +02:00
|
|
|
$sec = get_parameter_get ('sec');
|
2008-11-17 16:49:29 +01:00
|
|
|
$sec = safe_url_extraclean ($sec);
|
2008-08-04 10:15:16 +02:00
|
|
|
$page = $sec2;
|
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-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 {
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '<br><b class="error">'.__('Sorry! I can\'t find the page!').'</b>';
|
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
|
|
|
|
2008-08-21 23:07:20 +02:00
|
|
|
if ($config["pure"] == 0) {
|
2008-06-26 16:57:11 +02:00
|
|
|
echo '</div>'; // main
|
|
|
|
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>';
|
|
|
|
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-11-17 16:49:29 +01:00
|
|
|
?>
|