2008-07-27 Sancho Lerena <slerena@gmail.com>

* 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
This commit is contained in:
slerena 2008-07-28 17:40:33 +00:00
parent 4acf215dc0
commit 6460832fc3
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,7 @@
2008-07-27 Sancho Lerena <slerena@gmail.com>
* 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 :-(

View File

@ -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 .= ".&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;&nbsp;. ";
}