2008-07-25 Sancho Lerena <slerena@gmail.com>

* pandoradb.sql: Added new tables for planned downtimes.
	
	* godmode/menu.php: Added entry for manage downtimes.

	* group_list.php: Stetic changes in table.

	* modificar_server.php: Fixed timestamp render for start/update 
	timestamp of each server.

	* functions.php: Minimal estetic changes in help function.

	* functions_db.php: Change header (Flexible <- Free)

	* functions_html.php: Now select admits multiselect option. Default
	class for table render is now databox not databox_color.

	* AUTHORS: Update list of authors and make a reference to contributors.

	* function_reporting.php: Header change, updated datetime string format.

	* language_en.php, language_es_es.php: Changed FREE for Flexible.

	* pandora.css: Minimal changes. Update color of Monitor count in tactical.

	* menu.php: Added some new event options: CSV Export, RSS and new marquee
	event visualizer. 

	* estado_ultimopaquete.php: Header update.

	* tactical.php: Added link to data module alerts. 

	* ver_agente.php: Fixed a problem in ajax code that was rending bad 
	count of down monitors. Using boolean comparation on result of function
	get_db_sql(). This kind problem could be in more lines of code.

	* events.php: New quicklinks to RSS, CSV and Marquee in event viewer.

	* export_csv.php, events_rss.php: Fixed duped call to function includes. 

	* graph_viewer.php: I hope this fix FINALLY the annoying bug of graph
	type selector.

	* visual_console/index.php: Updated header.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@973 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2008-07-25 18:37:32 +00:00
parent 574f8dd2e9
commit 8a14d42f81
23 changed files with 224 additions and 104 deletions

View File

@ -1,3 +1,9 @@
Sancho Lerena <slerena@gmail.com>
Esteban Sanchez <esteban.sanchez@artica.es>
Jorge Gonzalez <jorge.gonzalez@artica.es>
Raul Mateos <raulofpandora@gmail.com>
Ramon Novoa <ramon.novoa@artica.es>
See full list of contributors on:
http://www.pandorafms.org

View File

@ -1,3 +1,49 @@
2008-07-25 Sancho Lerena <slerena@gmail.com>
* pandoradb.sql: Added new tables for planned downtimes.
* godmode/menu.php: Added entry for manage downtimes.
* group_list.php: Stetic changes in table.
* modificar_server.php: Fixed timestamp render for start/update
timestamp of each server.
* functions.php: Minimal estetic changes in help function.
* functions_db.php: Change header (Flexible <- Free)
* functions_html.php: Now select admits multiselect option. Default
class for table render is now databox not databox_color.
* AUTHORS: Update list of authors and make a reference to contributors.
* function_reporting.php: Header change, updated datetime string format.
* language_en.php, language_es_es.php: Changed FREE for Flexible.
* pandora.css: Minimal changes. Update color of Monitor count in tactical.
* menu.php: Added some new event options: CSV Export, RSS and new marquee
event visualizer.
* estado_ultimopaquete.php: Header update.
* tactical.php: Added link to data module alerts.
* ver_agente.php: Fixed a problem in ajax code that was rending bad
count of down monitors. Using boolean comparation on result of function
get_db_sql(). This kind problem could be in more lines of code.
* events.php: New quicklinks to RSS, CSV and Marquee in event viewer.
* export_csv.php, events_rss.php: Fixed duped call to function includes.
* graph_viewer.php: I hope this fix FINALLY the annoying bug of graph
type selector.
* visual_console/index.php: Updated header.
2008-07-22 Evi Vanoost <vanooste@rcbi.rochester.edu>
* operation/messages/message.php: Rewrote large parts of the script
Simplified functions. Fixed a bug where group messages sent a message

View File

@ -109,7 +109,7 @@ if ($delete_group) {
echo "<h2>".lang_string ("group_management")." &gt; ";
echo lang_string ("definedgroups")."</h2>";
$table->width = '400px';
$table->width = '65%';
$table->head = array ();
$table->head[0] = lang_string ("icon");
$table->head[1] = lang_string ("name");

View File

@ -63,6 +63,17 @@ if (comprueba_login() == 0){
echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gagente&amp;sec2=godmode/groups/group_list' class='mn'>".lang_string ("manage_groups")."</a></li></ul></div>";
}
// Planned downtimes
if ((give_acl($id_user, 0, "AW")==1)){
if (isset($_GET["sec2"]) && ($_GET["sec2"] == "godmode/agentes/planned_downtime" || $_GET["sec2"] == "godmode/agentes/planned_downtime")){
echo "<div class='arrowgs'>";
}
else
echo "<div class='arrowg'>";
echo "<ul class='mn'><li><a href='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime' class='mn'>".lang_string ("Scheduled downtime")."</a></li></ul></div>";
}
}
}

