diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index c9fc1359a0a..65626157d9f 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -223,7 +223,7 @@ if ( $db->query($sql) )
$var=!$var;
print "
";
- print "| id\">".img_file()." ";
+ print " | id\">".img_file()." ";
print "id\">$obj->libelle $obj->label | ";
print "".strftime("%d %b %Y",$obj->da)." | ";
print ''.$obj->sname.' | ';
@@ -252,33 +252,41 @@ if ($socidp)
{
$sql .= " AND s.idp = $socidp";
}
-$sql .= " ORDER BY a.datea DESC";
+$sql .= " ORDER BY a.datea ASC";
if ( $db->query($sql) )
{
$num = $db->num_rows();
-
- print '';
- print '| Actions à faire |
';
- $var = true;
- $i = 0;
-
- while ($i < $num )
+ if ($num > 0)
+ {
+ print '';
+ print '| Actions à faire |
';
+ $var = true;
+ $i = 0;
+
+ while ($i < $num )
{
$obj = $db->fetch_object($i);
$var=!$var;
print "";
- print "| id\">".img_file()." ";
+ print " | id\">".img_file()." ";
print "id\">$obj->libelle $obj->label | ";
- print "".strftime("%d %b %Y",$obj->da)." | ";
+
+ print ''. strftime("%d %b %Y",$obj->da);
+ if (date("U",$obj->da) < time())
+ {
+ print img_warning();
+ }
+ print " | ";
+
print ''.$obj->sname.' | ';
$i++;
}
- // TODO Ajouter rappel pour "il y a des contrats à mettre en service"
- // TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration"
- print "
";
-
+ // TODO Ajouter rappel pour "il y a des contrats à mettre en service"
+ // TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration"
+ print "
";
+ }
$db->free();
}
else