diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 33cfa0a31f..8f9aae02c2 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2008-07-12 Evi Vanoost + + * pandora_console/operation/agentes/networkmap.php: Some minor bugfixes introduced with my changes yesterday + + * pandora_console/general/links_menu.php: 2 queries for a menu? Changed it to a single query. This list will likely never be empty - if it is, Links section won't be generated + + * pandora_console/general/logon_ok.php: Updated the queries to go faster. Changed the timestamp calculation to an indexed query using utimestamp and UNIXTIME(NOW())-604800 + + * pandora_console/images/networkmap/8.png: Added the Mac OS X icon.. + 2008-07-11 Evi Vanoost * pandora_console/operation/agentes/estado_grupo.php: Fixed the issue where all data was 0-ed out. There was an if-then-else construction that wasn't working well diff --git a/pandora_console/general/links_menu.php b/pandora_console/general/links_menu.php index becba7e050..648858795b 100644 --- a/pandora_console/general/links_menu.php +++ b/pandora_console/general/links_menu.php @@ -18,18 +18,16 @@ // 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 link,name FROM tlink ORDER BY name'; $result=mysql_query($sql1); if ($row=mysql_fetch_array($result)){ ?>
:: ::
"; - } + while ($row=mysql_fetch_array($result)){ + echo ""; + } echo ""; } -?> \ No newline at end of file +?> diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 43f593b596..1c63a3545f 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -28,14 +28,13 @@ echo "

"; // Private messages pending to read ! -$sql='SELECT COUNT(*) FROM tmensajes WHERE id_usuario_destino="'.$nick.'" -AND estado="FALSE";'; +$sql='SELECT COUNT('id_mensaje') AS count FROM tmensajes WHERE id_usuario_destino="'.$nick.'" AND estado="FALSE";'; $resultado = mysql_query ($sql); $row = mysql_fetch_array ($resultado); -if ($row["COUNT(*)"] != 0){ +if ($row["count"] != 0){ echo "

". $lang_label["new_message_bra"] . ' ' - .$row["COUNT(*)"] . ' ' + .$row["count"] . ' ' .$lang_label["new_message_ket"] . '

'; } @@ -45,7 +44,7 @@ echo ""; // Site news ! // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo '

' . $lang_label["site_news"] . '

'; -$sql_news = "SELECT * FROM tnews ORDER by timestamp DESC LIMIT 3"; +$sql_news = "SELECT subject,timestamp,text FROM tnews ORDER by timestamp DESC LIMIT 3"; if ($result_news = mysql_query ($sql_news)){ echo ''; while ($row = mysql_fetch_array ($result_news)) { @@ -173,7 +172,7 @@ $table->head[2] = lang_string ('date'); $table->head[3] = lang_string ('src_address'); $table->head[4] = lang_string ('comments'); -$sql = sprintf ('SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) +$sql = sprintf ('SELECT ID_usuario,accion,fecha,IP_origen,descripcion FROM tsesion WHERE (utimestamp > UNIX_TIMESTAMP(NOW()) - 604800) AND ID_usuario = "%s" ORDER BY fecha DESC LIMIT 5', $nick); $sessions = get_db_all_rows_sql ($sql); foreach ($sessions as $session) { diff --git a/pandora_console/images/networkmap/8.png b/pandora_console/images/networkmap/8.png new file mode 100644 index 0000000000..24f2ad0ab4 Binary files /dev/null and b/pandora_console/images/networkmap/8.png differ diff --git a/pandora_console/operation/agentes/networkmap.php b/pandora_console/operation/agentes/networkmap.php index 26e42c52fe..0749895987 100644 --- a/pandora_console/operation/agentes/networkmap.php +++ b/pandora_console/operation/agentes/networkmap.php @@ -30,7 +30,7 @@ function generate_dot ($simple = 0, $font_size) { $graph = open_graph(); // Get agent data - $agents = mysql_query('SELECT id_grupo, id_parent, id_agente FROM tagente WHERE disabled = 0 ORDER BY id_grupo'); + $agents = mysql_query('SELECT id_grupo, nombre, id_os, id_parent, id_agente FROM tagente WHERE disabled = 0 ORDER BY id_grupo'); while ($agent = mysql_fetch_assoc($agents)) { if (give_acl($config["id_user"], $agent["id_grupo"], "AR") == 0) continue;