From 6460832fc31501eae808a2d8b9ae0b60269500b1 Mon Sep 17 00:00:00 2001 From: slerena Date: Mon, 28 Jul 2008 17:40:33 +0000 Subject: [PATCH] 2008-07-27 Sancho Lerena * events_marquee.php: Small improvement, show agent name. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@979 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 2 ++ pandora_console/operation/events/events_marquee.php | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 97844ec49b..c787c4e99c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,5 +1,7 @@ 2008-07-27 Sancho Lerena + * events_marquee.php: Small improvement, show agent name. + * events_marquee.php: I forget to commit this file in my prev. commit. This is a new file because I lost it :-( diff --git a/pandora_console/operation/events/events_marquee.php b/pandora_console/operation/events/events_marquee.php index b10837cb41..91b9e1fa2b 100644 --- a/pandora_console/operation/events/events_marquee.php +++ b/pandora_console/operation/events/events_marquee.php @@ -29,11 +29,16 @@ require "../../include/config.php"; require_once "../../include/functions.php"; require_once "../../include/functions_db.php"; -$sql = "SELECT evento, timestamp FROM tevento ORDER BY utimestamp DESC LIMIT 0 , $MAX_MARQUEE_EVENTS"; +$sql = "SELECT evento, timestamp, id_agente FROM tevento ORDER BY utimestamp DESC LIMIT 0 , $MAX_MARQUEE_EVENTS"; $result=mysql_query($sql); while($row=mysql_fetch_array($result,MYSQL_ASSOC)) { - $output .= $row["evento"]. " ( ". human_time_comparation($row["timestamp"]). " ) "; + $agente = ""; + if ($row["id_agente"] != 0){ + $agente = get_db_sql ("SELECT nombre FROM tagente WHERE id_agente = ". $row["id_agente"]); + $agente = $agente . " : "; + } + $output .= strtoupper($agente) . $row["evento"]. " , ". human_time_comparation($row["timestamp"]); $output .= ".    .    .    .    .    .    . "; }