Hi, I created a small task script for the office, (of course with the help of some of you guys) and I just want to know is it possible to have the priority cell or number change colors when the task is over 15 days old? The script is below:
$sql = "
SELECT *
FROM $table_name
WHERE (status<>'Completed' AND status<>'Canceled')
ORDER BY priority
";
$result = @($sql,$connection) or die("Couldn't execute query.");
$the_task = "
<table width=100% cellpadding=2 cellspacing=2 border=0>
<tr>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Date:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Subject:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Priority:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Submitted By:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Workcenter:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Phone:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Assigned To:</font></td>
<td bgcolor=#4040FF><font size=1 face=arial color=#ffffff>Status:</font></td>
</tr>
";
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$date = $row['date'];
$subject = $row['subject'];
$priority = $row['priority'];
$calledinby = $row['calledinby'];
$workcenter = $row['workcenter'];
$phone = $row['phone'];
$assignedto = $row['assignedto'];
$status = $row['status'];
$the_task .= "<tr>
<td bgcolor=#ECDC94><font size=1 face=arial>$date</font></td>
<td bgcolor=#ECDC94><font size=1 face=arial><a href=\"show_individualtask.php?id=$id\">$subject</a></font></td>
<td bgcolor=#ECDC94><font size=1 face=arial>$priority</font></td>
<td bgcolor=#ECDC94><font size=1 face=arial>$calledinby</font></td>
<td bgcolor=#ECDC94><font size=1 face=arial>$workcenter</font></td>
<td bgcolor=#ECDC94><font size=1 face=arial>$phone</font></td>
<td bgcolor=#ECDC94><font size=1 face=arial>$assignedto</font></td>
<td bgcolor=#ECDC94><font size=1 face=arial>$status</font></td>";
}
$the_task .= "</table>";
?>
Thanks for any help...
:o) Ivan