--- a/displayContract.php
+++ b/displayContract.php
@@ -1,44 +1,120 @@
- $value) {
- echo "$key ";
-switch ($key) {
-case "supplierName":
-case "supplierABN":
- echo ''.$value."";
- break;
-case "agencyName":
- echo ''.$value."";
- break;
-case "value":
- echo "$".number_format(doubleval($value),2);
- break;
-default:
- echo str_replace(" ","
",$value);
-}
-echo "
";
-}
-}
-echo '
View original record @ tenders.gov.au
';
-
-mysql_free_result($result);
-
-$query = "SELECT * FROM `heuristic_results` where CNID = ".$_REQUEST['CNID'];
-$result = mysql_query($query);
-if (!$result) echo mysql_error().$query;
-while ($r = mysql_fetch_array($result, MYSQL_ASSOC)) {
- echo "{$r['heuristic_name']}: {$r['heuristic_value']} (raw value: {$r['raw_value']}, mean: {$r['mean']}, stddev: {$r['stddev']})
";
-}
-
-include_footer();
-?>
+prepare($query);
+$query->bindParam(":CNID", $_REQUEST['CNID']);
+$query->execute();
+$contractResult = $query->fetch(PDO::FETCH_ASSOC);
+if (!$contractResult) {
+ header("Status: 404 Not Found");
+ header("HTTP/1.0 404 Not Found");
+include_header("Contract Not Found");
+ echo "
{$row['id']} | +{$row['description'][0]} | +\$$value | {$row['agencyName'][0]} | +{$row['contractStart'][0]} | +{$row['supplierName'][0]} | +