2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
|
|
|
|
2007-03-12 18:58:52 +01:00
|
|
|
// Pandora FMS - the Free 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
|
|
|
|
//
|
2007-01-01 19:41:27 +01:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2007-03-12 18:58:52 +01:00
|
|
|
// as published by the Free Software Foundation; version 2
|
2007-01-01 19:41:27 +01: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.
|
|
|
|
// Load global vars
|
2006-03-27 05:37:27 +02:00
|
|
|
require("include/config.php");
|
|
|
|
if ( (give_acl($id_user, 0, "LM")==1)){
|
|
|
|
// Var init
|
|
|
|
$descripcion = "";
|
|
|
|
$nombre = "";
|
|
|
|
$comando ="";
|
|
|
|
|
|
|
|
if (isset($_GET["id_alerta"])){
|
|
|
|
$id_alerta = entrada_limpia($_GET["id_alerta"]);
|
|
|
|
$sql1='SELECT * FROM talerta WHERE id_alerta = '.$id_alerta;
|
|
|
|
$result=mysql_query($sql1);
|
|
|
|
if ($row=mysql_fetch_array($result)){
|
|
|
|
$descripcion = $row["descripcion"];
|
|
|
|
$nombre= $row["nombre"];
|
|
|
|
$comando = $row["comando"];
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
echo "<h3 class='error'>".$lang_label["alert_error"]."</h3>";
|
|
|
|
echo "</table>";
|
|
|
|
include ("general/footer.php");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$creacion_alerta = 0;
|
|
|
|
if (isset($_GET["creacion"])){
|
|
|
|
$creacion_alerta = 1;
|
|
|
|
}
|
|
|
|
|
2007-05-27 04:55:55 +02:00
|
|
|
echo "<h2>".$lang_label["alert_config"]." > ";
|
2007-01-01 19:41:27 +01:00
|
|
|
if (isset($_GET["creacion"])){
|
|
|
|
echo $lang_label["create_alert"];
|
|
|
|
}
|
|
|
|
if (isset($_GET["id_alerta"])){
|
|
|
|
echo $lang_label["mod_alert"];
|
|
|
|
}
|
2008-06-30 Jorge Gonzalez <jorge.gonzalez@artica.es>
* include/styles/pandora.css: Added cursor style for inline help.
* include/help/en/help_manage_alerts.php: Added help page for Alert
management.
* include/help/en/help_snmpcommunity.php: Added help page for SNMP
community.
* include/help/en/help_map_builder.php: Added help page for map
builder.
* include/help/en/help_postprocess.php: Checked spelling.
* include/help/en/help_module_type.php: Added help page for Module
type.
* include/help/en/help_snmpoid.php: Added help page for SNMP OID.
* include/help/en/help_alerts.php: Added help page for Alert
configuration.
* include/help/en/help_module_definition.php: Added help page for
Module definition.
* include/functions.php: Added cursor style for inline help.
* include/languages/language_en.php: Added new strings.
* operation/agentes/estado_grupo.php: Fixed wrong link and text, it is
a group, not an agent.
* operation/agentes/tactical.php: Fixed bug for empty values.
* godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/reporting/map_builder.php, godmode/alerts/plugin.php,
godmode/alerts/configure_alert.php: Added suppot for inline help.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@909 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-30 17:46:36 +02:00
|
|
|
pandora_help("manage_alerts");
|
2007-05-27 04:55:55 +02:00
|
|
|
echo "</h2>";
|
2007-01-01 19:41:27 +01:00
|
|
|
?>
|
2007-06-06 18:23:24 +02:00
|
|
|
<form name="alerta" method="post" action="index.php?sec=galertas&sec2=godmode/alerts/modify_alert&id_alerta=<?php echo $id_alerta ?>">
|
2006-03-27 05:37:27 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
if ($creacion_alerta == 1)
|
|
|
|
echo "<input type='hidden' name='crear_alerta' value='1'>";
|
|
|
|
else {
|
|
|
|
echo "<input type='hidden' name='update_alerta' value='1'>";
|
|
|
|
echo "<input type='hidden' name='id_alerta' value='".$id_alerta."'>";
|
|
|
|
}
|
|
|
|
?>
|
2007-06-16 18:04:01 +02:00
|
|
|
<table width="500" cellspacing="4" cellpadding="4" class="databox_color">
|
2007-06-06 18:23:24 +02:00
|
|
|
<tr><td class="datos"><?php echo $lang_label["alertname"] ?></td>
|
|
|
|
<td class="datos">
|
|
|
|
<input type="text" name="nombre" size=30 value="<?php echo $nombre ?>"></td>
|
|
|
|
</tr>
|
2006-03-27 05:37:27 +02:00
|
|
|
<tr>
|
2007-06-06 18:23:24 +02:00
|
|
|
<td class="datos2"><?php echo $lang_label["command"] ?></td>
|
|
|
|
<td class="datos2">
|
|
|
|
<input type="text" name="comando" size="50" value="<?php echo $comando ?>">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td class="datos"><?php echo $lang_label["description"] ?></td>
|
2006-07-04 12:10:21 +02:00
|
|
|
<td class="datos"><textarea name="descripcion" cols="50" rows="7">
|
2006-03-27 05:37:27 +02:00
|
|
|
<?php echo $descripcion ?>
|
|
|
|
</textarea>
|
2007-06-06 18:23:24 +02:00
|
|
|
</td></tr>
|
2007-05-24 22:03:05 +02:00
|
|
|
</table>
|
|
|
|
<table width=500>
|
|
|
|
<tr><td align="right">
|
2007-01-01 19:41:27 +01:00
|
|
|
<?php
|
|
|
|
if (isset($_GET["creacion"])){
|
2007-06-06 18:23:24 +02:00
|
|
|
echo "<input name='crtbutton' type='submit' class='sub wand' value='".$lang_label["create"]."'>";
|
2007-01-01 19:41:27 +01:00
|
|
|
} else {
|
2007-06-06 18:23:24 +02:00
|
|
|
echo "<input name='uptbutton' type='submit' class='sub upd' value='".$lang_label["update"]."'>";
|
2007-01-01 19:41:27 +01:00
|
|
|
} ?>
|
2006-03-27 05:37:27 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
} // end page
|
|
|
|
else {
|
|
|
|
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Alert Management");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
}
|
2007-05-24 22:03:05 +02:00
|
|
|
?>
|