From 15283d4b31843fea71cf17c964213c13fa63edde Mon Sep 17 00:00:00 2001
From: guruevi
Date: Mon, 14 Jul 2008 18:00:54 +0000
Subject: [PATCH] 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.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@952 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
pandora_console/ChangeLog | 10 ++++++++++
pandora_console/general/links_menu.php | 12 +++++-------
pandora_console/general/logon_ok.php | 11 +++++------
pandora_console/images/networkmap/8.png | Bin 0 -> 1608 bytes
pandora_console/operation/agentes/networkmap.php | 2 +-
5 files changed, 21 insertions(+), 14 deletions(-)
create mode 100644 pandora_console/images/networkmap/8.png
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 "';
}
@@ -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 0000000000000000000000000000000000000000..24f2ad0ab435904afe96b0fca0d7819e118e0113
GIT binary patch
literal 1608
zcmV-O2DkZ%P)C3<00009a7bBm000XU
z000XU0RWnu7ytkT`bk7VR9J=Wm|JKZRTzN3x$NxKO_R;$vQ3QZgG#GuQ;G3{ib50-
z!3QJ0r0RQ#&(L#$a3Ptd#DAYFCvlan8|@};!^IXN&eaOCLGqX;3eEDP6lLpR59FbspSu`w=Px^ys~&)-%k
z6h3Vm=J4UeFD8@8caI-GPAZkcvaD7Qwxu|ZLo^y?Y;24|q0kgaZDQy2v17-`WHOkh
zc|#z+n5Ic0k>JRYBPfdU(suLo?FJ0PAfL}OKR=HUVn;9l)oPWYp`oU8wuSMdQLR>)
znVH!!OfHveIcHlKSxTi6>2&&rLCWQF%cz8c@l&)@m@v}p1>RK&^WKGyOtYsmEt`+e
zU*L~xMMe+o=ivuN+rVrC2H^8wJDZN%rpcF|eaWkDzQvvQ9K_Na&BinE!=EYx1I_)k
zOp_1-%c0)ZEt}sLe`DRUu^d>Ko8_x7KHQv90x%0J4NilPsF5k;(L-
zsTwQgGUeq(y1P>Jln?SR$r#N4^)^tl=mMny#a1ZD&6m
zOf#`73tay00&l!_nZaJ@&h>NegHJF#^2p7BX%?Bj{f9^n?Zp)?SHJ!S%bumWZ~2Bm
zLcz!~H&bG6c8=ODUF0$*sd$>c>^>aZ#OnE$J>6X-(rH$!E1duAG(UV_;-N<$A1tE!6Yy7f82FxZ>Fo3*7&
zRF{`g#q}TWn%49navh9Z$?BV-5Q0~p>TPO7piqALF5Z4;2Gv~U*4X?uGrNMm8kVXm
z4JzKX4j5aRvMh_0l@*f7B*kK}u6wfGEKPmK>Gxje!9%x`&1NZ;N+gp>gb?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