2007-03-02 Sancho Lerena <slerena@artica.es>

* pandoradb_data.sql: Modified, but needs update!, not
          finished.

	* .png: Many files added.
	
	* Massive commit. Updated almost every file for agent
	visualization, module visualizacion, agent management, index,
	styles, and more. Added many icons, and altered so many files.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@388 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-03-02 17:56:07 +00:00
parent c5c0d97d50
commit 9a6657db65
176 changed files with 1043 additions and 775 deletions

View File

@ -1,3 +1,9 @@
2007-03-02 Sancho Lerena <slerena@artica.es>
* Massive commit. Updated almost every file for agent
visualization, module visualizacion, added many icons, and altered
so many files.
2007-02-27 Sancho Lerena <slerena@openideas.info> 2007-02-27 Sancho Lerena <slerena@openideas.info>
* include/styles/god.css: Moved style block. * include/styles/god.css: Moved style block.

View File

@ -1,13 +1,15 @@
<?php <?php
// Pandora - the Free monitoring system // Pandora FMS - the Free monitoring system
// ==================================== // ========================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com // Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Copyright (c) 2005-2006 Artica Soluciones Tecnológicas S.L, info@artica.es // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com // Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006-2007 Jose Navarro jose@jnavarro.net
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 // as published by the Free Software Foundation version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -15,6 +17,24 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
?>
Pandora <?php echo $pandora_version." - ".$lang_label["header_title"];?> echo "<table width=100% border=0>";
echo "<tr>";
if (isset ($_SESSION["id_usuario"])){
echo "<td width=40%>";
$id_usuario = entrada_limpia ($_SESSION["id_usuario"]);
if (dame_admin($id_usuario)==1)
echo "<img src='images/user_suit.png' class='bot'> ";
else
echo "<img src='images/user_green.png' class='bot'> ";
echo $lang_label["has_connected"]. '
[<b class="f10">'. $id_usuario. '</b>]';
echo "<td width=30%>";
echo "<a href='index.php?sec=main'><img src='images/information.png' class='bot'> ". $lang_label["information"]."</A>";
echo "<td width=20%>";
echo "<a href='help/en/toc.php'><img src='images/help.png' class='bot'> ". $lang_label["help"]."</A>";
echo "<td align='right' width=10%>";
echo "<a href='index.php?bye=bye'><img src='images/lock.png' class='bot'> ". $lang_label["logout"]."</A>";
}
echo "</table>";
?>

View File

@ -1,9 +1,22 @@
<?php <?php
// Pandora - The Free Monitoring System // Pandora FMS - the Free monitoring system
// This code is protected by GPL license. // ========================================
// Este codigo esta protegido por la licencia GPL. // Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Sancho Lerena <slerena@gmail.com>, 2003-2006 // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
// Raul Mateos <raulofpandora@gmail.com>, 2004-2006 // Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006-2007 Jose Navarro jose@jnavarro.net
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation version 2
// 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.
$sql1='SELECT * FROM tlink ORDER BY name'; $sql1='SELECT * FROM tlink ORDER BY name';
$result=mysql_query($sql1); $result=mysql_query($sql1);

View File

@ -17,6 +17,17 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
?> ?>
<div align='center'>
<h1><?php echo $lang_label["logged_out"] ?></h1> <h1 id="log"><?php echo $lang_label["logged_out"] ; ?></h1>
<div class='msg'><?php echo $lang_label["logout_msg"] ?></div> <div id='login'>
<div id="login_box">
<?PHP echo $lang_label["logout_msg"]; ?>
</div>
<div id="logo_box">
<a href="index.php"><img src="images/logo_menu.gif" border="0" alt="logo"></a><br>
<?php echo $babel_version; ?>
</div>
<div id="ip"><?php echo 'IP: <b class="f10">'.$REMOTE_ADDR.'</b>'; ?></div>
</div>
<div id="foot"><?php require("general/footer.php") ?></div>
</div>

View File

