Heuristic ranking analysis
[contractdashboard.git] / displayContract.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
 
include_once("./lib/common.inc.php");
include_header("Contract");
$query = sprintf("SELECT *
FROM `contractnotice`
WHERE  CNID = '%d'", mysql_real_escape_string($_REQUEST['CNID']));
 
$result = mysql_query($query);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
setlocale(LC_MONETARY, 'en_US');
foreach (array_filter($row) as $key => $value) {
        echo "<b>$key</b>&nbsp;";
switch ($key) {
case "supplierName":
case "supplierABN":
        echo '<a href="displaySupplier.php?supplier='.$row['supplierABN'].'-'.urlencode($row['supplierName']).'">'.$value."</a>";
        break;
case "agencyName":
        echo '<a href="displayAgency.php?agency='.urlencode($value).'">'.$value."</a>";
        break;
case "value":
        echo "$".number_format(doubleval($value),2);
        break;
default:
        echo str_replace("  ","<br>",$value);
}
echo "<br>";
}
}
echo '<a href="https://www.tenders.gov.au/?event=public.advancedsearch.keyword&keyword=CN'.$_REQUEST['CNID'].'"> View original record @ tenders.gov.au</a>';
 
mysql_free_result($result);
include_footer();
?>