View File

@ -1,16 +1,8 @@
<?php
// Pandora FMS - the Free monitoring system
// Pandora FMS - the Flexible monitoring system
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
// Main PHP/SQL code development and project architecture and management
// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// CSS and some PHP additions
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// Javascript Active Console code.
// Copyright (c) 2006 Jose Navarro <contacto@indiseg.net>
// Additions to Pandora FMS 1.2 graph code and new XML reporting template management
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@ -22,34 +14,40 @@
// 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.
// Load global vars
require("include/config.php");
if (comprueba_login() == 0) {
if ((give_acl($id_user, 0, "AR")==1) or (give_acl($id_user,0,"AW")) or (dame_admin($id_user)==1)) {
check_login();
if (isset($_GET["delete"])) {
$id_server=entrada_limpia($_GET["server_del"]);
$sql = "DELETE FROM tserver WHERE id_server='".$id_server."'";
$result=mysql_query($sql);
if ($result) echo "<h3 class='suc'>".$lang_label["del_server_ok"]."</h3>";
else echo "<h3 class='suc'>".$lang_label["del_server_no"]."</h3>";
}
if (isset($_GET["update"])) {
$name=entrada_limpia($_POST["name"]);
$address=entrada_limpia($_POST["address"]);
$description=entrada_limpia($_POST["description"]);
$id_server=entrada_limpia($_POST["server"]);
$sql = "UPDATE tserver SET name='".$name."', ip_address='".$address."', description='".$description."' WHERE id_server='".$id_server."'";
$result=mysql_query($sql);
if ($result) echo "<h3 class='suc'>".$lang_label["upd_server_ok"]."</h3>";
else echo "<h3 class='suc'>".$lang_label["upd_server_no"]."</h3>";
}
if (isset($_GET["server"])) {
$id_server=entrada_limpia($_GET["server"]);
echo "<h2>".$lang_label["view_servers"]." &gt; ";
echo $lang_label["update_server"]."</h2>";
if ((give_acl($config["id_user"], 0, "AR")!=1) AND (give_acl($id_user, 0, "AW") != 1)) {
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to access Server Management");
require ("general/noaccess.php");
}
if (isset($_GET["delete"])) {
$id_server=entrada_limpia($_GET["server_del"]);
$sql = "DELETE FROM tserver WHERE id_server='".$id_server."'";
$result=mysql_query($sql);
if ($result) echo "<h3 class='suc'>".$lang_label["del_server_ok"]."</h3>";
else echo "<h3 class='suc'>".$lang_label["del_server_no"]."</h3>";
}
if (isset($_GET["update"])) {
$name=entrada_limpia($_POST["name"]);
$address=entrada_limpia($_POST["address"]);
$description=entrada_limpia($_POST["description"]);
$id_server=entrada_limpia($_POST["server"]);
$sql = "UPDATE tserver SET name='".$name."', ip_address='".$address."', description='".$description."' WHERE id_server='".$id_server."'";
$result=mysql_query($sql);
if ($result) echo "<h3 class='suc'>".$lang_label["upd_server_ok"]."</h3>";
else echo "<h3 class='suc'>".$lang_label["upd_server_no"]."</h3>";
}
if (isset($_GET["server"])) {
$id_server=entrada_limpia($_GET["server"]);
echo "<h2>".$lang_label["view_servers"]." &gt; ";
echo $lang_label["update_server"]."</h2>";
$query="SELECT * FROM tserver WHERE id_server=".$id_server;
$result=mysql_query($query);
@ -75,20 +73,18 @@ if (comprueba_login() == 0) {
}
else {
echo "<div class='nf'>".$lang_label["no_server"]."</div>";
}
}
echo '</table>';
echo '<table cellpadding="4" cellspacing="4" width="450">';
echo '<tr><td align="right">';
echo '<input type="submit" class="sub upd" value="'.$lang_label["update"].'"></table>';
}
else
{
}
else {
$sql='SELECT * FROM tserver';
echo "<h2>".$lang_label["view_servers"]." &gt; ";
echo $lang_label["manage_servers"]."</h2>";
// Connect DataBase
$result=mysql_query($sql);
if (mysql_num_rows($result)){
echo "<table cellpadding='4' cellspacing='4' witdh='550' class='databox'>";
@ -150,8 +146,9 @@ if (comprueba_login() == 0) {
if ($checksum == 1){
echo "&nbsp; <img src='images/binary.png'>";
}
echo "</td><td class='".$tdcolor."f9' align='middle'>".substr($keepalive,0,25)."</td>";
echo "</td>";
echo "<td class='".$tdcolor."f9' align='middle'>".substr($laststart,0,25)."</td>";
echo "<td class='".$tdcolor."f9' align='middle'>".substr($keepalive,0,25)."</td>";
echo "<td class='".$tdcolor."f9' align='middle'>
<a href='index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del=".$id_server."&delete'>
<img src='images/cross.png' border='0'></td></tr>";
@ -180,12 +177,7 @@ if (comprueba_login() == 0) {
}
else {
echo "<div class='nf'>".$lang_label["no_server"]."</div>";
}
}
}
} else {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Agent view");
require ("general/noaccess.php");
}
}
?>

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS - the Free Monitoring System
// ========================================
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
@ -186,7 +186,7 @@ function give_human_time ($int_seconds) {
* @param help_id Help id to be shown when clicking.
*/
function popup_help ($help_id, $return = false) {
$output = "<a href='javascript:help_popup(".$help_id.")'>[H]</a>";
$output = "&nbsp;<a href='javascript:help_popup(".$help_id.")'>[H]</a>";
if ($return)
return $output;
echo $output;

View File

@ -1,6 +1,6 @@
<?php
// Pandora FMS - the Free monitoring system
// ========================================
// Pandora FMS - the Flexible monitoring system
// ============================================
// Copyright (c) 2004-2008 Sancho Lerena, <slerena@gmail.com>
// Copyright (c) 2005-2008 Artica Soluciones Tecnologicas
@ -1333,7 +1333,7 @@ function get_db_sql ($sql, $field = 0) {
* false in case of empty result
*/
function get_db_all_rows_sql ($sql) {
$return = process_sql($sql);
$return = process_sql ($sql);
if (! empty ($return))
return $return;

View File

@ -1,6 +1,6 @@
<?php
// Pandora FMS - the Free Monitoring System
// ========================================
// Pandora FMS - the Flexible Monitoring System
// =============================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
@ -28,10 +28,14 @@
* $nothing Label when nothing is selected.
* $nothing_value Value when nothing is selected
*/
function print_select ($fields, $name, $selected = '', $script = '', $nothing = 'select', $nothing_value = '0', $return = false) {
function print_select ($fields, $name, $selected = '', $script = '', $nothing = 'select', $nothing_value = '0', $return = false, $multiple = false) {
$output = "\n";
$attributes = ($script) ? 'onchange="'. $script .'"' : '';
if ($multiple){
$attributes .= ' multiple="yes" size=10 ';
}
$output .= '<select id="'.$name.'" name="'.$name.'" '.$attributes.">\n";
if ($nothing != '') {
@ -79,7 +83,7 @@ function print_select ($fields, $name, $selected = '', $script = '', $nothing =
* $nothing Label when nothing is selected.
* $nothing_value Value when nothing is selected
*/
function print_select_from_sql ($sql, $name, $selected = '', $script = '', $nothing = 'select', $nothing_value = '0', $return = false) {
function print_select_from_sql ($sql, $name, $selected = '', $script = '', $nothing = 'select', $nothing_value = '0', $return = false, $multiple = false) {
$fields = array ();
$result = mysql_query ($sql);
@ -92,7 +96,7 @@ function print_select_from_sql ($sql, $name, $selected = '', $script = '', $noth
$fields[$row[0]] = $row[1];
}
$output = print_select ($fields, $name, $selected, $script, $nothing, $nothing_value, true);
$output = print_select ($fields, $name, $selected, $script, $nothing, $nothing_value, true, $multiple);
if ($return)
return $output;
@ -319,7 +323,7 @@ function print_table ($table, $return = false) {
}
if (empty ($table->class)) {
$table->class = 'databox_color';
$table->class = 'databox';
}
$tableid = empty ($table->id) ? 'table'.$table_count : $table->id;

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS - the Free Monitoring System
// ========================================
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
@ -119,7 +119,7 @@ function general_stats ($id_user, $id_group = 0) {
$data_alert = 0;
$data_alert_total = 0;
$monitor_alert_total = 0;
$ahora=date("Y/m/d H:i:s");
$ahora=date("Y-m-d H:i:s");
$ahora_sec = strtotime($ahora);
// Prepare data to show

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS - the Free Monitoring System
// ========================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
// This program is free software; you can redistribute it and/or
@ -86,9 +86,9 @@ $lang_label["field2"]="Field #2 (Single Line)";
$lang_label["field3"]="Field #3 (Full Text)";
$lang_label["no_access_title"]="You don't have access to this page";
$lang_label["no_access_text"]="Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br><br>Please know that all attempts to access this page are recorded in security logs of Pandora System Database";
$lang_label["header_title"]="Free Monitoring System";
$lang_label["header_title"]="the Flexible Monitoring System";
$lang_label["gpl_notice"]="is a <b>Free Software Project, licensed under GPL terms</b>";
$lang_label["gpl_notice"]="is a <b>OpenSource Software Project, licensed under GPL terms</b>";
$lang_label["gpl_used"]="Designed using GPL software and tools";
$lang_label["gen_date"]="Page generated at";

View File

@ -79,9 +79,9 @@ $lang_label["field2"]="Campo #2 (Línea sencilla)";
$lang_label["field3"]="Campo #3 (Texto completo)";
$lang_label["no_access_title"]="No tiene permiso para acceder a esta página";
$lang_label["no_access_text"]="El acceso a esta página está restringido a usuarios autorizados, contacte con el administrador del sistema si necesita ayuda. <br><br>Todos los intentos de acceso a esta página son grabados en los logs de seguridad de Pandora FMS";
$lang_label["header_title"]="Sistema Libre de Monitorización";
$lang_label["header_title"]="el Sistema Flexible de Monitorización";
$lang_label["gpl_notice"]="es un <b>Proyecto de Software Libre bajo licencia GPL</b>";
$lang_label["gpl_notice"]="es un <b>Proyecto OpenSource bajo licencia GPL</b>";
$lang_label["gpl_used"]="Desarrollado utilizando herramientas y software GPL";
$lang_label["gen_date"]="Página generada el ";

View File

@ -661,7 +661,7 @@ span#logo_text2 {
}
td.datos_green, td.datos_greenf9 {
background-color: #C7EAD5;
background-color: #BBFFA4;
padding: 5px 5px 5px 5px;
}
@ -681,7 +681,7 @@ td.datos_blue, td.datos_bluef9 {
}
td.datos_grey, td.datos_greyf9 {
background-color: #DCDCDC;
background-color: #E4E4E4;
padding: 5px 5px 5px 5px;
}
@ -752,4 +752,5 @@ td.big_data {
a.big_data {
text-decoration: none; font: bold 1em Arial, Sans-serif;
color: #000;
}

View File

@ -1,8 +1,8 @@
<?php
// Pandora FMS - the Free Monitoring System
// ========================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
// This program is free software; you can redistribute it and/or

View File

@ -1,6 +1,6 @@
<?PHP
// Pandora FMS - the Free Monitoring System
// ========================================
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
@ -189,6 +189,7 @@ if (mysql_num_rows ($result3)) {
echo $lang_label["never"];
} else {
$ahora = time();
// Async modules
if (($row3["id_tipo_modulo"] > 20) AND ($row3["id_tipo_modulo"] < 100)){
echo human_time_comparation($row3["timestamp"]);
} else {

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS
// ====================================
// Pandora FMS - The Flexible Monitoring System
// ============================================
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2008 Artica Soluciones Tecnologicas, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
@ -36,6 +36,7 @@ echo lang_string ("tactical_view")."</h2>";
$data = general_stats ($id_user,-1);
$monitor_checks = $data[0];
$monitor_ok = $data[1];
$monitor_bad = $data[2];
$monitor_unknown = $data[3];
$monitor_alert = $data[4];
@ -106,7 +107,7 @@ echo "<br><br>";
echo "<tr>";
echo "<th colspan=2>".lang_string ("monitor_checks")."</th>";
echo "<tr><td class=datos2><b>"."Monitor checks"."</b></td>";
echo "<td style='font: bold 2em Arial' class='datos2'>";
echo "<td style='font: bold 2em Arial;' class='datos2'>";
echo "<a class='big_data' href='index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60&status=-1'>";
echo $monitor_checks."</A></td>";
@ -181,11 +182,16 @@ if ($data_not_init > 0)
else
echo "-";
echo "<tr><td class=datos><b>"."Alerts Fired"."</b></td>";
echo "<td class=datos style='font: bold 2em Arial; color: #f00;'>";
echo "<td class=datos style='font: bold 2em Arial'>";
echo "<a style=color:#f00' class='big_data' href='index.php?sec=eventos&sec2=operation/events/events&search=&event_type=alert_fired'>";
if ($data_alert > 0)
echo $data_alert;
else
echo "-";
echo "</A>";
echo "<tr><td class=datos2><b>"."Alerts Total";
echo "<td class=datos2 style='font: bold 2em Arial'>".$data_alert_total;

View File

@ -53,7 +53,7 @@ if (defined ('AJAX')) {
echo '<strong>'.lang_string ('Last remote contact').':</strong> '.human_time_comparation($agent['ultimo_contacto_remoto']).'<br />';
$sql = sprintf ('SELECT tagente_modulo.descripcion, tagente_modulo.nombre
FROM tagente_estado, tagente_modulo
FROM tagente_estado, tagente_modulo
WHERE tagente_modulo.id_agente = %d
AND tagente_modulo.id_tipo_modulo in (2, 6, 9, 18, 21, 100)
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
@ -63,12 +63,18 @@ if (defined ('AJAX')) {
$sql = sprintf ('SELECT COUNT(*)
FROM tagente_modulo
WHERE id_agente = %d
AND disabled = 0
AND id_tipo_modulo in (2, 6, 9, 18, 21, 100)', $id_agent);
$total_modules = get_db_sql ($sql);
if ($bad_modules === false)
$size_bad_modules = 0;
else
$size_bad_modules = sizeof ($bad_modules);
// Modules down
if (sizeof ($bad_modules)) {
echo '<strong>'.lang_string ('Monitors down').':</strong> '.sizeof ($bad_modules).' / '.$total_modules;
if ($size_bad_modules > 0) {
echo '<strong>'.lang_string ('Monitors down').':</strong> '.$size_bad_modules.' / '.$total_modules;
echo '<ul>';
foreach ($bad_modules as $module) {
echo '<li>';

View File

@ -1,6 +1,6 @@
<?php
// Pandora FMS - the Free Monitoring System
// ========================================
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
@ -179,8 +179,10 @@ echo "<h2>".$lang_label["events"]." &gt; ".lang_string ("event_main_view"). "&nb
if ($config["pure"] == 1)
echo "<a target='_top' href='$url&pure=0'><img src='images/monitor.png' title='".lang_string("Normal screen")."'></a>";
else
else {
// Fullscreen
echo "<a target='_top' href='$url&pure=1'><img src='images/monitor.png' title='".lang_string("Full screen")."'></a>";
}
echo "</h2>";
echo "<a href=\"javascript:;\" onmousedown=\"toggleDiv('event_control');\">";
@ -250,8 +252,15 @@ echo "<input type='text' size=15 value='".$search."' name='search'>";
echo "<td colspan=2>";
echo "<input type=submit value='".lang_string("Update")."' class='sub upd'>";
echo "&nbsp;&nbsp;&nbsp;";
// CSV
echo "<a href='operation/events/export_csv.php?ev_group=$ev_group&event_type=$event_type&search=$search&severity=$severity&status=$status&id_agent=$id_agent'>";
echo "<img src='images/wand.png' title='Export to CSV file'></A>";
echo "<img src='images/disk.png' title='Export to CSV file'></A>";
// Marquee
echo "&nbsp;<a target='_top' href='operation/events/events_marquee.php'><img src='images/heart.png' title='".lang_string("Marquee display")."'></a>";
// RSS
echo "&nbsp;<a target='_top' href='operation/events/events_rss.php'><img src='images/transmit.png' title='".lang_string("RSS Events")."'></a>";
echo "</table>";
echo "</form>";

View File

@ -1,5 +1,5 @@
<?php
// Pandora FMS - the Free monitoring system
// Pandora FMS - the Flexible monitoring system
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
@ -20,7 +20,7 @@ error_reporting(E_ALL);
require "../../include/config.php";
require "../../include/functions.php";
require "../../include/functions_db.php";
require_once "../../include/functions_db.php";
$constraints = "";

View File

@ -1,7 +1,7 @@
<?php
// Pandora FMS
// ========================================
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
// Main PHP/SQL code development and project architecture and management
//
@ -20,7 +20,7 @@ session_start();
include ("../../include/config.php");
include ("../../include/functions.php");
include ("../../include/functions_db.php");
include_once ("../../include/functions_db.php");
session_write_close();

View File

@ -1,13 +1,11 @@
<?php
// Pandora FMS - the Free monitoring system
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
// Pandora FMS - the Frexible monitoring system
// ============================================
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
// Main PHP/SQL code development and project architecture and management
// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// CSS and some PHP additions
// Copyright (c) 2006 Jose Navarro <contacto@indiseg.net>
// Additions to Pandora FMS 1.2 graph code
// CSS and some PHP additions
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es
//
// This program is free software; you can redistribute it and/or
@ -178,6 +176,27 @@ if (give_acl($_SESSION["id_usuario"], 0, "AR")==1) {
echo "<ul class='mn'><li><a href='index.php?sec=eventos&amp;sec2=operation/events/event_statistics' class='mn'>".lang_string ("statistics")."</a></li></ul></div>";
}
// Event RSS
if (isset($_GET["sec"]) && $_GET["sec"] == "eventos"){
echo "<div class='arrow'>";
echo "<ul class='mn'><li>";
echo "<a target='_top' href='operation/events/events_rss.php' class='mn'>".lang_string ("RSS")."</a></li></ul></div>";
}
// Event CSV
if (isset($_GET["sec"]) && $_GET["sec"] == "eventos"){
echo "<div class='arrow'>";
echo "<ul class='mn'><li>";
echo "<a target='_top' href='operation/events/events_csv.php' class='mn'>".lang_string ("CSV File")."</a></li></ul></div>";
}
// Event Marquee
if (isset($_GET["sec"]) && $_GET["sec"] == "eventos"){
echo "<div class='arrow'>";
echo "<ul class='mn'><li>";
echo "<a target='_top' href='operation/events/events_marquee.php' class='mn'>".lang_string ("Marquee")."</a></li></ul></div>";
}
// Users
if(isset($_GET["sec2"]) && ($_GET["sec2"] == "operation/users/user" || $_GET["sec2"] == "operation/users/user_edit" )) {
echo '<div id="op5s">';

View File

@ -83,9 +83,10 @@ if (isset($_GET["view_graph"])){
$period = 3600 * $period;
$events = $row["events"];
$description = $row["description"];
$stacked = (int) get_parameter ('stacked');
if (! $stacked)
$stacked = (int) get_parameter ('stacked', -1);
if ($stacked == -1)
$stacked = $row["stacked"];
$name = $row["name"];
if (($row["private"]==1) && ($row["id_user"] != $id_user)){
@ -139,10 +140,11 @@ border=1 alt=''>";
echo "<td class='datos'>";
$stackeds = array ();
$stackeds[0] = lang_string ('Graph defined');
$stackeds[0] = lang_string ('Area');
$stackeds[1] = lang_string ('Stacked area');
$stackeds[2] = lang_string ('Line');
print_select ($stackeds, 'stacked', $stacked , '', '', 0);
print_select ($stackeds, 'stacked', $stacked , '', '', -1, false, false);
echo "<td class='datos'>";
$zooms = array();

View File

@ -1,10 +1,10 @@
<?PHP
// Pandora FMS - the Free monitoring system
// Pandora FMS - the Flexible Monitoring System
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
// Main PHP/SQL code development and project architecture and management
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es
// Copyright (c) 2005-2008 Artica Soluciones Tecnologicas, info@artica.es
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License

View File

@ -712,3 +712,20 @@ CREATE TABLE `tserver_export_data` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tplanned_downtime` (
`id` int(20) unsigned NOT NULL auto_increment,
`description` varchar(255) NOT NULL default '',
`start` date NOT NULL default '0000-00-00',
`stop` date NOT NULL default '0000-00-00',
`start_time` time NOT NULL default '00:00:00',
`stop_time` time NOT NULL default '00:00:00',
`executed` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tplanned_downtime_agents` (
`id` int(20) unsigned NOT NULL auto_increment,
`id_agent` mediumint(8) unsigned NOT NULL default '0',
`id_downtime` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;