@ -17,32 +17,26 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
echo "<div class='jus'>"; echo "<div class='jus'>";
$nick = $_SESSION['id_usuario']; $nick = $_SESSION['id_usuario'];
echo "<h1>" . $lang_label["welcome_title"] . "</h1>"; echo "<h1>" . $lang_label["welcome_title"] . "</h1>";
echo $lang_label["main_text"]; echo "<p>";
echo "<br /><br />"; echo $lang_label["main_text"];
echo $lang_label["has_connected"] . " <b>" . $nick . "</b> - "; echo "</p>";
if (dame_admin ($nick) == 1) { echo "<div id='activity'>";
echo $lang_label["administrator"] . '. '; // Show last activity from this user
} else { echo "<h2>" . $lang_label["user_last_activity"] . "</h2>";
echo $lang_label["normal_user"] . '. '; // Show table header
} echo '<table cellpadding="3" cellspacing="3" width="700"><tr>';
echo '<th>' . $lang_label["user"] . '</th>';
echo '<th>' . $lang_label["action"] . '</th>';
echo '<th class="w130">' . $lang_label["date"] . '</th>';
echo '<th>' . $lang_label["src_address"] . '</th>';
echo '<th class="w200">' . $lang_label["comments"] . '</th></tr>';
echo "<div id='activity'>"; // Skip offset records
// Show last activity from this user $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND ID_usuario = '" . $nick . "' ORDER BY fecha DESC limit 15";
echo "<h2>" . $lang_label["user_last_activity"] . "</h2>";
// Show table header
echo '<table cellpadding="3" cellspacing="3" width="700"><tr>';
echo '<th>' . $lang_label["user"] . '</th>';
echo '<th>' . $lang_label["action"] . '</th>';
echo '<th class="w130">' . $lang_label["date"] . '</th>';
echo '<th>' . $lang_label["src_address"] . '</th>';
echo '<th class="w200">' . $lang_label["comments"] . '</th></tr>';
// Skip offset records
$query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND ID_usuario = '" . $nick . "' ORDER BY fecha DESC limit 15";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$contador = 5; // Max items $contador = 5; // Max items
@ -73,7 +67,9 @@ $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND I
$contador--; $contador--;
} }
echo "<tr><td colspan='5'><div class='raya'></div></td></tr></table></div>"; echo "<tr><td colspan='5'><div class='raya'></div>";
echo "</td></tr></table>";
echo "</div>"; // activity
$sql='SELECT COUNT(*) FROM tmensajes WHERE id_usuario_destino="' . $nick . '" AND estado="FALSE";'; $sql='SELECT COUNT(*) FROM tmensajes WHERE id_usuario_destino="' . $nick . '" AND estado="FALSE";';
$resultado = mysql_query ($sql); $resultado = mysql_query ($sql);
@ -88,43 +84,43 @@ $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND I
echo '<h2 class="mgb25">' . $lang_label["stat_title"] . '</h2>'; echo '<h2 class="mgb25">' . $lang_label["stat_title"] . '</h2>';
$query1 = "SELECT COUNT(*) FROM tusuario"; $query1 = "SELECT COUNT(id_usuario) FROM tusuario";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $row = mysql_fetch_array ($result);
echo '<span class="users">'; echo '<span class="users">';
echo $lang_label["there_are"] . $row[0] . ' ' . $lang_label["user_defined"]; echo $lang_label["there_are"] ."<b>". $row[0] . '</b> ' . $lang_label["user_defined"];
echo '</span>'; echo '</span>';
$query1 = "SELECT COUNT(*) FROM tagente"; $query1 = "SELECT COUNT(id_agente) FROM tagente";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $row = mysql_fetch_array ($result);
echo '<span class="agents">'; echo '<span class="agents">';
echo $lang_label["there_are"] . $row[0] .' ' . $lang_label["agent_defined"]; echo $lang_label["there_are"] . "<b>".$row[0]."</b> ". $lang_label["agent_defined"];
echo '</span>'; echo '</span>';
$query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos"; $query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $row = mysql_fetch_array ($result);
echo '<span class="data">'; echo '<span class="data">';
echo $lang_label["there_are"] . $row[0] . ' ' . $lang_label["data_harvested"]; echo $lang_label["there_are"] . "<b>".$row[0] . '</b> ' . $lang_label["data_harvested"];
echo '</span>'; echo '</span>';
$query1 = "SELECT COUNT(*) FROM talerta_agente_modulo"; $query1 = "SELECT COUNT(*) FROM talerta_agente_modulo";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $row = mysql_fetch_array ($result);
echo "<span class='alerts'>"; echo "<span class='alerts'>";
echo $lang_label["there_are"] . $row[0] .' ' . $lang_label["alert_defined"]; echo $lang_label["there_are"] . "<b>".$row[0] .'</b> ' . $lang_label["alert_defined"];
echo "</span>"; echo "</span>";
echo '<span class="time">'; echo '<span class="time">';
$query1 = "SELECT timestamp FROM tagente_estado ORDER BY timestamp DESC"; $query1 = "SELECT timestamp FROM tagente_estado ORDER BY timestamp DESC LIMIT 1";
$result = mysql_query($query1); $result = mysql_query($query1);
if($row = mysql_fetch_array($result)!='') { // Take the first element only if ($row = mysql_fetch_array($result)) { // Take the first element only
echo $lang_label["data_timestamp"] . $row["timestamp"]; echo $lang_label["data_timestamp"] . "<b>".$row["timestamp"]."</b>";
} else { } else {
echo 'No data received yet!'; echo 'No data received yet!';
} }
echo '</span>'; echo '</span>';
echo '</div>'; echo '</div>'; // class "jus"
?> ?>

View File

@ -1,9 +1,22 @@
<?php <?php
// Pandora - The Free Monitoring System // Pandora FMS - the Free monitoring system
// This code is protected by GPL license. // ========================================
// Este codigo esta protegido por la licencia GPL. // Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Sancho Lerena <slerena@gmail.com>, 2003-2006 // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
// Raul Mateos <raulofpandora@gmail.com>, 2004-2006 // Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006-2007 Jose Navarro jose@jnavarro.net
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation version 2
// 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.
?> ?>
<br> <br>
<a href="index.php"><img src="images/logo_menu.gif" border="0" alt="logo"></a> <a href="index.php"><img src="images/logo_menu.gif" border="0" alt="logo"></a>
@ -21,15 +34,8 @@ if (! isset ($_SESSION["id_usuario"])) {
echo '<br />IP: <b class="f10">' . $REMOTE_ADDR . '</b><br /></div>'; echo '<br />IP: <b class="f10">' . $REMOTE_ADDR . '</b><br /></div>';
} else { } else {
$iduser = $_SESSION['id_usuario']; $iduser = $_SESSION['id_usuario'];
require ("godmode/menu.php"); require ("godmode/menu.php");
echo '<div class="w155f10"><form method="post" action="index.php?logoff=1">';
echo '<input type="hidden" name="bye" value="bye">';
echo '<input name="logoff" type="submit" class="sub" value="' . $lang_label["logout"] . '">';
echo '</form>' . $lang_label["has_connected"] . '<br />';
echo '[<b class="f10">' . $iduser . '</b>]<br />';
echo "<br />IP: <b class='f10'>" . $REMOTE_ADDR . "</b><br /></div><div>&nbsp;</div>";
require ("links_menu.php"); require ("links_menu.php");
} }
?> ?>

