[Devel] r406 - trunk

svn at agendadulibre.org svn at agendadulibre.org
Mar 11 Nov 15:26:39 CET 2008


Author: thomas
Date: Tue Nov 11 15:26:37 2008
New Revision: 406

Log:
Affichage du nombre de jours depuis lesquels un évènement est en
attente dans la file de modération.



Modified:
   trunk/moderation.php

Modified: trunk/moderation.php
==============================================================================
--- trunk/moderation.php	(original)
+++ trunk/moderation.php	Tue Nov 11 15:26:37 2008
@@ -39,7 +39,7 @@
 
 echo "<p style=\"font-weight: bold; text-align: center;\">Modérateurs, merci de lire et de tenir compte des <a href=\"moderation-howto.php\">recommandations de modération</a>.</p>";
 
-$ret = $db->query ("select id, title, start_time, end_time, city, region from events where moderated=0 order by start_time");
+$ret = $db->query ("select id, title, start_time, end_time, datediff(now(), submission_time) as waiting_time, city, region from events where moderated=0 order by start_time");
 
 if ($ret == FALSE)
 {
@@ -55,6 +55,7 @@
 echo "<td><b>Date</b></td>\n";
 echo "<td><b>Ville</b></td>\n";
 echo "<td><b>Région</b></td>\n";
+echo "<td><b>En attente depuis</b></td>\n";
 echo "<td><b>Actions</b></td>\n";
 echo "</tr>";
 
@@ -81,6 +82,7 @@
   echo "<td>" . $date . "</td>\n";
   echo "<td>" . stripslashes($row->city) . "</td>\n";
   echo "<td>" . stripslashes(region_find($db, $row->region)) . "</td>\n";
+  echo "<td>" . $row->waiting_time . " jours</td>\n";
   echo "<td>";
   echo "<a href=\"editevent.php?id=" . $row->id . "\">Éditer</a>&nbsp;-&nbsp;";
   echo "<a href=\"validateevent.php?id=" . $row->id . "\">Valider</a>&nbsp;-&nbsp;";


Plus d'informations sur la liste de diffusion Devel