--- a/fhiiqm/vertrag_flist1.php Fri Dec 23 15:03:37 2011 +0100
+++ b/fhiiqm/vertrag_flist1.php Thu Jan 12 11:41:22 2012 +0100
@@ -105,6 +105,8 @@
$bg2 = "#DEDFE1";
$bg = "#FFFFFF";
+ $heute = new DateTime();
+
$vanz = $dbc -> querySingleItem("SELECT @anz");
echo "<p><b>Verträge - Übersicht</b></p>\n";
@@ -164,7 +166,14 @@
foreach ($result as $row)
{
if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
- echo "<tr bgcolor='" . $bg . "'><td width='17%'><b>$row->cname</b></td>";
+ echo "<tr bgcolor='" . $bg . "'>";
+ if ($row->cend)
+ {
+ $ce = new DateTime($row->cend);
+ if ((!$row->cauto || is_null($row->cauto)) && $heute > $ce) $class="class='red'"; else $class="";
+ }
+ else $class="";
+ echo "<td width='17%' $class><b>$row->cname<br /></b></td>";
// echo "<td>$row->contract_s</td>";
echo "<td width='22%'>" . nl2br($row->clong) . "</td>";
echo "<td>$row->typ</td>";