Ajout d'un visuel sur les actions a faire dont la date est dépassée

This commit is contained in:
Rodolphe Quiedeville 2004-06-30 14:57:08 +00:00
parent 9093c5a020
commit 6d8288d34d

View File

@ -223,7 +223,7 @@ if ( $db->query($sql) )
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td><a href=\"action/fiche.php?id=$obj->id\">".img_file()."</a>&nbsp;"; print "<td width=\"40%\"><a href=\"action/fiche.php?id=$obj->id\">".img_file()."</a>&nbsp;";
print "<a href=\"action/fiche.php?id=$obj->id\">$obj->libelle $obj->label</a></td>"; print "<a href=\"action/fiche.php?id=$obj->id\">$obj->libelle $obj->label</a></td>";
print "<td>".strftime("%d %b %Y",$obj->da)."</td>"; print "<td>".strftime("%d %b %Y",$obj->da)."</td>";
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->sname.'</a></td>'; print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->sname.'</a></td>';
@ -252,33 +252,41 @@ if ($socidp)
{ {
$sql .= " AND s.idp = $socidp"; $sql .= " AND s.idp = $socidp";
} }
$sql .= " ORDER BY a.datea DESC"; $sql .= " ORDER BY a.datea ASC";
if ( $db->query($sql) ) if ( $db->query($sql) )
{ {
$num = $db->num_rows(); $num = $db->num_rows();
if ($num > 0)
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; {
print '<tr class="liste_titre"><td colspan="4">Actions à faire</td></tr>'; print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">';
$var = true; print '<tr class="liste_titre"><td colspan="4">Actions à faire</td></tr>';
$i = 0; $var = true;
$i = 0;
while ($i < $num )
while ($i < $num )
{ {
$obj = $db->fetch_object($i); $obj = $db->fetch_object($i);
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td><a href=\"action/fiche.php?id=$obj->id\">".img_file()."</a>&nbsp;"; print "<td width=\"40%\"><a href=\"action/fiche.php?id=$obj->id\">".img_file()."</a>&nbsp;";
print "<a href=\"action/fiche.php?id=$obj->id\">$obj->libelle $obj->label</a></td>"; print "<a href=\"action/fiche.php?id=$obj->id\">$obj->libelle $obj->label</a></td>";
print "<td>".strftime("%d %b %Y",$obj->da)."</td>";
print '<td>'. strftime("%d %b %Y",$obj->da);
if (date("U",$obj->da) < time())
{
print img_warning();
}
print "</td>";
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->sname.'</a></td>'; print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->sname.'</a></td>';
$i++; $i++;
} }
// TODO Ajouter rappel pour "il y a des contrats à mettre en service" // TODO Ajouter rappel pour "il y a des contrats à mettre en service"
// TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration" // TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration"
print "</table><br>"; print "</table><br>";
}
$db->free(); $db->free();
} }
else else