View File

@ -17,22 +17,21 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load global vars // Load global vars
require("include/config.php"); require("include/config.php");
if (comprueba_login() != 0) { if (comprueba_login() != 0) {
audit_db("Noauth",$REMOTE_ADDR, "No authenticated acces","Trying to access event viewer"); audit_db("Noauth",$REMOTE_ADDR, "No authenticated acces","Trying to access event viewer");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }
$id_usuario =$_SESSION["id_usuario"];
if (give_acl($id_usuario, 0, "PM")!=1) {
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access event viewer");
require ("general/noaccess.php");
exit;
}
$id_usuario =$_SESSION["id_usuario"];
if (give_acl($id_usuario, 0, "PM")!=1) {
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access event viewer");
require ("general/noaccess.php");
exit;
}
echo "<h2>".$lang_label["audit_title"]."</h2>"; echo "<h2>".$lang_label["audit_title"]."</h2>";
if (isset($_GET["offset"])) if (isset($_GET["offset"]))
@ -44,7 +43,7 @@ if (give_acl($id_usuario, 0, "PM")!=1) {
if (isset($_GET["tipo_log"])){ if (isset($_GET["tipo_log"])){
$tipo_log = $_GET["tipo_log"]; $tipo_log = $_GET["tipo_log"];
$tipo_log_select = " WHERE accion='".$tipo_log."' "; $tipo_log_select = " WHERE accion='".$tipo_log."' ";
} elseif (isset($_POST["tipo_log"])){ } elseif (isset($_POST["tipo_log"])) {
$tipo_log = $_POST["tipo_log"]; $tipo_log = $_POST["tipo_log"];
if ($tipo_log == "-1"){ if ($tipo_log == "-1"){
$tipo_log_select = ""; $tipo_log_select = "";
@ -52,57 +51,58 @@ if (give_acl($id_usuario, 0, "PM")!=1) {
} else } else
$tipo_log_select = " WHERE accion='".$tipo_log."' "; $tipo_log_select = " WHERE accion='".$tipo_log."' ";
} }
else $tipo_log_select= ""; else
$tipo_log_select= "";
// generate select // generate select
echo "<h3>".$lang_label["filter"]; echo "<h3>".$lang_label["filter"];
echo "<a href='help/".$help_code."/chap6.php#6' target='_help' class='help'> echo "<a href='help/".$help_code."/chap6.php#6' target='_help' class='help'>
&nbsp;<span>".$lang_label["help"]."</span></a></h3>"; &nbsp;<span>".$lang_label["help"]."</span></a></h3>";
echo "<form name='query_sel' method='post' action='index.php?sec=godmode&sec2=godmode/admin_access_logs'>"; echo "<form name='query_sel' method='post' action='index.php?sec=godmode&sec2=godmode/admin_access_logs'>";
echo "<table border='0'><tr><td valign='middle'>"; echo "<table border='0'><tr><td valign='middle'>";
echo "<select name='tipo_log' onChange='javascript:this.form.submit();'>"; echo "<select name='tipo_log' onChange='javascript:this.form.submit();'>";
if (isset($tipo_log)) if (isset($tipo_log))
echo "<option>".$tipo_log; echo "<option>".$tipo_log;
echo "<option value='-1'>".$lang_label["all"]; echo "<option value='-1'>".$lang_label["all"];
$sql3="SELECT DISTINCT (accion) FROM `tsesion`"; $sql3="SELECT DISTINCT (accion) FROM `tsesion`";
// Prepare index for pagination // Prepare index for pagination
$result3=mysql_query($sql3); $result3=mysql_query($sql3);
while ($row3=mysql_fetch_array($result3)){ while ($row3=mysql_fetch_array($result3)){
if (isset($tipo_log)) { if (isset($tipo_log)) {
if ($tipo_log != $row3[0]) if ($tipo_log != $row3[0])
echo "<option value='".$row3[0]."'>".$row3[0]; echo "<option value='".$row3[0]."'>".$row3[0];
} else } else
echo "<option value='".$row3[0]."'>".$row3[0]; echo "<option value='".$row3[0]."'>".$row3[0];
} }
echo "</select>"; echo "</select>";
echo "<td valign='middle'><noscript><input name='uptbutton' type='submit' class='sub' value='".$lang_label["show"]."'></noscript>"; echo "<td valign='middle'><noscript><input name='uptbutton' type='submit' class='sub' value='".$lang_label["show"]."'></noscript>";
echo "</table></form>"; echo "</table></form>";
$sql2="SELECT COUNT(*) FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC"; $sql2="SELECT COUNT(*) FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC";
$result2=mysql_query($sql2); $result2=mysql_query($sql2);
$row2=mysql_fetch_array($result2); $row2=mysql_fetch_array($result2);
$counter = $row2[0]; $counter = $row2[0];
if (isset ($tipo_log)) if (isset ($tipo_log))
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs&tipo_log=".$tipo_log; $url = "index.php?sec=godmode&sec2=godmode/admin_access_logs&tipo_log=".$tipo_log;
else else
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs"; $url = "index.php?sec=godmode&sec2=godmode/admin_access_logs";
//echo "URLTipolog $tipo_log"; //echo "URLTipolog $tipo_log";
pagination ($counter, $url, $offset); pagination ($counter, $url, $offset);
echo '<br>'; echo '<br>';
// table header // table header
echo '<table cellpadding="3" cellspacing="3" width=700>'; echo '<table cellpadding="3" cellspacing="3" width=700>';
echo '<tr>'; echo '<tr>';
echo '<th class="w70">'.$lang_label["user"].'</th>'; echo '<th class="w70">'.$lang_label["user"].'</th>';
echo '<th>'.$lang_label["action"].'</th>'; echo '<th>'.$lang_label["action"].'</th>';
echo '<th class="w130">'.$lang_label["date"].'</th>'; echo '<th class="w130">'.$lang_label["date"].'</th>';
echo '<th class="w100">'.$lang_label["src_address"].'</th>'; echo '<th class="w100">'.$lang_label["src_address"].'</th>';
echo '<th class="w200">'.$lang_label["comments"].'</th>'; echo '<th class="w200">'.$lang_label["comments"].'</th>';
// Skip offset records // Skip offset records
$query1="SELECT * FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC"; $query1="SELECT * FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC";
$result=mysql_query($query1); $result=mysql_query($query1);
$offset_counter = 0; $offset_counter = 0;
while ($offset_counter < $offset){ while ($offset_counter < $offset){
if ($row=mysql_fetch_array($result)) if ($row=mysql_fetch_array($result))
@ -110,10 +110,10 @@ else
else else
$offset_counter = $offset; //exit condition $offset_counter = $offset; //exit condition
} }
$offset_counter = 0; $offset_counter = 0;
$color=1; $color=1;
// Get data // Get data
while ($row=mysql_fetch_array($result) and ($offset_counter < $block_size) ){ while ($row=mysql_fetch_array($result) and ($offset_counter < $block_size) ){
if ($color == 1){ if ($color == 1){
$tdcolor = "datos"; $tdcolor = "datos";
@ -131,9 +131,9 @@ else
echo '<td class="'.$tdcolor.'">'.$row["descripcion"]; echo '<td class="'.$tdcolor.'">'.$row["descripcion"];
echo '</tr>'; echo '</tr>';
$offset_counter++; $offset_counter++;
} }
// end table // end table
echo "<tr><td colspan='5'><div class='raya'></div></td></tr></table>"; echo "<tr><td colspan='5'><div class='raya'></div></td></tr></table>";
?> ?>

View File

@ -3,6 +3,14 @@
// ======================== // ========================
// AGENT GENERAL DATA FORM // AGENT GENERAL DATA FORM
// ======================== // ========================
// Load global vars
require("include/config.php");
if (give_acl($id_user, 0, "AW")!=1) {
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access agent manager");
require ("general/noaccess.php");
exit;
};
echo "<h2>".$lang_label["agent_conf"]; echo "<h2>".$lang_label["agent_conf"];
if (isset($_GET["creacion"])){ if (isset($_GET["creacion"])){
@ -15,6 +23,7 @@ echo " &gt; ".$lang_label["create_agent"]."
&nbsp;<span>".$lang_label["help"]."</span></a>"; &nbsp;<span>".$lang_label["help"]."</span></a>";
} }
echo "</h2>"; echo "</h2>";
echo "<div style='height: 25px'> </div>";
echo '<form name="conf_agent" method="post" action="index.php?sec=gagente& echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente">'; sec2=godmode/agentes/configurar_agente">';
@ -25,7 +34,7 @@ if ($creacion_agente == 1) {
echo "<input type='hidden' name='id_agente' value='".$id_agente."'>"; echo "<input type='hidden' name='id_agente' value='".$id_agente."'>";
} }
echo '<table width="650" cellpadding="3" cellspacing="3" class="fon">'; echo '<table width="650" cellpadding="3" cellspacing="3" class="fon">';
echo "<tr><td class='lb' rowspan='9' width='5'>"; echo "<tr><td class='lb' rowspan='9' width='1'>";
echo '<td class="datos"><b>'.$lang_label["agent_name"].'</b></td> echo '<td class="datos"><b>'.$lang_label["agent_name"].'</b></td>
<td class="datos"> <td class="datos">
<input type="text" name="agente" size=30 value="'.$nombre_agente.'">'; <input type="text" name="agente" size=30 value="'.$nombre_agente.'">';
@ -33,9 +42,6 @@ if (isset($_GET["creacion"])){
echo "&nbsp;"; echo "&nbsp;";
} else { } else {
echo " echo "
<a href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&id_agente=".$id_agente."'
<img src='images/setup.gif' width='16' valign='top' align='middle' border='0'></a>
<a href='index.php?sec=estado& <a href='index.php?sec=estado&
sec2=operation/agentes/ver_agente&id_agente=".$id_agente."'> sec2=operation/agentes/ver_agente&id_agente=".$id_agente."'>
<img src='images/lupa.gif' border='0' align='middle'></a>"; <img src='images/lupa.gif' border='0' align='middle'></a>";

View File

@ -1,21 +1,22 @@
<?php <?php
// Pandora - the Free monitoring system // Pandora FMS - the Free monitoring system
// ==================================== // ========================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com // Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com // Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006-2007 Jose Navarro jose@jnavarro.net
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 // as published by the Free Software Foundation version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.?>
?>
<?php <?php
// Load global vars // Load global vars
@ -26,6 +27,10 @@ if (give_acl($id_user, 0, "AW")!=1) {
exit; exit;
}; };
if (isset($_GET["id_agente"]))
$id_agente = $_GET["id_agente"];
else
$id_agente = -1;
// Init vars // Init vars
$descripcion = ""; $descripcion = "";
@ -37,9 +42,7 @@ $maximo = "0";
$minimo = "0"; $minimo = "0";
$nombre_agente = ""; $nombre_agente = "";
$direccion_agente = ""; $direccion_agente = "";
$id_agente = "";
$intervalo = "300"; $intervalo = "300";
$id_agente = "";
$id_server = ""; $id_server = "";
$max_alerts = 0; $max_alerts = 0;
$modo = 0; $modo = 0;
@ -69,6 +72,36 @@ $ip_target ="";
$snmp_community=""; $snmp_community="";
$creacion_agente = 0; $creacion_agente = 0;
$combo_snmp_oid=""; $combo_snmp_oid="";
// Show tabs
// ¯-----------------
echo "<div id='menu_tab'>
<ul class='mn'>
<li class='nomn'>";
echo "<li class='nomn'>";
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente'><img src='images/zoom.png' width='16' class='top' border=0>&nbsp; View agent</a>";
echo "</li>";
echo "<li class='nomn'>";
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=$id_agente'><img src='images/cog.png' width='16' class='top' border=0>&nbsp; Setup agent</a>";
echo "</li>";
echo "<li class='nomn'>";
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente=$id_agente'><img src='images/lightbulb.png' width='16' class='top' border=0>&nbsp; Modules</a>";
echo "</li>";
echo "<li class='nomn'>";
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente=$id_agente'><img src='images/bell.png' width='16' class='top' border=0>&nbsp; Alerts</a>";
echo "</li>";
echo "</ul>";
echo "</div>";
// Make some space between tabs and title
echo "<div style='height: 25px'> </div>";
// Unset variable to allow operations to work
$id_agente = "";
// Delete Alert // Delete Alert
// ============= // =============
if (isset($_GET["delete_alert"])){ // if modified some parameter if (isset($_GET["delete_alert"])){ // if modified some parameter
@ -513,28 +546,13 @@ if (isset($_GET["delete_module"])){ // DELETE agent module !
} }
// Load page depending on tab selected
// -----------------------------------
if (isset($_GET["tab"])) if (isset($_GET["tab"]))
$tab = $_GET["tab"]; $tab = $_GET["tab"];
else else
$tab = "main"; $tab = "main";
echo "<div id='menu_tab'>
<ul class='mn'>
<li class='nomn'>";
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=$id_agente'>Agent info</a>";
echo "</li>";
echo "<li class='nomn'>";
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente=$id_agente'>Modules</a>";
echo "</li>";
echo "<li class='nomn'>";
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente=$id_agente'>Alerts</a>";
echo "</li>";
echo "</ul>";
echo "</div>";
switch ($tab) { switch ($tab) {
case "main": require "agent_manager.php"; case "main": require "agent_manager.php";
break; break;
@ -545,5 +563,4 @@ case "alert": require "alert_manager.php";
} }
echo "FUCKIN SHIT";
?> ?>

View File

@ -17,12 +17,24 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load global vars // Load global vars
require("include/config.php"); require("include/config.php");
if (give_acl($id_user, 0, "AW")==1) { if (give_acl($id_user, 0, "AW") != 1) {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");
exit;
}
if (isset($_GET["offset"]))
$offset = entrada_limpia($_GET["offset"]);
else
$offset = 0;
if (isset($_GET["borrar_agente"])){ // if delete agent if (isset($_GET["borrar_agente"])){ // if delete agent
$id_agente = entrada_limpia($_GET["borrar_agente"]); $id_agente = entrada_limpia($_GET["borrar_agente"]);
$agent_name = dame_nombre_agente($id_agente);
$id_grupo = dame_id_grupo($id_agente); $id_grupo = dame_id_grupo($id_agente);
if (give_acl($id_user, $id_grupo, "AW")==1){ if (give_acl($id_user, $id_grupo, "AW")==1){
// Firts delete from agents table // Firts delete from agents table
@ -56,80 +68,98 @@ if (give_acl($id_user, 0, "AW")==1) {
$result=mysql_query($sql_delete4); $result=mysql_query($sql_delete4);
} }
$sql_delete2 ="DELETE FROM tagente_modulo $sql_delete2 ="DELETE FROM tagente_modulo
WHERE id_agente = ".$id_agente; // delete from tagente_modulo WHERE id_agente = ".$id_agente;
$sql_delete3 ="DELETE FROM tagente_estado $sql_delete3 ="DELETE FROM tagente_estado
WHERE id_agente = ".$id_agente; // delete from tagente_estado WHERE id_agente = ".$id_agente;
$result=mysql_query($sql_delete2); $result=mysql_query($sql_delete2);
$result=mysql_query($sql_delete3); $result=mysql_query($sql_delete3);
} else { audit_db($id_user,$REMOTE_ADDR, "Agent '$agent_name' deleted",
audit_db($id_user,$REMOTE_ADDR, "ACL Violation", "Agent Management");
"Trying to delete an Agent"); } else { // NO permissions.
require ("general/noaccess.php"); audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
"Trying to delete agent '$agent_name'");
require ("general/noaccess.php");
exit;
} }
} }
echo "<h2>".$lang_label["agent_conf"]."</h2>"; echo "<h2>".$lang_label["agent_conf"]." &gt; ".$lang_label["agent_defined2"]."
echo "<h3>".$lang_label["agent_defined2"]."
<a href='help/".$help_code."/chap3.php#3' target='_help' class='help'> <a href='help/".$help_code."/chap3.php#3' target='_help' class='help'>
<span>".$lang_label["help"]."</span></a></h3>"; <span>".$lang_label["help"]."</span></a></h2>";
$sql1='SELECT id_agente, nombre, id_grupo, comentarios $sql1="SELECT id_agente, nombre, id_grupo, comentarios, id_os
FROM tagente ORDER BY nombre'; FROM tagente ORDER BY nombre LIMIT $offset, $block_size";
$result=mysql_query($sql1); $result=mysql_query($sql1);
$sql2="SELECT COUNT(id_agente) FROM tagente";
$result2=mysql_query($sql2);
$row2=mysql_fetch_array($result2);
$total_events = $row2[0];
// Prepare pagination
echo "<div style='height: 20px'> </div>";
pagination ($total_events, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente", $offset);
echo "<div style='height: 20px'> </div>";
if (mysql_num_rows($result)){ if (mysql_num_rows($result)){
echo "<table cellpadding='3' cellspacing='3' width='600'>"; echo "<table cellpadding='4' cellspacing='4' width='700'>";
echo "<th>".$lang_label["agent_name"]; echo "<th>".$lang_label["agent_name"];
echo "<th>".$lang_label["group"]; echo "<th>".$lang_label["os"];
echo "<th>".$lang_label["description"]; echo "<th>".$lang_label["group"];
echo "<th>".$lang_label["delete"]; echo "<th>".$lang_label["description"];
$color=1; echo "<th>".$lang_label["delete"];
while ($row=mysql_fetch_array($result)){ $color=1;
$id_grupo = $row["id_grupo"]; while ($row=mysql_fetch_array($result)){
if ($color == 1){ $id_grupo = $row["id_grupo"];
$tdcolor = "datos"; if ($color == 1){
$color = 0; $tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
if (give_acl($id_user, $id_grupo, "AW")==1){
// Agent name
echo "<tr><td class='$tdcolor'>
<b><a href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&
id_agente=".$row["id_agente"]."'>".$row["nombre"]."</a></b></td>";
// Operating System icon
echo "<td class='$tdcolor' align='center'>
<img src='images/".dame_so_icon($row["id_os"])."'></td>";
// Group icon and name
echo "<td class='$tdcolor'>
<img src='images/groups_small/".show_icon_group($id_grupo).".png' class='bot' border='0'>
&nbsp; ".dame_grupo($id_grupo)."</td>";
// Description
echo "<td class='$tdcolor'>".$row["comentarios"]."</td>";
// Action
echo "<td class='$tdcolor' align='center'>
<a href='index.php?sec=gagente&
sec2=godmode/agentes/modificar_agente&
borrar_agente=".$row["id_agente"]."'
onClick='if (!confirm(\' ".$lang_label["are_you_sure"]."\'))
return false;'>
<img border='0' src='images/cancel.gif'></a></td>";
} }
else {
$tdcolor = "datos2";
$color = 1;
} }
if (give_acl($id_user, $id_grupo, "AW")==1){ echo "<tr><td colspan='4'><div class='raya'></div></td></tr>";
echo "<tr><td class='$tdcolor'>
<b><a href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&
id_agente=".$row["id_agente"]."'>".$row["nombre"]."</a></b></td>";
echo "<td class='$tdcolor'>
<img src='images/g_".show_icon_group($id_grupo).".gif' border='0'>
( ".dame_grupo($id_grupo)." )</td>";
echo "<td class='$tdcolor'>".$row["comentarios"]."</td>";
echo "<td class='$tdcolor' align='center'>
<a href='index.php?sec=gagente&
sec2=godmode/agentes/modificar_agente&
borrar_agente=".$row["id_agente"]."'
onClick='if (!confirm(\' ".$lang_label["are_you_sure"]."\'))
return false;'>
<img border='0' src='images/cancel.gif'></a></td>";
}
}
echo "<tr><td colspan='4'><div class='raya'></div></td></tr>";
echo "<tr><td align='right' colspan='4'>"; echo "<tr><td align='right' colspan='4'>";
echo "<form method='post' action='index.php?sec=gagente& echo "<form method='post' action='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&creacion=1'>"; sec2=godmode/agentes/configurar_agente&creacion=1'>";
echo "<input type='submit' class='sub' name='crt' echo "<input type='submit' class='sub' name='crt'
value='".$lang_label["create_agent"]."'>"; value='".$lang_label["create_agent"]."'>";
echo "</form></td></tr>"; echo "</form></td></tr>";
echo "</table>"; echo "</table>";
} else { } else {
// If no data... let's show a beautiful button to create agent
// This is a piece of crap because we're duplicanting code above
// of this, don't do again, Raul, please.
echo "<div class='nf'>".$lang_label["no_agent_def"]."</div>"; echo "<div class='nf'>".$lang_label["no_agent_def"]."</div>";
echo "<form method='post' action='index.php?sec=gagente& echo "<form method='post' action='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&creacion=1'>"; sec2=godmode/agentes/configurar_agente&creacion=1'>";
echo "<input type='submit' class='sub' name='crt' echo "<input type='submit' class='sub' name='crt'
value='".$lang_label["create_agent"]."'>"; value='".$lang_label["create_agent"]."'>";
echo "</form>"; echo "</form>";
}
} // Fin pagina
else {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");
} }
?> ?>

View File

@ -125,29 +125,35 @@ function type_change()
<?PHP <?PHP
// Load global vars
require("include/config.php");
if (give_acl($id_user, 0, "AW")!=1) {
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access agent manager");
require ("general/noaccess.php");
exit;
};
// MODULE VISUALIZATION TABLE
// ==========================
// Module visualization where in create mode
// MODULE VISUALIZATION
// ======================
if ( $creacion_agente != 1) { if ( $creacion_agente != 1) {
$sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'" $sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"
ORDER BY nombre'; ORDER BY nombre';
$result=mysql_query($sql1); $result=mysql_query($sql1);
echo "<h2>".$lang_label["agent_conf"]." &gt; ".$lang_label["assigned_modules"]."
<a href='help/".$help_code."/chap3.php#321' target='_help' class='help'>
<span>".$lang_label["help"]."</span></a></h2>";
if ($row=mysql_num_rows($result)){ if ($row=mysql_num_rows($result)){
?> echo '<table width="700" cellpadding="3" cellspacing="3" class="fon">';
<h3><?php echo $lang_label["assigned_modules"]?> echo '<tr>';
<a href='help/<?php echo $help_code ?>/chap3.php#321' target='_help' class='help'> echo "<th>".$lang_label["module_name"];
<span><?php echo $lang_label["help"] ?></span></a></h3> echo "<th>".$lang_label["type"];
<table width="700" cellpadding="3" cellspacing="3" class="fon"> echo "<th>".$lang_label["interval"];
<tr> echo "<th>".$lang_label["description"];
<th><?php echo $lang_label["module_name"]?> echo "<th>".$lang_label["module_group"];
<th><?php echo $lang_label["type"]?> echo "<th>".$lang_label["max_min"];
<th><?php echo $lang_label["interval"]?> echo "<th width=50>".$lang_label["action"];
<th><?php echo $lang_label["description"]?>
<th><?php echo $lang_label["module_group"]?>
<th><?php echo $lang_label["max_min"]?>
<th width="50"><?php echo $lang_label["action"]?>
<?php
$color=1; $color=1;
while ($row=mysql_fetch_array($result)){ while ($row=mysql_fetch_array($result)){
if ($color == 1){ if ($color == 1){
@ -175,7 +181,6 @@ if ( $creacion_agente != 1) {
} else { } else {
echo "<td class='$tdcolor'> N/A"; echo "<td class='$tdcolor'> N/A";
} }
echo "<td class='$tdcolor' title='$descripcion'>".substr($descripcion,0,30)."</td>"; echo "<td class='$tdcolor' title='$descripcion'>".substr($descripcion,0,30)."</td>";
echo "<td class='$tdcolor'>". echo "<td class='$tdcolor'>".
substr(dame_nombre_grupomodulo($module_group2),0,15)."</td>"; substr(dame_nombre_grupomodulo($module_group2),0,15)."</td>";
@ -188,6 +193,7 @@ if ( $creacion_agente != 1) {
echo "<td class='$tdcolor'>"; echo "<td class='$tdcolor'>";
if ($id_tipo != -1) if ($id_tipo != -1)
echo "<a href='index.php?sec=gagente& echo "<a href='index.php?sec=gagente&
tab=module&
sec2=godmode/agentes/configurar_agente& sec2=godmode/agentes/configurar_agente&
id_agente=".$id_agente."& id_agente=".$id_agente."&
delete_module=".$row["id_agente_modulo"]."'> delete_module=".$row["id_agente_modulo"]."'>
@ -196,19 +202,22 @@ if ( $creacion_agente != 1) {
echo "<a href='index.php?sec=gagente& echo "<a href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente& sec2=godmode/agentes/configurar_agente&
id_agente=".$id_agente."& id_agente=".$id_agente."&
tab=module&
update_module=".$row["id_agente_modulo"]."#modules'> update_module=".$row["id_agente_modulo"]."#modules'>
<img src='images/config.gif' border=0 alt='".$lang_label["update"]."' onLoad='type_change()'></b></a>"; <img src='images/config.gif' border=0 alt='".$lang_label["update"]."' onLoad='type_change()'></b></a>";
} }
echo "<tr><td colspan='7'><div class='raya'></div></td></tr>"; echo "<tr><td colspan='7'><div class='raya'></div></td></tr>";
echo "</table>";
} else } else
echo "<div class='nf'>No modules</div>"; echo "<div class='nf'>No modules</div>";
} }
// ==================================================================================== // ====================================================================================
// Module Creation / Update form // Module Creation / Update form
// ==================================================================================== // ====================================================================================
else { else {
echo '<form name="modulo" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'">'; echo '<form name="modulo" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">';
if ($update_module == "1"){ if ($update_module == "1"){
echo '<input type="hidden" name="update_module" value=1>'; echo '<input type="hidden" name="update_module" value=1>';
echo '<input type="hidden" name="id_agente_modulo" value="'.$id_agente_modulo.'">'; echo '<input type="hidden" name="id_agente_modulo" value="'.$id_agente_modulo.'">';
@ -223,18 +232,17 @@ else {
} }
} }
} }
?>
<h3><?php echo $lang_label["module_asociation_form"] ?> echo "<h2>".$lang_label["agent_conf"]." &gt; ".$lang_label["module_asociation_form"]."<a href='help/".$help_code."/chap3.php#321' target='_help' class='help'>
<a href='help/<?php echo $help_code ?>/chap3.php#321' target='_help' class='help'> &nbsp;<span>".$lang_label["help"]."</span></a></h2>";
&nbsp;<span><?php echo $lang_label["help"] ?></span></a></h3>
<a name="modules"> <!-- Don't Delete !! --> echo '<a name="modules"> <!-- Dont Delete !! -->';
<table width="650" cellpadding="3" cellspacing="3" class="fon"> echo '<table width="650" cellpadding="3" cellspacing="3" class="fon">';
<tr><td class='lb' rowspan='8' width='5'> echo "<tr><td class='lb' rowspan='8' width='1'>";
<!-- Module type combobox -->
<td class="datos"><?php echo $lang_label["module_type"] ?> //-- Module type combobox
<td class="datos"> echo "<td class='datos'>".$lang_label["module_type"];
<?php echo "<td class='datos'>";
if ($update_module == "1") { if ($update_module == "1") {
echo "<input type='hidden' name='tipo' value='".$modulo_id_tipo_modulo."'>"; echo "<input type='hidden' name='tipo' value='".$modulo_id_tipo_modulo."'>";
echo "<span class='redi'>".$lang_label["no_change_field"]."</span>"; echo "<span class='redi'>".$lang_label["no_change_field"]."</span>";
@ -321,15 +329,17 @@ if (isset($_POST["oid"])){
<?php echo $modulo_descripcion ?> <?php echo $modulo_descripcion ?>
</textarea> </textarea>
<tr><td colspan='5'><div class='raya'></div></td></tr> <tr><td colspan='5'><div class='raya'></div></td></tr>
<tr><td colspan="5" align="right"> <tr>
<?php <?php
echo "<td colspan=5 align='right'>";
if ($update_module == "1"){ if ($update_module == "1"){
echo '<input name="updbutton" type="submit" class="sub" value="'.$lang_label["update"].'">'; echo '<input name="updbutton" type="submit" class="sub" value="'.$lang_label["update"].'">';
} else { } else {
echo '<input name="crtbutton" type="submit" class="sub" value="'.$lang_label["add"].'">'; echo '<input name="crtbutton" type="submit" class="sub" value="'.$lang_label["add"].'">';
} }
echo "</form>"; echo "</form>";
echo "<form method='post' action='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=".$id_agente."'><input type='submit' class='sub' name='cancel' value='".$lang_label["cancel"]."'></form>";
?> ?>
</table> </table>

View File

@ -1,14 +1,15 @@
<?php <?php
// Pandora FMS - the Free monitoring system
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006-2007 Jose Navarro jose@jnavarro.net
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 // as published by the Free Software Foundation version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -73,11 +74,27 @@ sec2=godmode/grupos/lista_grupos">
<td class="datos"> <td class="datos">
<input type="text" name="nombre" size="35" value="<?php echo $nombre ?>"> <input type="text" name="nombre" size="35" value="<?php echo $nombre ?>">
</td></tr> </td></tr>
<tr><td class="datos2"><?php echo $lang_label["icon"] ?></td> <tr><td class='datos2'>
<td class="datos2"> <?PHP
<input type="icon" name="icon" size="25" echo $lang_label["icon"];
value="<?php if (isset($icono)){echo $icono;} ?>"> echo '<td class="datos2">';
</td></tr>
echo '<select name="icon">';
if ($icono != ""){
echo '<option>' . $icono;
}
$ficheros = list_files ('images/groups_small/', "png", 1, 0);
$size = count ($ficheros);
for ($i = 0; $i < $size; $i++) {
echo "<option>".substr($ficheros[$i],0,strlen($ficheros[$i])-4);
}
echo '</select>';
?>
<tr><td colspan='3'><div class='raya'></div></td></tr> <tr><td colspan='3'><div class='raya'></div></td></tr>
<tr><td colspan="3" align="right"> <tr><td colspan="3" align="right">
<?php <?php

View File

@ -1,13 +1,15 @@
<?php <?php
// Pandora - the Free monitoring system // Pandora FMS - the Free monitoring system
// ==================================== // ========================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com // Copyright (c) 2004-2007 Sancho Lerena, slerena@openideas.info
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com // Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006-2007 Jose Navarro jose@jnavarro.net
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 // as published by the Free Software Foundation version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -28,7 +30,6 @@ if (comprueba_login() == 0)
$icon = entrada_limpia($_POST["icon"]); $icon = entrada_limpia($_POST["icon"]);
$sql_insert="INSERT INTO tgrupo (nombre, icon) $sql_insert="INSERT INTO tgrupo (nombre, icon)
VALUES ('".$nombre."', '".$icon."') "; VALUES ('".$nombre."', '".$icon."') ";
echo $sql_insert;
$result=mysql_query($sql_insert); $result=mysql_query($sql_insert);
if (! $result) if (! $result)
echo "<h3 class='error'>".$lang_label["create_group_no"]."</h3>"; echo "<h3 class='error'>".$lang_label["create_group_no"]."</h3>";
@ -90,7 +91,7 @@ if (comprueba_login() == 0)
echo " echo "
<tr> <tr>
<td class='$tdcolor' align='center'> <td class='$tdcolor' align='center'>
<img src='images/g_".show_icon_group($row["id_grupo"]).".gif' <img src='images/groups_small/".show_icon_group($row["id_grupo"]).".png'
border='0'> border='0'>
</td> </td>
<td class='$tdcolor'> <td class='$tdcolor'>

View File

@ -65,9 +65,9 @@ while ($rowdup=mysql_fetch_array($resq1)){
echo "<td class='$tdcolor'>".$fecha_registro; echo "<td class='$tdcolor'>".$fecha_registro;
echo "<td class='$tdcolor'>"; echo "<td class='$tdcolor'>";
if ($nivel == 1) if ($nivel == 1)
echo "<img src='images/admin.gif'>"; echo "<img src='images/user_suit.png'>";
else else
echo "<img src='images/user.gif'>"; echo "<img src='images/user_green.png'>";
$sql1='SELECT * FROM tusuario_perfil WHERE id_usuario = "'.$nombre.'"'; $sql1='SELECT * FROM tusuario_perfil WHERE id_usuario = "'.$nombre.'"';
$result=mysql_query($sql1); $result=mysql_query($sql1);

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Some files were not shown because too many files have changed in this diff Show More