Table problem
Posted: Thu Feb 25, 2010 3:56 am
I have the follwing table:
which turns the row red if priority is 1 (high)
basically what i want to do is add:
and if that is true make the row go green but keep priority calls red...
I can get them to work individually but not together....
Any ideas?
Code: Select all
if ($item['priority']==1)
{
echo "<tr [color=#FF0000]style=\"color:red;\"[/color] onclick=\"document.location='viewcall.php?id=" . $item['id'] . "&pfx=" . $item['id_prefix']; if($HTTP_SERVER_VARS['QUERY_STRING']){ echo "&";} echo $HTTP_SERVER_VARS['QUERY_STRING'] . "';\"><td class=smoothbg" . $stripe .">" . $item['id_prefix'] . $item['id'] . "</td><td class=smoothbg" . $stripe .">" . substr($item['description'],0,75) . "</td><td class=smoothbg" . $stripe .">" . $days . "d " . $hours . "h " . $mins . "m </td><td class=smoothbg>" . $item['engineer'] . "</td><td class=smoothbg" . $stripe .">" . $item['company'] . "</td><td class=smoothbg" . $stripe ." style=\"color:red;\">" . $item['status'] . "</td></tr>";
} else {
echo "<tr onclick=\"document.location='viewcall.php?id=" . $item['id'] . "&pfx=" . $item['id_prefix']; if($HTTP_SERVER_VARS['QUERY_STRING']){ echo "&";} echo $HTTP_SERVER_VARS['QUERY_STRING'] . "';\"><td class=smoothbg" . $stripe .">" . $item['id_prefix'] . $item['id'] . "</td><td class=smoothbg" . $stripe .">" . substr($item['description'],0,75) . "</td><td class=smoothbg" . $stripe .">" . $days . "d " . $hours . "h " . $mins . "m </td><td class=smoothbg style=\"color:black;\">" . $item['engineer'] . "</td><td class=smoothbg" . $stripe .">" . $item['company'] . "</td><td class=smoothbg" . $stripe ." style=\"color:black;\">" . $item['status'] . "</td></tr>";
}basically what i want to do is add:
Code: Select all
$item['notes']== $days<2I can get them to work individually but not together....
Any ideas?