if($_GET["area"] != "") { $area = addslashes($_GET["area"]); } else { $area = "ALL"; } if($_GET["noticeID"] != "") { $noticeID = addslashes($_GET["noticeID"]); } else { $noticeID = "NOTSET"; } /* notice_id notice_date_start notice_date_end notice_subject notice_service notice_committee notice_detail */ function PrintColor($severity) { switch($severity) { case "Information"; $color = "#0099FF"; break; case "Low"; $color = "#FF9900"; break; case "Medium"; $color = "#FF6600"; break; case "High"; $color = "#FF3300"; break; case "Danger"; $color = "#FF0000"; break; } return $color; } if($noticeID == "NOTSET") { if($area != "ALL") { $myQ = mysql_query("SELECT * from notices WHERE notice_committee = '$area' AND notice_date_end > '" . time() . "' ORDER BY notice_date_start DESC LIMIT 10"); } else { $myQ = mysql_query("SELECT * from notices WHERE notice_date_end > '" . time() . "' ORDER BY notice_date_start DESC LIMIT 10"); } if(@mysql_num_rows($myQ) > 0) { ?>
| Subject | Service | Committee | ETA | |
| " width="20px"> | ">=$row["notice_subject"];?> | =$row["notice_service"];?> | =$row["notice_committee"];?> | if(time() > $row["notice_date_start"] && time() < $row["notice_date_end"]) { // already started? print "In progress. End " . date("d/n/Y g:i:s A", $row["notice_date_end"]); } else { print date("d/n/Y g:i:s A", $row["notice_date_start"]); } ?> |
| Notice - =$row["notice_subject"];?> | |
|---|---|
| Start | =date("d/n/Y g:i:s A", $row["notice_date_start"]);?> |
| End | =date("d/n/Y g:i:s A", $row["notice_date_end"]);?> |
| Impact | ">=$row["notice_severity"];?> |
| Committee | =$row["notice_committee"];?> |
| Service | =$row["notice_service"];?> |
| Details | =str_replace("\n", " ", $row["notice_detail"]);?> |
} else { print "Invalid Notice ID!"; } } ?>