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
|
@ -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>
|
||||
|
||||
* include/styles/god.css: Moved style block.
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<?php
|
||||
// Pandora - the Free monitoring system
|
||||
// ====================================
|
||||
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
|
||||
// Copyright (c) 2005-2006 Artica Soluciones Tecnológicas S.L, info@artica.es
|
||||
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
|
||||
// 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
|
||||
|
||||
// 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; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
// 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
|
||||
|
@ -15,6 +17,24 @@
|
|||
// 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.
|
||||
?>
|
||||
|
||||
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>";
|
||||
?>
|
|
@ -1,9 +1,22 @@
|
|||
<?php
|
||||
// Pandora - The Free Monitoring System
|
||||
// This code is protected by GPL license.
|
||||
// Este codigo esta protegido por la licencia GPL.
|
||||
// Sancho Lerena <slerena@gmail.com>, 2003-2006
|
||||
// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
|
||||
// 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
|
||||
|
||||
// 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';
|
||||
$result=mysql_query($sql1);
|
||||
|
|
|
@ -17,6 +17,17 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
?>
|
||||
|
||||
<h1><?php echo $lang_label["logged_out"] ?></h1>
|
||||
<div class='msg'><?php echo $lang_label["logout_msg"] ?></div>
|
||||
<div align='center'>
|
||||
<h1 id="log"><?php echo $lang_label["logged_out"] ; ?></h1>
|
||||
<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>
|
||||
|
|
|
@ -17,32 +17,26 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
echo "<div class='jus'>";
|
||||
$nick = $_SESSION['id_usuario'];
|
||||
echo "<h1>" . $lang_label["welcome_title"] . "</h1>";
|
||||
echo $lang_label["main_text"];
|
||||
echo "<br /><br />";
|
||||
echo $lang_label["has_connected"] . " <b>" . $nick . "</b> - ";
|
||||
echo "<div class='jus'>";
|
||||
$nick = $_SESSION['id_usuario'];
|
||||
echo "<h1>" . $lang_label["welcome_title"] . "</h1>";
|
||||
echo "<p>";
|
||||
echo $lang_label["main_text"];
|
||||
echo "</p>";
|
||||
|
||||
if (dame_admin ($nick) == 1) {
|
||||
echo $lang_label["administrator"] . '. ';
|
||||
} else {
|
||||
echo $lang_label["normal_user"] . '. ';
|
||||
}
|
||||
echo "<div id='activity'>";
|
||||
// Show last activity from this user
|
||||
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>';
|
||||
|
||||
echo "<div id='activity'>";
|
||||
// Show last activity from this user
|
||||
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";
|
||||
// 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);
|
||||
$contador = 5; // Max items
|
||||
|
@ -73,7 +67,9 @@ $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND I
|
|||
$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";';
|
||||
$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>';
|
||||
|
||||
$query1 = "SELECT COUNT(*) FROM tusuario";
|
||||
$query1 = "SELECT COUNT(id_usuario) FROM tusuario";
|
||||
$result = mysql_query ($query1);
|
||||
$row = mysql_fetch_array ($result);
|
||||
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>';
|
||||
|
||||
$query1 = "SELECT COUNT(*) FROM tagente";
|
||||
$query1 = "SELECT COUNT(id_agente) FROM tagente";
|
||||
$result = mysql_query ($query1);
|
||||
$row = mysql_fetch_array ($result);
|
||||
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>';
|
||||
|
||||
$query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos";
|
||||
$result = mysql_query ($query1);
|
||||
$row = mysql_fetch_array ($result);
|
||||
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>';
|
||||
|
||||
$query1 = "SELECT COUNT(*) FROM talerta_agente_modulo";
|
||||
$result = mysql_query ($query1);
|
||||
$row = mysql_fetch_array ($result);
|
||||
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 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);
|
||||
if($row = mysql_fetch_array($result)!='') { // Take the first element only
|
||||
echo $lang_label["data_timestamp"] . $row["timestamp"];
|
||||
if ($row = mysql_fetch_array($result)) { // Take the first element only
|
||||
echo $lang_label["data_timestamp"] . "<b>".$row["timestamp"]."</b>";
|
||||
} else {
|
||||
echo 'No data received yet!';
|
||||
}
|
||||
echo '</span>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>'; // class "jus"
|
||||
?>
|
|
@ -1,9 +1,22 @@
|
|||
<?php
|
||||
// Pandora - The Free Monitoring System
|
||||
// This code is protected by GPL license.
|
||||
// Este codigo esta protegido por la licencia GPL.
|
||||
// Sancho Lerena <slerena@gmail.com>, 2003-2006
|
||||
// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
|
||||
// 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
|
||||
|
||||
// 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>
|
||||
<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>';
|
||||
|
||||
} else {
|
||||
|
||||
$iduser = $_SESSION['id_usuario'];
|
||||
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> </div>";
|
||||
require ("links_menu.php");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -17,22 +17,21 @@
|
|||
// 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");
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
|
||||
if (comprueba_login() != 0) {
|
||||
audit_db("Noauth",$REMOTE_ADDR, "No authenticated acces","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;
|
||||
}
|
||||
if (comprueba_login() != 0) {
|
||||
audit_db("Noauth",$REMOTE_ADDR, "No authenticated acces","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>";
|
||||
if (isset($_GET["offset"]))
|
||||
|
@ -44,7 +43,7 @@ if (give_acl($id_usuario, 0, "PM")!=1) {
|
|||
if (isset($_GET["tipo_log"])){
|
||||
$tipo_log = $_GET["tipo_log"];
|
||||
$tipo_log_select = " WHERE accion='".$tipo_log."' ";
|
||||
} elseif (isset($_POST["tipo_log"])){
|
||||
} elseif (isset($_POST["tipo_log"])) {
|
||||
$tipo_log = $_POST["tipo_log"];
|
||||
if ($tipo_log == "-1"){
|
||||
$tipo_log_select = "";
|
||||
|
@ -52,57 +51,58 @@ if (give_acl($id_usuario, 0, "PM")!=1) {
|
|||
} else
|
||||
$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 "<a href='help/".$help_code."/chap6.php#6' target='_help' class='help'>
|
||||
<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 "<table border='0'><tr><td valign='middle'>";
|
||||
echo "<select name='tipo_log' onChange='javascript:this.form.submit();'>";
|
||||
if (isset($tipo_log))
|
||||
echo "<option>".$tipo_log;
|
||||
echo "<option value='-1'>".$lang_label["all"];
|
||||
$sql3="SELECT DISTINCT (accion) FROM `tsesion`";
|
||||
// Prepare index for pagination
|
||||
$result3=mysql_query($sql3);
|
||||
while ($row3=mysql_fetch_array($result3)){
|
||||
if (isset($tipo_log)) {
|
||||
if ($tipo_log != $row3[0])
|
||||
echo "<option value='".$row3[0]."'>".$row3[0];
|
||||
} else
|
||||
echo "<option value='".$row3[0]."'>".$row3[0];
|
||||
}
|
||||
echo "</select>";
|
||||
echo "<td valign='middle'><noscript><input name='uptbutton' type='submit' class='sub' value='".$lang_label["show"]."'></noscript>";
|
||||
echo "</table></form>";
|
||||
echo "<h3>".$lang_label["filter"];
|
||||
echo "<a href='help/".$help_code."/chap6.php#6' target='_help' class='help'>
|
||||
<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 "<table border='0'><tr><td valign='middle'>";
|
||||
echo "<select name='tipo_log' onChange='javascript:this.form.submit();'>";
|
||||
if (isset($tipo_log))
|
||||
echo "<option>".$tipo_log;
|
||||
echo "<option value='-1'>".$lang_label["all"];
|
||||
$sql3="SELECT DISTINCT (accion) FROM `tsesion`";
|
||||
// Prepare index for pagination
|
||||
$result3=mysql_query($sql3);
|
||||
while ($row3=mysql_fetch_array($result3)){
|
||||
if (isset($tipo_log)) {
|
||||
if ($tipo_log != $row3[0])
|
||||
echo "<option value='".$row3[0]."'>".$row3[0];
|
||||
} else
|
||||
echo "<option value='".$row3[0]."'>".$row3[0];
|
||||
}
|
||||
echo "</select>";
|
||||
echo "<td valign='middle'><noscript><input name='uptbutton' type='submit' class='sub' value='".$lang_label["show"]."'></noscript>";
|
||||
echo "</table></form>";
|
||||
|
||||
$sql2="SELECT COUNT(*) FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC";
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$counter = $row2[0];
|
||||
if (isset ($tipo_log))
|
||||
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs&tipo_log=".$tipo_log;
|
||||
else
|
||||
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs";
|
||||
$sql2="SELECT COUNT(*) FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC";
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$counter = $row2[0];
|
||||
if (isset ($tipo_log))
|
||||
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs&tipo_log=".$tipo_log;
|
||||
else
|
||||
$url = "index.php?sec=godmode&sec2=godmode/admin_access_logs";
|
||||
|
||||
//echo "URLTipolog $tipo_log";
|
||||
//echo "URLTipolog $tipo_log";
|
||||
pagination ($counter, $url, $offset);
|
||||
echo '<br>';
|
||||
// table header
|
||||
echo '<table cellpadding="3" cellspacing="3" width=700>';
|
||||
// table header
|
||||
echo '<table cellpadding="3" cellspacing="3" width=700>';
|
||||
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 class="w130">'.$lang_label["date"].'</th>';
|
||||
echo '<th class="w100">'.$lang_label["src_address"].'</th>';
|
||||
echo '<th class="w200">'.$lang_label["comments"].'</th>';
|
||||
echo '<th class="w130">'.$lang_label["date"].'</th>';
|
||||
echo '<th class="w100">'.$lang_label["src_address"].'</th>';
|
||||
echo '<th class="w200">'.$lang_label["comments"].'</th>';
|
||||
|
||||
// Skip offset records
|
||||
$query1="SELECT * FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC";
|
||||
$result=mysql_query($query1);
|
||||
// Skip offset records
|
||||
$query1="SELECT * FROM tsesion ".$tipo_log_select." ORDER BY fecha DESC";
|
||||
$result=mysql_query($query1);
|
||||
$offset_counter = 0;
|
||||
while ($offset_counter < $offset){
|
||||
if ($row=mysql_fetch_array($result))
|
||||
|
@ -110,10 +110,10 @@ else
|
|||
else
|
||||
$offset_counter = $offset; //exit condition
|
||||
}
|
||||
|
||||
$offset_counter = 0;
|
||||
|
||||
$offset_counter = 0;
|
||||
$color=1;
|
||||
// Get data
|
||||
// Get data
|
||||
while ($row=mysql_fetch_array($result) and ($offset_counter < $block_size) ){
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
|
@ -131,9 +131,9 @@ else
|
|||
echo '<td class="'.$tdcolor.'">'.$row["descripcion"];
|
||||
echo '</tr>';
|
||||
$offset_counter++;
|
||||
}
|
||||
}
|
||||
|
||||
// end table
|
||||
// end table
|
||||
echo "<tr><td colspan='5'><div class='raya'></div></td></tr></table>";
|
||||
|
||||
?>
|
|
@ -3,6 +3,14 @@
|
|||
// ========================
|
||||
// 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"];
|
||||
if (isset($_GET["creacion"])){
|
||||
|
@ -15,6 +23,7 @@ echo " > ".$lang_label["create_agent"]."
|
|||
<span>".$lang_label["help"]."</span></a>";
|
||||
}
|
||||
echo "</h2>";
|
||||
echo "<div style='height: 25px'> </div>";
|
||||
|
||||
echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&
|
||||
sec2=godmode/agentes/configurar_agente">';
|
||||
|
@ -25,7 +34,7 @@ if ($creacion_agente == 1) {
|
|||
echo "<input type='hidden' name='id_agente' value='".$id_agente."'>";
|
||||
}
|
||||
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>
|
||||
<td class="datos">
|
||||
<input type="text" name="agente" size=30 value="'.$nombre_agente.'">';
|
||||
|
@ -33,9 +42,6 @@ if (isset($_GET["creacion"])){
|
|||
echo " ";
|
||||
} else {
|
||||
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&
|
||||
sec2=operation/agentes/ver_agente&id_agente=".$id_agente."'>
|
||||
<img src='images/lupa.gif' border='0' align='middle'></a>";
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
<?php
|
||||
// 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
|
||||
// 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
|
||||
|
||||
// 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; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
// 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.
|
||||
?>
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.?>
|
||||
|
||||
<?php
|
||||
// Load global vars
|
||||
|
@ -26,6 +27,10 @@ if (give_acl($id_user, 0, "AW")!=1) {
|
|||
exit;
|
||||
};
|
||||
|
||||
if (isset($_GET["id_agente"]))
|
||||
$id_agente = $_GET["id_agente"];
|
||||
else
|
||||
$id_agente = -1;
|
||||
|
||||
// Init vars
|
||||
$descripcion = "";
|
||||
|
@ -37,9 +42,7 @@ $maximo = "0";
|
|||
$minimo = "0";
|
||||
$nombre_agente = "";
|
||||
$direccion_agente = "";
|
||||
$id_agente = "";
|
||||
$intervalo = "300";
|
||||
$id_agente = "";
|
||||
$id_server = "";
|
||||
$max_alerts = 0;
|
||||
$modo = 0;
|
||||
|
@ -69,6 +72,36 @@ $ip_target ="";
|
|||
$snmp_community="";
|
||||
$creacion_agente = 0;
|
||||
$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> 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> 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> 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> 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
|
||||
// =============
|
||||
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"]))
|
||||
$tab = $_GET["tab"];
|
||||
else
|
||||
$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) {
|
||||
case "main": require "agent_manager.php";
|
||||
break;
|
||||
|
@ -545,5 +563,4 @@ case "alert": require "alert_manager.php";
|
|||
}
|
||||
|
||||
|
||||
echo "FUCKIN SHIT";
|
||||
?>
|
|
@ -17,12 +17,24 @@
|
|||
// 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");
|
||||
// Load global vars
|
||||
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
|
||||
$id_agente = entrada_limpia($_GET["borrar_agente"]);
|
||||
$agent_name = dame_nombre_agente($id_agente);
|
||||
$id_grupo = dame_id_grupo($id_agente);
|
||||
if (give_acl($id_user, $id_grupo, "AW")==1){
|
||||
// Firts delete from agents table
|
||||
|
@ -56,80 +68,98 @@ if (give_acl($id_user, 0, "AW")==1) {
|
|||
$result=mysql_query($sql_delete4);
|
||||
}
|
||||
$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
|
||||
WHERE id_agente = ".$id_agente; // delete from tagente_estado
|
||||
WHERE id_agente = ".$id_agente;
|
||||
$result=mysql_query($sql_delete2);
|
||||
$result=mysql_query($sql_delete3);
|
||||
} else {
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
|
||||
"Trying to delete an Agent");
|
||||
require ("general/noaccess.php");
|
||||
audit_db($id_user,$REMOTE_ADDR, "Agent '$agent_name' deleted",
|
||||
"Agent Management");
|
||||
} else { // NO permissions.
|
||||
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 "<h3>".$lang_label["agent_defined2"]."
|
||||
echo "<h2>".$lang_label["agent_conf"]." > ".$lang_label["agent_defined2"]."
|
||||
<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
|
||||
FROM tagente ORDER BY nombre';
|
||||
$sql1="SELECT id_agente, nombre, id_grupo, comentarios, id_os
|
||||
FROM tagente ORDER BY nombre LIMIT $offset, $block_size";
|
||||
$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)){
|
||||
echo "<table cellpadding='3' cellspacing='3' width='600'>";
|
||||
echo "<th>".$lang_label["agent_name"];
|
||||
echo "<th>".$lang_label["group"];
|
||||
echo "<th>".$lang_label["description"];
|
||||
echo "<th>".$lang_label["delete"];
|
||||
$color=1;
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
$id_grupo = $row["id_grupo"];
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
$color = 0;
|
||||
echo "<table cellpadding='4' cellspacing='4' width='700'>";
|
||||
echo "<th>".$lang_label["agent_name"];
|
||||
echo "<th>".$lang_label["os"];
|
||||
echo "<th>".$lang_label["group"];
|
||||
echo "<th>".$lang_label["description"];
|
||||
echo "<th>".$lang_label["delete"];
|
||||
$color=1;
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
$id_grupo = $row["id_grupo"];
|
||||
if ($color == 1){
|
||||
$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'>
|
||||
".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 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 colspan='4'><div class='raya'></div></td></tr>";
|
||||
echo "<tr><td align='right' colspan='4'>";
|
||||
echo "<form method='post' action='index.php?sec=gagente&
|
||||
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"]."'>";
|
||||
echo "</form></td></tr>";
|
||||
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 "<form method='post' action='index.php?sec=gagente&
|
||||
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"]."'>";
|
||||
echo "</form>";
|
||||
}
|
||||
} // Fin pagina
|
||||
else {
|
||||
audit_db($id_user,$REMOTE_ADDR, "ACL Violation",
|
||||
"Trying to access Agent Management");
|
||||
require ("general/noaccess.php");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -125,29 +125,35 @@ function type_change()
|
|||
|
||||
|
||||
<?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) {
|
||||
$sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'"
|
||||
ORDER BY nombre';
|
||||
$result=mysql_query($sql1);
|
||||
echo "<h2>".$lang_label["agent_conf"]." > ".$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)){
|
||||
?>
|
||||
<h3><?php echo $lang_label["assigned_modules"]?>
|
||||
<a href='help/<?php echo $help_code ?>/chap3.php#321' target='_help' class='help'>
|
||||
<span><?php echo $lang_label["help"] ?></span></a></h3>
|
||||
<table width="700" cellpadding="3" cellspacing="3" class="fon">
|
||||
<tr>
|
||||
<th><?php echo $lang_label["module_name"]?>
|
||||
<th><?php echo $lang_label["type"]?>
|
||||
<th><?php echo $lang_label["interval"]?>
|
||||
<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
|
||||
echo '<table width="700" cellpadding="3" cellspacing="3" class="fon">';
|
||||
echo '<tr>';
|
||||
echo "<th>".$lang_label["module_name"];
|
||||
echo "<th>".$lang_label["type"];
|
||||
echo "<th>".$lang_label["interval"];
|
||||
echo "<th>".$lang_label["description"];
|
||||
echo "<th>".$lang_label["module_group"];
|
||||
echo "<th>".$lang_label["max_min"];
|
||||
echo "<th width=50>".$lang_label["action"];
|
||||
$color=1;
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
if ($color == 1){
|
||||
|
@ -175,7 +181,6 @@ if ( $creacion_agente != 1) {
|
|||
} else {
|
||||
echo "<td class='$tdcolor'> N/A";
|
||||
}
|
||||
|
||||
echo "<td class='$tdcolor' title='$descripcion'>".substr($descripcion,0,30)."</td>";
|
||||
echo "<td class='$tdcolor'>".
|
||||
substr(dame_nombre_grupomodulo($module_group2),0,15)."</td>";
|
||||
|
@ -188,6 +193,7 @@ if ( $creacion_agente != 1) {
|
|||
echo "<td class='$tdcolor'>";
|
||||
if ($id_tipo != -1)
|
||||
echo "<a href='index.php?sec=gagente&
|
||||
tab=module&
|
||||
sec2=godmode/agentes/configurar_agente&
|
||||
id_agente=".$id_agente."&
|
||||
delete_module=".$row["id_agente_modulo"]."'>
|
||||
|
@ -196,19 +202,22 @@ if ( $creacion_agente != 1) {
|
|||
echo "<a href='index.php?sec=gagente&
|
||||
sec2=godmode/agentes/configurar_agente&
|
||||
id_agente=".$id_agente."&
|
||||
tab=module&
|
||||
update_module=".$row["id_agente_modulo"]."#modules'>
|
||||
<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 "</table>";
|
||||
} else
|
||||
echo "<div class='nf'>No modules</div>";
|
||||
|
||||
}
|
||||
// ====================================================================================
|
||||
// Module Creation / Update form
|
||||
// ====================================================================================
|
||||
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"){
|
||||
echo '<input type="hidden" name="update_module" value=1>';
|
||||
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"] ?>
|
||||
<a href='help/<?php echo $help_code ?>/chap3.php#321' target='_help' class='help'>
|
||||
<span><?php echo $lang_label["help"] ?></span></a></h3>
|
||||
<a name="modules"> <!-- Don't Delete !! -->
|
||||
<table width="650" cellpadding="3" cellspacing="3" class="fon">
|
||||
<tr><td class='lb' rowspan='8' width='5'>
|
||||
<!-- Module type combobox -->
|
||||
<td class="datos"><?php echo $lang_label["module_type"] ?>
|
||||
<td class="datos">
|
||||
<?php
|
||||
echo "<h2>".$lang_label["agent_conf"]." > ".$lang_label["module_asociation_form"]."<a href='help/".$help_code."/chap3.php#321' target='_help' class='help'>
|
||||
<span>".$lang_label["help"]."</span></a></h2>";
|
||||
|
||||
echo '<a name="modules"> <!-- Dont Delete !! -->';
|
||||
echo '<table width="650" cellpadding="3" cellspacing="3" class="fon">';
|
||||
echo "<tr><td class='lb' rowspan='8' width='1'>";
|
||||
|
||||
//-- Module type combobox
|
||||
echo "<td class='datos'>".$lang_label["module_type"];
|
||||
echo "<td class='datos'>";
|
||||
if ($update_module == "1") {
|
||||
echo "<input type='hidden' name='tipo' value='".$modulo_id_tipo_modulo."'>";
|
||||
echo "<span class='redi'>".$lang_label["no_change_field"]."</span>";
|
||||
|
@ -321,15 +329,17 @@ if (isset($_POST["oid"])){
|
|||
<?php echo $modulo_descripcion ?>
|
||||
</textarea>
|
||||
<tr><td colspan='5'><div class='raya'></div></td></tr>
|
||||
<tr><td colspan="5" align="right">
|
||||
<?php
|
||||
<tr>
|
||||
<?php
|
||||
echo "<td colspan=5 align='right'>";
|
||||
if ($update_module == "1"){
|
||||
echo '<input name="updbutton" type="submit" class="sub" value="'.$lang_label["update"].'">';
|
||||
} else {
|
||||
echo '<input name="crtbutton" type="submit" class="sub" value="'.$lang_label["add"].'">';
|
||||
}
|
||||
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>
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<?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
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
// 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
|
||||
|
@ -73,11 +74,27 @@ sec2=godmode/grupos/lista_grupos">
|
|||
<td class="datos">
|
||||
<input type="text" name="nombre" size="35" value="<?php echo $nombre ?>">
|
||||
</td></tr>
|
||||
<tr><td class="datos2"><?php echo $lang_label["icon"] ?></td>
|
||||
<td class="datos2">
|
||||
<input type="icon" name="icon" size="25"
|
||||
value="<?php if (isset($icono)){echo $icono;} ?>">
|
||||
</td></tr>
|
||||
<tr><td class='datos2'>
|
||||
<?PHP
|
||||
echo $lang_label["icon"];
|
||||
echo '<td class="datos2">';
|
||||
|
||||
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" align="right">
|
||||
<?php
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<?php
|
||||
// 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
|
||||
// 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
|
||||
|
||||
// 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; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
// 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
|
||||
|
@ -28,7 +30,6 @@ if (comprueba_login() == 0)
|
|||
$icon = entrada_limpia($_POST["icon"]);
|
||||
$sql_insert="INSERT INTO tgrupo (nombre, icon)
|
||||
VALUES ('".$nombre."', '".$icon."') ";
|
||||
echo $sql_insert;
|
||||
$result=mysql_query($sql_insert);
|
||||
if (! $result)
|
||||
echo "<h3 class='error'>".$lang_label["create_group_no"]."</h3>";
|
||||
|
@ -90,7 +91,7 @@ if (comprueba_login() == 0)
|
|||
echo "
|
||||
<tr>
|
||||
<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'>
|
||||
</td>
|
||||
<td class='$tdcolor'>
|
||||
|
|
|
@ -65,9 +65,9 @@ while ($rowdup=mysql_fetch_array($resq1)){
|
|||
echo "<td class='$tdcolor'>".$fecha_registro;
|
||||
echo "<td class='$tdcolor'>";
|
||||
if ($nivel == 1)
|
||||
echo "<img src='images/admin.gif'>";
|
||||
echo "<img src='images/user_suit.png'>";
|
||||
else
|
||||
echo "<img src='images/user.gif'>";
|
||||
echo "<img src='images/user_green.png'>";
|
||||
|
||||
$sql1='SELECT * FROM tusuario_perfil WHERE id_usuario = "'.$nombre.'"';
|
||||
$result=mysql_query($sql1);
|
||||
|
|
After Width: | Height: | Size: 781 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 523 B |
After Width: | Height: | Size: 533 B |
After Width: | Height: | Size: 703 B |
After Width: | Height: | Size: 525 B |
After Width: | Height: | Size: 685 B |
After Width: | Height: | Size: 743 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 755 B |
After Width: | Height: | Size: 754 B |
After Width: | Height: | Size: 770 B |
After Width: | Height: | Size: 714 B |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 789 B |
After Width: | Height: | Size: 813 B |
After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 825 B |
After Width: | Height: | Size: 774 B |
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 289 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 483 B |
After Width: | Height: | Size: 454 B |
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 436 B |
After Width: | Height: | Size: 201 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 287 B |
After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 541 B |
After Width: | Height: | Size: 710 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 918 B |
After Width: | Height: | Size: 882 B |
After Width: | Height: | Size: 512 B |
After Width: | Height: | Size: 557 B |
After Width: | Height: | Size: 667 B |
After Width: | Height: | Size: 784 B |
After Width: | Height: | Size: 390 B |
After Width: | Height: | Size: 468 B |
After Width: | Height: | Size: 775 B |
After Width: | Height: | Size: 770 B |
Before Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 715 B |
After Width: | Height: | Size: 620 B |
After Width: | Height: | Size: 585 B |
After Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 641 B |
After Width: | Height: | Size: 792 B |
After Width: | Height: | Size: 754 B |
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 666 B |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 671 B |
After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 671 B |
After Width: | Height: | Size: 753 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 525 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 825 B |
After Width: | Height: | Size: 444 B |
After Width: | Height: | Size: 882 B |
After Width: | Height: | Size: 667 B |
After Width: | Height: | Size: 468 B |
After Width: | Height: | Size: 585 B |
After Width: | Height: | Size: 641 B |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 818 B |
After Width: | Height: | Size: 749 B |
After Width: | Height: | Size: 806 B |
After Width: | Height: | Size: 661 B |