<?php | <?php |
include_once ("./lib/common.inc.php"); | include_once ("./lib/common.inc.php"); |
if ($_REQUEST['agency']) { | if ($_REQUEST['agency']) { |
$agency = htmlentities(strip_tags($_REQUEST['agency'])); | $agency = htmlentities(strip_tags($_REQUEST['agency'])); |
include_header($agency); | include_header($agency); |
echo '<center><h1>'.$agency.'</h1></center>'; | echo '<center><h1>'.$agency.'</h1></center>'; |
agencySuppliersGraph($agency); | $query = 'SELECT category, min("categoryUNSPSC") AS "categoryUNSPSC", count(*) AS count, sum(value) AS value FROM contractnotice |
WHERE "agencyName" like :agency AND '. " " . $standardQ . ' GROUP BY category order by count(*) desc limit 10'; | |
$query = $conn->prepare($query); | |
$query->bindParam(":agency", $agency); | |
$query->execute(); | |
databaseError($conn->errorInfo()); | |
echo "<h3>Categories</h3><table> <thead> | |
<tr> | |
<th>Category</th> | |
<th>Contracts Count</th> | |
<th>Total Contract Value</th> | |
</tr> | |
</thead>"; | |
foreach ($query->fetchAll() as $row) { | |
setlocale(LC_MONETARY, 'en_US'); | |
$value = number_format(doubleval($row['value']), 2); | |
$category = urlencode($row['category']); | |
echo("<tr> | |
<td><B><a href='displayCategory.php?category=$category'>{$row['category']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"); | |
} | |
echo "</table><br/>"; | |
$query = 'SELECT SUM(value) as value, count(*), text_mode("supplierName") "supplierName", min("supplierABN") as "supplierABN", ( | |
case when "supplierABN" != 0 THEN "supplierABN"::text ELSE lower("supplierName") END) as "supplierID" FROM contractnotice | |
WHERE ' .$yearQ . " " . $standardQ . ' AND "agencyName" like :agency | |
GROUP BY "supplierID" ORDER BY "value" DESC'; | |
$query = $conn->prepare($query); | |
$query->bindParam(":agency", $agency); | |
$query->execute(); | |
databaseError($conn->errorInfo()); | |
echo "<h3>Suppliers</h3><table> <thead> | |
<tr> | |
<th>Supplier</th> | |
<th>Contracts Count</th> | |
<th>Total Contract Value</th> | |
</tr> | |
</thead>"; | |
foreach ($query->fetchAll() as $row) { | |
setlocale(LC_MONETARY, 'en_US'); | |
$value = number_format(doubleval($row['value']), 2); | |
$supplierID = $row['supplierABN'].'-'. urlencode($row['supplierName']); | |
echo("<tr> | |
<td><B><a href=\"displaySupplier.php?supplier=$supplierID\" >{$row['supplierName']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"); | |
} | |
echo "</table><br/>"; | |
/* | /* |
* * Common categories and uncommon categories | * Categories table |
* SONs/Panels used table | |
* Replace pie chart with percent count/count/percent value/value table | |
* Procurement method in text, seperate Open via SON from Open | * Procurement method in text, seperate Open via SON from Open |
* Consultancies, Confidentialities percentage | * Consultancies, Confidentialities percentage |
Compliance statistics: amendments, delay in reporting average and number completely late */ | Compliance statistics: amendments, delay in reporting average and number completely late */ |
$query = 'SELECT "CNID", "description", "value", "agencyName", "category", | $query = 'SELECT "CNID", "description", "value", "agencyName", "category", |
"contractStart", "supplierName" | "contractStart", "supplierName" |
FROM contractnotice | FROM contractnotice |
WHERE ' .$yearQ . ' "agencyName" like :agency and "childCN" is null | WHERE ' .$yearQ . ' "agencyName" like :agency and "childCN" is null |
ORDER BY "value" DESC limit 100'; | ORDER BY "value" DESC limit 100'; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->bindParam(":agency", $agency); | $query->bindParam(":agency", $agency); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
echo "<table> <thead> | echo "<h3>Contracts</h3><table> <thead> |
<tr> | <tr> |
<th>Contract Notice Number</th> | <th>Contract Notice Number</th> |
<th>Contract Description</th> | <th>Contract Description</th> |
<th>Total Contract Value</th> | <th>Total Contract Value</th> |
<th>Agency</th> | <th>Agency</th> |
<th>Contract Start Date</th> | <th>Contract Start Date</th> |
<th>Supplier</th> | <th>Supplier</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['value']), 2); | $value = number_format(doubleval($row['value']), 2); |
echo ("<tr> | echo ("<tr> |
<td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td> | <td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td> |
<td><b>{$row['description']}</b></a></td> | <td><b>{$row['description']}</b></a></td> |
<td>\$$value</td><td>{$row['agencyName']}</td> | <td>\$$value</td><td>{$row['agencyName']}</td> |
<td>{$row['contractStart']}</td> | <td>{$row['contractStart']}</td> |
<td>{$row['supplierName']}</td> | <td>{$row['supplierName']}</td> |
</tr>"); | </tr>"); |
} | } |
echo "</table>"; | echo "</table>"; |
} else { | } else { |
/* | /* |
split by portfolio | split by portfolio |
*/ | */ |
include_header("Agencies"); | include_header("Agencies"); |
agenciesGraph(); | agenciesGraph(); |
$query = 'SELECT SUM("value"), "agencyName" | $query = 'SELECT SUM("value"), "agencyName" |
FROM contractnotice | FROM contractnotice |
WHERE ' .$yearQ . ' "childCN" is null | WHERE ' .$yearQ . ' "childCN" is null |
GROUP BY "agencyName" '; | GROUP BY "agencyName" '; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
echo "<table> <thead> | echo "<table> <thead> |
<tr> | <tr> |
<th>Agency</th> | <th>Agency</th> |
<th>Total Contracts Value</th> | <th>Total Contracts Value</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row[0]), 2); | $value = number_format(doubleval($row[0]), 2); |
$agency = stripslashes($row[1]); | $agency = stripslashes($row[1]); |
echo ("<tr><td><b><a href=\"displayAgency.php?agency={$agency}\">{$agency}</a></b></td><td>\$$value</td></tr>\n"); | echo ("<tr><td><b><a href=\"displayAgency.php?agency={$agency}\">{$agency}</a></b></td><td>\$$value</td></tr>\n"); |
} | } |
echo "</table>"; | echo "</table>"; |
} | } |
include_footer(); | include_footer(); |
?> | ?> |
<?php | <?php |
include_once ("./lib/common.inc.php"); | include_once("./lib/common.inc.php"); |
if ($_REQUEST['SONID']) { | if ($_REQUEST['SONID']) { |
$query = 'SELECT title from standingoffers where "SONID" = :SONID'; | $query = 'SELECT title FROM standingoffers WHERE "SONID" = :SONID'; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->bindParam(":SONID", $_REQUEST['SONID']); | $query->bindParam(":SONID", $_REQUEST['SONID']); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
$title = reset($query->fetchAll())['title']; | $title = reset($query->fetchAll())['title']; |
include_header($title); | include_header($title); |
echo "<center><h1>".$_REQUEST['SONID']." - ".$title."</h1></center>"; | echo "<center><h1>" . $_REQUEST['SONID'] . " - " . $title . "</h1></center>"; |
$query = 'select category, min("categoryUNSPSC") as "categoryUNSPSC" from contractnotice where "SONID" = :SONID group by category'; | |
$query = $conn->prepare($query); | $query = 'SELECT category, min("categoryUNSPSC") AS "categoryUNSPSC", count(*) AS count, sum(value) AS value |
$query->bindParam(":SONID", $_REQUEST['SONID']); | FROM contractnotice |
$query->execute(); | WHERE "SONID" = :SONID |
databaseError($conn->errorInfo()); | GROUP BY category'; |
echo "Categories: "; | $query = $conn->prepare($query); |
foreach ($query->fetchAll() as $row) { | $query->bindParam(":SONID", $_REQUEST['SONID']); |
echo "<span class='label label-warning'><a href='displayCategory.php?category={$row['category']}'>{$row['category']}</a></span> "; | $query->execute(); |
} | databaseError($conn->errorInfo()); |
echo "<br/>"; | echo "<h3>Categories</h3><table> <thead> |
$query = 'select "supplierABN", min("supplierName") as "supplierName", count(*), sum(value) as value from contractnotice | <tr> |
WHERE '.$yearQ.' "childCN" is null AND "SONID" = :SONID group by "supplierABN" | <th>Category</th> |
union select abn as "supplierABN",name as "supplierName",0 as sum,0 as value from standingoffer_suppliers | <th>Contracts Count</th> |
where "SONID" = :SONID and abn not in (select distinct "supplierABN" as abn from contractnotice where "SONID" = :SONID)'; | <th>Total Contract Value</th> |
$query = $conn->prepare($query); | </tr> |
$query->bindParam(":SONID", $_REQUEST['SONID']); | </thead>"; |
$query->execute(); | foreach ($query->fetchAll() as $row) { |
databaseError($conn->errorInfo()); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['value']), 2); | |
$category = urlencode($row['category']); | |
echo("<tr> | |
<td><B><a href='displayCategory.php?category=$category'>{$row['category']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"); | |
} | |
echo "</table><br/>"; | |
$query = 'SELECT "supplierABN", text_mode("supplierName") AS "supplierName", count(*), sum(value) AS value FROM contractnotice | |
WHERE ' . $yearQ . ' "childCN" IS NULL AND "SONID" = :SONID GROUP BY "supplierABN" | |
UNION SELECT abn AS "supplierABN",name AS "supplierName",0 AS sum,0 AS value FROM standingoffer_suppliers | |
WHERE "SONID" = :SONID AND abn NOT IN (SELECT DISTINCT "supplierABN" AS abn FROM contractnotice WHERE "SONID" = :SONID)'; | |
$query = $conn->prepare($query); | |
$query->bindParam(":SONID", $_REQUEST['SONID']); | |
$query->execute(); | |
databaseError($conn->errorInfo()); | |
echo '<br><a href="https://www.tenders.gov.au/?event=public.advancedsearch.CNSONRedirect&type=sonSearchEvent&SONID=' . $_REQUEST['SONID'] . '"> View original record @ tenders.gov.au</a><br>'; | echo '<br><a href="https://www.tenders.gov.au/?event=public.advancedsearch.CNSONRedirect&type=sonSearchEvent&SONID=' . $_REQUEST['SONID'] . '"> View original record @ tenders.gov.au</a><br>'; |
echo "<table> <thead> | echo "<h3>Suppliers</h3><table> <thead> |
<tr> | <tr> |
<th>Supplier</th> | <th>Supplier</th> |
<th>Contracts Count</th> | <th>Contracts Count</th> |
<th>Total Contract Value</th> | <th>Total Contract Value</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['value']) , 2); | $value = number_format(doubleval($row['value']), 2); |
$supplier = stripslashes($row['supplierABN'] . '-' . $row['supplierName']); | $supplier = stripslashes($row['supplierABN'] . '-' . $row['supplierName']); |
echo ("<tr> | echo("<tr> |
<td><b><a href=\"displaySupplier.php?supplier={$supplier}\">{$row['supplierName']}</a></b></td> | <td><b><a href=\"displaySupplier.php?supplier={$supplier}\">{$row['supplierName']}</a></b></td> |
<td>{$row['count']}</td> | <td>{$row['count']}</td> |
<td>\$$value</td> | <td>\$$value</td> |
</tr>"); | </tr>"); |
} | } |
echo "</table><table> <thead> | echo "</table><br/><h3>Contracts</h3><table> <thead> |
<tr> | <tr> |
<th>Contract Notice Number</th> | <th>Contract Notice Number</th> |
<th>Contract Description</th> | <th>Contract Description</th> |
<th>Total Contract Value</th> | <th>Total Contract Value</th> |
<th>Agency</th> | <th>Agency</th> |
<th>Contract Start Date</th> | <th>Contract Start Date</th> |
<th>Supplier</th> | <th>Supplier</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
$query = 'SELECT "CNID", description, value, "agencyName", contractnotice."SONID", "contractStart", "supplierName" | $query = 'SELECT "CNID", title, description, value, "agencyName", contractnotice."SONID", "contractStart", "supplierName" |
FROM contractnotice | FROM contractnotice INNER JOIN standingoffers ON contractnotice."SONID" = standingoffers."SONID" |
WHERE '.$yearQ.' "childCN" is null | WHERE ' . $yearQ . ' "childCN" IS NULL |
AND contractnotice."SONID" = :SONID | AND contractnotice."SONID" = :SONID |
ORDER BY value DESC'; | ORDER BY VALUE DESC'; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->bindParam(":SONID", $_REQUEST['SONID']); | $query->bindParam(":SONID", $_REQUEST['SONID']); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['value']) , 2); | $value = number_format(doubleval($row['value']), 2); |
echo ("<tr> | echo("<tr> |
<td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td> | <td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td> |
<td><b>{$row['description']}</b></a></td> | <td><b>{$row['description']}</b></a></td> |
<td>\$$value</td><td>{$row['agencyName']}</td> | <td>\$$value</td><td>{$row['agencyName']}</td> |
<td>{$row['contractStart']}</td> | <td>{$row['contractStart']}</td> |
<td>{$row['supplierName']}</td> | <td>{$row['supplierName']}</td> |
</tr>"); | </tr>"); |
} | } |
echo "</table>"; | echo "</table>"; |
} else { | } else { |
/* | /* |
split by main categories | split by main categories |
*/ | */ |
include_header("Standing Offers"); | include_header("Standing Offers"); |
$query = 'SELECT sum(value), count(*), contractnotice."SONID", min(title) as title | $query = 'SELECT sum(value), count(*), contractnotice."SONID", min(title) AS title |
FROM contractnotice inner join standingoffers on contractnotice."SONID" = standingoffers."SONID" | FROM contractnotice INNER JOIN standingoffers ON contractnotice."SONID" = standingoffers."SONID" |
WHERE '.$yearQ.' "childCN" is null and contractnotice."SONID" != \'\' | WHERE ' . $yearQ . ' "childCN" IS NULL AND contractnotice."SONID" != \'\' |
GROUP BY contractnotice."SONID" ORDER BY sum(value) DESC '; | GROUP BY contractnotice."SONID" ORDER BY sum(VALUE) DESC '; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
echo "<table> <thead> | echo "<table> <thead> |
<tr> | <tr> |
<th>SONID</th> | <th>SONID</th> |
<th>Total Contracts Value</th> | <th>Total Contracts Value</th> |
<th>Number of Contracts</th> | <th>Number of Contracts</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['sum']) , 2); | $value = number_format(doubleval($row['sum']), 2); |
echo ("<tr><td><A href=\"displaySON.php?SONID={$row['SONID']}\"><b>{$row['title']}</b></a></td><td>\$$value</td><td>{$row['count']}</td></tr>"); | echo("<tr><td><A href=\"displaySON.php?SONID={$row['SONID']}\"><b>{$row['title']}</b></a></td><td>\$$value</td><td>{$row['count']}</td></tr>"); |
} | } |
echo "</table>"; | echo "</table>"; |
} | } |
include_footer(); | include_footer(); |
<?php | <?php |
include_once ("./lib/common.inc.php"); | include_once("./lib/common.inc.php"); |
if ($_REQUEST['supplier']) { | if ($_REQUEST['supplier']) { |
$supplierS = htmlentities(strip_tags($_REQUEST['supplier'])); | $supplierS = htmlentities(strip_tags($_REQUEST['supplier'])); |
$title = $supplierName; | $title = $supplierName; |
if ($supplierABN) { | if ($supplierABN) { |
$query = 'SELECT text_mode("supplierName") as "supplierName" from contractnotice where "supplierABN" = :supplierABN group by "supplierABN"'; | $query = 'SELECT text_mode("supplierName") AS "supplierName" FROM contractnotice WHERE "supplierABN" = :supplierABN GROUP BY "supplierABN"'; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->bindParam(":supplierABN", $supplierABN); | $query->bindParam(":supplierABN", $supplierABN); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
$title = reset($query->fetchAll())['supplierName']; | $title = reset($query->fetchAll())['supplierName']; |
} | } |
include_header(str_replace("%","",$title)); | include_header(str_replace("%", "", $title)); |
echo '<center><h1>'.str_replace("%","",$title).'</h1></center>'; | echo '<center><h1>' . str_replace("%", "", $title) . '</h1></center>'; |
agenciesGraph(); | /* |
/* | * Common names and uncommon names |
* Make supplier name the most common name for this ABN | * Procurement method in text, seperate Open via SON from Open |
* Common names and uncommon names | * Consultancies, Confidentialities percentage |
* Common categories and uncommon categories | */ |
* Procurement method in text, seperate Open via SON from Open | $query = 'SELECT category, min("categoryUNSPSC") AS "categoryUNSPSC", count(*) AS count, sum(value) AS value FROM contractnotice |
* Consultancies, Confidentialities percentage | WHERE ' . $supplierQ . " " . $standardQ . ' GROUP BY category ORDER BY count(*) DESC LIMIT 10'; |
*/ | $query = $conn->prepare($query); |
$query = 'select contractnotice."SONID", min(title) as title, count(*), sum(value) as value from contractnotice inner join standingoffers on contractnotice."SONID" = standingoffers."SONID" WHERE ' .$yearQ . ' ' . | if ($supplierParts[0] > 0) { |
$supplierQ . ' ' . $standardQ | $query->bindParam(":supplierABN", $supplierABN); |
. ' and contractnotice."SONID" != \'\' group by contractnotice."SONID"'; | } else { |
$query = $conn->prepare($query); | $query->bindParam(":supplierName", $supplierName); |
} | |
$query->execute(); | |
databaseError($conn->errorInfo()); | |
if ($supplierParts[0] > 0) { | echo "<h3>Categories</h3><table> <thead> |
$query->bindParam(":supplierABN", $supplierABN); | <tr> |
} else { | <th>Category</th> |
$query->bindParam(":supplierName", $supplierName); | <th>Contracts Count</th> |
} | <th>Total Contract Value</th> |
</tr> | |
</thead>"; | |
foreach ($query->fetchAll() as $row) { | |
setlocale(LC_MONETARY, 'en_US'); | |
$value = number_format(doubleval($row['value']), 2); | |
$category = urlencode($row['category']); | |
echo("<tr> | |
<td><B><a href='displayCategory.php?category=$category'>{$row['category']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"); | |
} | |
echo "</table><br/>"; | |
$query = 'SELECT SUM("value") AS "value", count(*), MAX(contractnotice."agencyName") AS agencyname FROM contractnotice JOIN agency_nametoabn ON contractnotice."agencyName"=agency_nametoabn."agencyName" | |
WHERE ' . $yearQ . ' ' . $supplierQ . ' "childCN" IS NULL | |
GROUP BY abn ORDER BY SUM("value") DESC'; | |
$query = $conn->prepare($query); | |
if (count($supplierParts) > 0) { | |
if ($supplierParts[0] > 0) { | |
$query->bindParam(":supplierABN", $supplierABN); | |
} else { | |
$query->bindParam(":supplierName", $supplierName); | |
} | |
} | |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
echo "<h3>Standing Offers/Panels</h3><table> <thead> | |
echo "<h3>Agencies</h3><table> <thead> | |
<tr> | |
<th>Agency</th> | |
<th>Contracts Count</th> | |
<th>Total Contract Value</th> | |
</tr> | |
</thead>"; | |
foreach ($query->fetchAll() as $row) { | |
setlocale(LC_MONETARY, 'en_US'); | |
$value = number_format(doubleval($row['value']), 2); | |
$agency =urlencode($row['agencyname']); | |
echo("<tr> | |
<td><B><a href=\"displayAgency.php?agency=$agency\">{$row['agencyname']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"); | |
} | |
echo "</table><br/>"; | |
$query = 'SELECT contractnotice."SONID", min(title) AS title, count(*), sum(value) AS value FROM contractnotice INNER JOIN standingoffers ON contractnotice."SONID" = standingoffers."SONID" WHERE ' . $yearQ . ' ' . | |
$supplierQ . ' ' . $standardQ | |
. ' AND contractnotice."SONID" != \'\' GROUP BY contractnotice."SONID"'; | |
$query = $conn->prepare($query); | |
if ($supplierParts[0] > 0) { | |
$query->bindParam(":supplierABN", $supplierABN); | |
} else { | |
$query->bindParam(":supplierName", $supplierName); | |
} | |
$query->execute(); | |
databaseError($conn->errorInfo()); | |
$sonrows = ""; | |
foreach ($query->fetchAll() as $row) { | |
setlocale(LC_MONETARY, 'en_US'); | |
$value = number_format(doubleval($row['value']), 2); | |
$sonrows .= "<tr> | |
<td><B><a href=\"displaySON.php?SONID={$row['SONID']}\">{$row['title']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"; | |
} | |
if (strlen($sonrows) > 1) { | |
echo "<h3>Standing Offers/Panels</h3><table> <thead> | |
<tr> | <tr> |
<th>Standing Offer</th> | <th>Standing Offer</th> |
<th>Contracts Count</th> | <th>Contracts Count</th> |
<th>Total Contract Value</th> | <th>Total Contract Value</th> |
</tr> | </tr> |
</thead>"; | </thead>$sonrows</table><br/>"; |
foreach ($query->fetchAll() as $row) { | |
setlocale(LC_MONETARY, 'en_US'); | |
$value = number_format(doubleval($row['value']), 2); | |
echo ("<tr> | |
<td><B><a href=\"displaySON.php?SONID={$row['SONID']}\">{$row['title']}</a></b></td> | |
<td>{$row['count']}</td> | |
<td>\$$value</td> | |
</tr>"); | |
} | } |
echo "</table><table><h3>Contracts</h3> <thead> | echo "<table><h3>Contracts</h3> <thead> |
<tr> | <tr> |
<th>Contract Notice Number</th> | <th>Contract Notice Number</th> |
<th>Contract Description</th> | <th>Contract Description</th> |
<th>Total Contract Value</th> | <th>Total Contract Value</th> |
<th>Agency</th> | <th>Agency</th> |
<th>Contract Start Date</th> | <th>Contract Start Date</th> |
<th>Supplier</th> | <th>Supplier</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
$query = 'SELECT "CNID", "description", "value", "agencyName", "category", | $query = 'SELECT "CNID", "description", "value", "agencyName", "category", |
"contractStart", "supplierName" | "contractStart", "supplierName" |
FROM contractnotice WHERE ' .$yearQ . ' ' . | FROM contractnotice WHERE ' . $yearQ . ' ' . |
$supplierQ . ' ' . $standardQ | $supplierQ . ' ' . $standardQ |
. ' ORDER BY value DESC'; | . ' ORDER BY VALUE DESC'; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
if ($supplierParts[0] > 0) { | if ($supplierParts[0] > 0) { |
$query->bindParam(":supplierABN", $supplierABN); | $query->bindParam(":supplierABN", $supplierABN); |
} else { | } else { |
$query->bindParam(":supplierName", $supplierName); | $query->bindParam(":supplierName", $supplierName); |
} | } |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['value']), 2); | $value = number_format(doubleval($row['value']), 2); |
echo ("<tr> | echo("<tr> |
<td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td> | <td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td> |
<td><b>{$row['description']}</b></a></td> | <td><b>{$row['description']}</b></a></td> |
<td>\$$value</td><td>{$row['agencyName']}</td> | <td>\$$value</td><td>{$row['agencyName']}</td> |
<td>{$row['contractStart']}</td> | <td>{$row['contractStart']}</td> |
<td>{$row['supplierName']}</td> | <td>{$row['supplierName']}</td> |
</tr>"); | </tr>"); |
} | } |
echo "</table>"; | echo "</table>"; |
} else { | } else { |
/* | /* |
histograph of supplier size/value | histograph of supplier size/value |
*/ | */ |
include_header("Suppliers"); | include_header("Suppliers"); |
suppliersGraph(); | suppliersGraph(); |
$query = 'SELECT SUM("value") as val, text_mode("supplierName") as supplierName, "supplierABN",( | $query = 'SELECT SUM("value") AS val, text_mode("supplierName") AS supplierName, "supplierABN",( |
case when "supplierABN" != 0 THEN lower("supplierABN"::text) ELSE lower("supplierName") END) as supplierID | CASE WHEN "supplierABN" != 0 THEN lower("supplierABN"::TEXT) ELSE lower("supplierName") END) AS supplierID |
FROM contractnotice | FROM contractnotice |
WHERE ' .$yearQ . ' "childCN" is null | WHERE ' . $yearQ . ' "childCN" IS NULL |
GROUP BY supplierID,"supplierABN" | GROUP BY supplierID,"supplierABN" |
ORDER BY val DESC | ORDER BY val DESC |
LIMIT 100'; | LIMIT 100'; |
$query = $conn->prepare($query); | $query = $conn->prepare($query); |
$query->execute(); | $query->execute(); |
databaseError($conn->errorInfo()); | databaseError($conn->errorInfo()); |
echo "<table> <thead> | echo "<table> <thead> |
<tr> | <tr> |
<th>Position</th> | <th>Position</th> |
<th>Supplier</th> | <th>Supplier</th> |
<th>Total Contract Value</th> | <th>Total Contract Value</th> |
</tr> | </tr> |
</thead>"; | </thead>"; |
$i = 1; | $i = 1; |
foreach ($query->fetchAll() as $row) { | foreach ($query->fetchAll() as $row) { |
setlocale(LC_MONETARY, 'en_US'); | setlocale(LC_MONETARY, 'en_US'); |
$value = number_format(doubleval($row['val']), 2); | $value = number_format(doubleval($row['val']), 2); |
$supplier = stripslashes($row['supplierABN'] . '-' . $row['suppliername']); | $supplier = stripslashes($row['supplierABN'] . '-' . $row['suppliername']); |
echo ("<tr><td>$i</td><td><b><a href=\"displaySupplier.php?supplier={$supplier}\">" . ucsmart($row['suppliername']) . "</a></b></td><td>\$$value</td></tr>\n"); | echo("<tr><td>$i</td><td><b><a href=\"displaySupplier.php?supplier={$supplier}\">" . ucsmart($row['suppliername']) . "</a></b></td><td>\$$value</td></tr>\n"); |
$i++; | $i++; |
} | } |
echo "</table>"; | echo "</table>"; |
} | } |
include_footer(); | include_footer(); |
?> | ?> |
<?php | <?php |
date_default_timezone_set("Australia/ACT"); | date_default_timezone_set("Australia/ACT"); |
error_reporting(E_ALL ^ E_NOTICE); | error_reporting(E_ALL ^ E_NOTICE); |
$conn = new PDO("pgsql:dbname=contractdashboard;user=postgres;password=snmc;host=localhost"); | $conn = new PDO("pgsql:dbname=contractdashboard;user=alex;host=localhost"); |
if (!$conn) { | if (!$conn) { |
die("A database error occurred.\n"); | die("A database error occurred.\n"); |
} | } |
define('ROOT', pathinfo(__FILE__, PATHINFO_DIRNAME)); | define('ROOT', pathinfo(__FILE__, PATHINFO_DIRNAME)); |
if (strstr($_SERVER['PHP_SELF'], "labs/") || strstr($_SERVER['PHP_SELF'], "admin/") || strstr($_SERVER['PHP_SELF'], "heuristics/")) { | if (strstr($_SERVER['PHP_SELF'], "labs/") || strstr($_SERVER['PHP_SELF'], "admin/") || strstr($_SERVER['PHP_SELF'], "heuristics/")) { |
$basePath = "../"; | $basePath = "../"; |
} | } |
require ROOT . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'openid.php'; | /*require ROOT . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'openid.php'; |
require(ROOT.'/solarium/vendor/autoload.php'); | require(ROOT.'/solarium/vendor/autoload.php'); |
require(ROOT.'/solarium/library/Solarium/Autoloader.php'); | require(ROOT.'/solarium/library/Solarium/Autoloader.php'); |
Solarium\Autoloader::register(); | Solarium\Autoloader::register(); |
// check solarium version available | // check solarium version available |
//echo 'Solarium library version: ' . Solarium\Client::VERSION . ' - '; | //echo 'Solarium library version: ' . Solarium\Client::VERSION . ' - '; |
$config = array( | $config = array( |
'endpoint' => array( | 'endpoint' => array( |
'localhost' => array( | 'localhost' => array( |
'host' => '127.0.0.1', | 'host' => '127.0.0.1', |
'port' => 8983, | 'port' => 8983, |
'path' => '/solr/contracts/', | 'path' => '/solr/contracts/', |
) | ) |
) | ) |
); | ); |
// create a client instance | // create a client instance |
$solr_client = new Solarium\Client($config); | $solr_client = new Solarium\Client($config); |
$openid = new LightOpenID($_SERVER['HTTP_HOST']); | $openid = new LightOpenID($_SERVER['HTTP_HOST']); |
// you have to open the session to be able to modify or remove it | // you have to open the session to be able to modify or remove it |
session_start(); | session_start(); |
function login() { | function login() { |
global $openid; | global $openid; |
if (!$openid->mode) { | if (!$openid->mode) { |
$openid->required = array('contact/email'); | $openid->required = array('contact/email'); |
$openid->identity = 'https://www.google.com/accounts/o8/id'; | $openid->identity = 'https://www.google.com/accounts/o8/id'; |
header('Location: ' . $openid->authUrl()); | header('Location: ' . $openid->authUrl()); |
} | } |
} | } |
function auth() { | function auth() { |
global $openid; | global $openid; |
if ($_SESSION['authed'] == true) { | if ($_SESSION['authed'] == true) { |
return true; | return true; |
} | } |
if ($openid->mode) { | if ($openid->mode) { |
$attr = $openid->getAttributes(); | $attr = $openid->getAttributes(); |
if ($attr['contact/email'] != 'maxious@gmail.com') { | if ($attr['contact/email'] != 'maxious@gmail.com') { |
die('Access Denied'); | die('Access Denied'); |
} else { | } else { |
$_SESSION['authed'] = true; | $_SESSION['authed'] = true; |
} | } |
} else { | } else { |
login(); | login(); |
} | } |
} | }*/ |
// $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | // $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
function databaseError($errMsg) { | function databaseError($errMsg) { |
if ($errMsg[2] != "") { | if ($errMsg[2] != "") { |
echo '<div class="alert-message error">'; | echo '<div class="alert-message error">'; |
die(print_r($errMsg, true)); | die(print_r($errMsg, true)); |
echo "</div>"; | echo "</div>"; |
} | } |
} | } |
function ucsmart($str) { | function ucsmart($str) { |
$shortWords = Array("The", "Pty", "Ltd", "Inc", "Red", "Oil", "A", "An", "And", "At", "For", "In" | $shortWords = Array("The", "Pty", "Ltd", "Inc", "Red", "Oil", "A", "An", "And", "At", "For", "In" |
, "Of", "On", "Or", "The", "To", "With"); | , "Of", "On", "Or", "The", "To", "With"); |
$strArray = explode(" ", preg_replace_callback("/(?<=(?<!:|’s)\W) | $strArray = explode(" ", preg_replace_callback("/(?<=(?<!:|’s)\W) |
(A|An|And|At|For|In|Of|On|Or|The|To|With) | (A|An|And|At|For|In|Of|On|Or|The|To|With) |
(?=\W)/", | (?=\W)/", |
function($matches) { return strtolower($matches[1]); } , ucwords(strtolower($str)))); | function($matches) { return strtolower($matches[1]); } , ucwords(strtolower($str)))); |
foreach ($strArray as &$word) { | foreach ($strArray as &$word) { |
if (strlen($word) <= 4 && !in_array($word, $shortWords)) | if (strlen($word) <= 4 && !in_array($word, $shortWords)) |
$word = strtoupper($word); | $word = strtoupper($word); |
} | } |
return implode(" ", $strArray); | return implode(" ", $strArray); |
} | } |
function percent($num_amount, $num_total) { | function percent($num_amount, $num_total) { |
$count1 = $num_amount / $num_total; | $count1 = $num_amount / $num_total; |
$count2 = $count1 * 100; | $count2 = $count1 * 100; |
$count = number_format($count2, 2); | $count = number_format($count2, 2); |
return $count; | return $count; |
} | } |
function array_sum_all($a) { | function array_sum_all($a) { |
if (!is_array($a)) | if (!is_array($a)) |
return $a; | return $a; |
$totale = 0; | |
foreach ($a as $key => $value) | foreach ($a as $key => $value) |
$totale += array_sum_all($value); | $totale += array_sum_all($value); |
return $totale; | return $totale; |
} | } |
// magic query modifiers | // magic query modifiers |
$agency = filter_var($_REQUEST['agency'], FILTER_SANITIZE_STRING); | $agency = filter_var($_REQUEST['agency'], FILTER_SANITIZE_STRING); |
if ($agency != "") | if ($agency != "") |
$agencyQ = "agencyName = '" . $agency . "' AND "; | $agencyQ = "agencyName = '" . $agency . "' AND "; |
$supplier = filter_var($_REQUEST['supplier'], FILTER_SANITIZE_STRING); | $supplier = filter_var($_REQUEST['supplier'], FILTER_SANITIZE_STRING); |
if ($supplier != "") { | if ($supplier != "") { |
$supplierParts = explode("-", $supplier); | $supplierParts = explode("-", $supplier); |
$supplierName = "%" . $supplierParts[1] . "%"; | $supplierName = "%" . $supplierParts[1] . "%"; |
$supplierABN = $supplierParts[0]; | $supplierABN = $supplierParts[0]; |
if ($supplierParts[0] > 0) | if ($supplierParts[0] > 0) |
$supplierQ = ' "supplierABN" = :supplierABN AND '; | $supplierQ = ' "supplierABN" = :supplierABN AND '; |
else | else |
$supplierQ = ' "supplierName" ILIKE :supplierName AND '; | $supplierQ = ' "supplierName" ILIKE :supplierName AND '; |
} | } |
$startYear = 2007; | $startYear = 2007; |
$year = filter_var($_REQUEST['year'], FILTER_SANITIZE_NUMBER_INT); | $year = filter_var($_REQUEST['year'], FILTER_SANITIZE_NUMBER_INT); |
if ($year != "") { | if ($year != "") { |
$yearQ = 'extract(year from "contractStart") = ' . $year . " AND "; | $yearQ = 'extract(year from "contractStart") = ' . $year . " AND "; |
} | } |
$standardQ = ' "childCN" is null '; // AND YEAR(contractStart) >= 2007 AND YEAR(contractStart) <= 2010'; | $standardQ = ' "childCN" is null '; // AND YEAR(contractStart) >= 2007 AND YEAR(contractStart) <= 2010'; |
$start = 0.0; | $start = 0.0; |
function local_url() { | function local_url() { |
return "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/"; | return "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/"; |
} | } |
function include_header($title) { | function include_header($title) { |
global $start; | global $start; |
?> | ?> |
<!DOCTYPE html> | <!DOCTYPE html> |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" version="XHTML+RDFa 1.1" | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" version="XHTML+RDFa 1.1" |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" |
xmlns:gr="http://purl.org/goodrelations/v1#" | xmlns:gr="http://purl.org/goodrelations/v1#" |
xmlns:dc="http://purl.org/dc/terms/" | xmlns:dc="http://purl.org/dc/terms/" |
xmlns:pc="http://purl.org/procurement#" | xmlns:pc="http://purl.org/procurement#" |
xmlns:unspsc="http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml#" | xmlns:unspsc="http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml#" |
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | xmlns:xsd="http://www.w3.org/2001/XMLSchema#" |
xmlns:pcdt="http://purl.org/procurement/public-contracts-datatypes#" | xmlns:pcdt="http://purl.org/procurement/public-contracts-datatypes#" |
prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# | prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# |
rdfs: http://www.w3.org/2000/01/rdf-schema# | rdfs: http://www.w3.org/2000/01/rdf-schema# |
gr: http://purl.org/goodrelations/v1# | gr: http://purl.org/goodrelations/v1# |
dcterms: http://purl.org/dc/terms/ | dcterms: http://purl.org/dc/terms/ |
pc: http://purl.org/procurement/public-contracts# | pc: http://purl.org/procurement/public-contracts# |
cpv: http://purl.org/weso/pscs/cpv/2008/resource/ | cpv: http://purl.org/weso/pscs/cpv/2008/resource/ |
unspsc: http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml# | unspsc: http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml# |
v: http://www.w3.org/2006/vcard/ns# | v: http://www.w3.org/2006/vcard/ns# |
payment: http://reference.data.gov.uk/def/payment# | payment: http://reference.data.gov.uk/def/payment# |
br: http://purl.org/business-register# | br: http://purl.org/business-register# |
xsd: http://www.w3.org/2001/XMLSchema# | xsd: http://www.w3.org/2001/XMLSchema# |
pcdt: http://purl.org/procurement/public-contracts-datatypes#"> | pcdt: http://purl.org/procurement/public-contracts-datatypes#"> |
<head> | <head> |
<title><?php echo $title; ?> - Contract Dashboard</title> | <title><?php echo $title; ?> - Contract Dashboard</title> |
<link rel="stylesheet" type="text/css" href="bootstrap.min.css"> | <link rel="stylesheet" type="text/css" href="bootstrap.min.css"> |
<link rel="stylesheet" type="text/css" href="bootstrap-responsive.css"> | <link rel="stylesheet" type="text/css" href="bootstrap-responsive.css"> |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> |
<!--[if lt IE 9]> | <!--[if lt IE 9]> |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
<![endif]--> | <![endif]--> |
<script type="text/javascript" src="lib/bsn.AutoSuggest_2.1.3_comp.js" charset="utf-8"></script> | <script type="text/javascript" src="lib/bsn.AutoSuggest_2.1.3_comp.js" charset="utf-8"></script> |
<link rel="stylesheet" href="autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8" /> | <link rel="stylesheet" href="autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8" /> |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> |
<script type="text/javascript"> | <script type="text/javascript"> |
$(document).ready(function() | $(document).ready(function() |
{ | { |
//hide the all of the element with class msg_body | //hide the all of the element with class msg_body |
$(".msg_body").hide(); | $(".msg_body").hide(); |
//toggle the componenet with class msg_body | //toggle the componenet with class msg_body |
$(".msg_head").click(function() | $(".msg_head").click(function() |
{ | { |
$(this).next(".msg_body").slideToggle(600); | $(this).next(".msg_body").slideToggle(600); |
}); | }); |
}); | }); |
</script> | </script> |
<style type="text/css" title="currentStyle"> | <style type="text/css" title="currentStyle"> |
@import "media/css/demo_table.css"; | @import "media/css/demo_table.css"; |
</style> | </style> |
<script type="text/javascript" language="javascript" src="media/js/jquery.dataTables.js"></script> | <script type="text/javascript" language="javascript" src="media/js/jquery.dataTables.js"></script> |
<script type="text/javascript" language="javascript" src="lib/bootstrap-dropdown.js"></script> | <script type="text/javascript" language="javascript" src="lib/bootstrap-dropdown.js"></script> |
<script type="text/javascript" charset="utf-8"> | <script type="text/javascript" charset="utf-8"> |
jQuery.fn.dataTableExt.aTypes.unshift( | jQuery.fn.dataTableExt.aTypes.unshift( |
function ( sData ) | function ( sData ) |
{ | { |
var sValidChars = "0123456789.-,"; | var sValidChars = "0123456789.-,"; |
var Char; | var Char; |
/* Check the numeric part */ | /* Check the numeric part */ |
for ( i=1 ; i<sData.length ; i++ ) | for ( i=1 ; i<sData.length ; i++ ) |
{ | { |
Char = sData.charAt(i); | Char = sData.charAt(i); |
if (sValidChars.indexOf(Char) == -1) | if (sValidChars.indexOf(Char) == -1) |
{ | { |
return null; | return null; |
} | } |
} | } |
/* Check prefixed by currency */ | /* Check prefixed by currency */ |
if ( sData.charAt(0) == '$' || sData.charAt(0) == '£' ) | if ( sData.charAt(0) == '$' || sData.charAt(0) == '£' ) |
{ | { |
return 'currency'; | return 'currency'; |
} | } |
return null; | return null; |
} | } |
); | ); |
jQuery.fn.dataTableExt.oSort['currency-asc'] = function(a,b) { | jQuery.fn.dataTableExt.oSort['currency-asc'] = function(a,b) { |
/* Remove any commas (assumes that if present all strings will have a fixed number of d.p) */ | /* Remove any commas (assumes that if present all strings will have a fixed number of d.p) */ |
var x = a == "-" ? 0 : a.replace( /,/g, "" ); | var x = a == "-" ? 0 : a.replace( /,/g, "" ); |
var y = b == "-" ? 0 : b.replace( /,/g, "" ); | var y = b == "-" ? 0 : b.replace( /,/g, "" ); |
/* Remove the currency sign */ | /* Remove the currency sign */ |
x = x.substring( 1 ); | x = x.substring( 1 ); |
y = y.substring( 1 ); | y = y.substring( 1 ); |
/* Parse and return */ | /* Parse and return */ |
x = parseFloat( x ); | x = parseFloat( x ); |
y = parseFloat( y ); | y = parseFloat( y ); |
return x - y; | return x - y; |
}; | }; |
jQuery.fn.dataTableExt.oSort['currency-desc'] = function(a,b) { | jQuery.fn.dataTableExt.oSort['currency-desc'] = function(a,b) { |
/* Remove any commas (assumes that if present all strings will have a fixed number of d.p) */ | /* Remove any commas (assumes that if present all strings will have a fixed number of d.p) */ |
var x = a == "-" ? 0 : a.replace( /,/g, "" ); | var x = a == "-" ? 0 : a.replace( /,/g, "" ); |
var y = b == "-" ? 0 : b.replace( /,/g, "" ); | var y = b == "-" ? 0 : b.replace( /,/g, "" ); |
/* Remove the currency sign */ | /* Remove the currency sign */ |
x = x.substring( 1 ); | x = x.substring( 1 ); |
y = y.substring( 1 ); | y = y.substring( 1 ); |
/* Parse and return */ | /* Parse and return */ |
x = parseFloat( x ); | x = parseFloat( x ); |
y = parseFloat( y ); | y = parseFloat( y ); |
return y - x; | return y - x; |
}; | }; |
$(document).ready(function() { | $(document).ready(function() { |
$('table').dataTable(); | $('table').dataTable(); |
} ); | } ); |
</script> | </script> |
<link type="text/css" rel="stylesheet" href="style.css"> | <link type="text/css" rel="stylesheet" href="style.css"> |
</head> | </head> |
<body> | <body> |
<div class="navbar"> | <div class="navbar"> |
<div class="navbar-inner"> | <div class="navbar-inner"> |
<div class="container-fluid"> | <div class="container-fluid"> |
<a class="brand" href="#">contract dashboard</a> | <a class="brand" href="#">contract dashboard</a> |
<ul class="nav"> | <ul class="nav"> |
<li><a href="displayAgency.php">agencies</a></li> | <li><a href="displayAgency.php">agencies</a></li> |
<li><a href="displaySupplier.php">suppliers</a></li> | <li><a href="displaySupplier.php">suppliers</a></li> |
<li><a href="displaySON.php">standing offers</a></li> | <li><a href="displaySON.php">standing offers</a></li> |
<li><a href="displayCategory.php">categories</a></li> | <li><a href="displayCategory.php">categories</a></li> |
<li><a href="displayCalendar.php">dates</a></li> | <li><a href="displayCalendar.php">dates</a></li> |
<li><a href="displayProcurementMethod.php">tenderm</a></li> | <li><a href="displayProcurementMethod.php">tenderm</a></li> |
<li><a href="displayConfidentialities.php">confidentiality</a></li> | <li><a href="displayConfidentialities.php">confidentiality</a></li> |
<li><a href="displayConsultancies.php">consultancies</a></li> | <li><a href="displayConsultancies.php">consultancies</a></li> |
<li><a href="displayAmendments.php">amendments</a></li> | <li><a href="displayAmendments.php">amendments</a></li> |
<li><a href="displayMap.php">geo</a></li> | <li><a href="displayMap.php">geo</a></li> |
</ul> | </ul> |
<form method="get" action="search.php" class="pull-right"> | <form method="get" action="search.php" class="pull-right"> |
<input type="text" id="searchKeyword" name="searchKeyword" value="" placeholder="Search" /> | <input type="text" id="searchKeyword" name="searchKeyword" value="" placeholder="Search" /> |
<input type="hidden" id="searchID" name="searchID" value=""/> | <input type="hidden" id="searchID" name="searchID" value=""/> |
</form> | </form> |
</div> | </div> |
</div><!-- /topbar-inner --> | </div><!-- /topbar-inner --> |
</div><!-- /topbar --> | </div><!-- /topbar --> |
</div><!-- /topbar-wrapper --> | </div><!-- /topbar-wrapper --> |
<script type="text/javascript"> | <script type="text/javascript"> |
/* var options_xml = { | var options_xml = { |
script: function (input) { return "search_autosuggest.php?input="+input; }, | script: function (input) { return "search_autosuggest.php?input="+input; }, |
varname:"input", | varname:"input", |
callback: function (obj) { document.getElementById('searchID').value = obj.id; } | callback: function (obj) { document.getElementById('searchID').value = obj.id; } |
}; | }; |
var as_xml = new bsn.AutoSuggest('searchKeyword', options_xml);*/ | var as_xml = new bsn.AutoSuggest('searchKeyword', options_xml); |
</script> | </script> |
<div class="container-fluid"> | <div class="container-fluid"> |
<div class="row-fluid"> | <div class="row-fluid"> |
<div class="span3"> | <div class="span3"> |
<h3> Filter by: </h3> | <h3> Filter by: </h3> |
<div class="well sidebar-nav"> | <div class="well sidebar-nav"> |
<li class="nav-header">Year</li> | <li class="nav-header">Year</li> |
<?php | <?php |
foreach (range(2007,2016) as $year) { | foreach (range(2007,2016) as $year) { |
$get = $_GET; | $get = $_GET; |
$get['year'] = $year; | $get['year'] = $year; |
$query = http_build_query($get); | $query = http_build_query($get); |
echo "<li><A href='?$query'>"; | echo "<li><A href='?$query'>"; |
if ($_GET['year'] == $year) echo "<b>"; | if ($_GET['year'] == $year) echo "<b>"; |
echo "$year"; | echo "$year"; |
if ($_GET['year'] == $year) echo "</b>"; | if ($_GET['year'] == $year) echo "</b>"; |
echo "</a></li>"; | echo "</a></li>"; |
} | } |
?> | ?> |
</div> | </div> |
</div> | </div> |
<div class="span9"> | <div class="span9"> |
<?php | <?php |
$start = (float) array_sum(explode(' ', microtime())); | $start = (float) array_sum(explode(' ', microtime())); |
} | } |
function include_footer() { | function include_footer() { |
global $start; | global $start; |
$end = (float) array_sum(explode(' ', microtime())); | $end = (float) array_sum(explode(' ', microtime())); |
echo '</div> <footer> <small> Incorporates AusTender materials under a Creative Commons Attribution 3.0 Australia licence (CC BY 3.0 AU) https://creativecommons.org/licenses/by/3.0/au/ <br/> AusTender materials are released by the Department of Finance. <br/> AusTender materials are subject to change and should be verified on the AusTender website to ensure the information is up to date and correct: www.tenders.gov.au. <br/>' . "Processing time: " . sprintf("%.4f", ($end - $start)) . " seconds" . '</small> </footer>'; | echo '</div> <footer>' . "Processing time: " . sprintf("%.4f", ($end - $start)) . " seconds" . ' <footer>'; |
if (strpos($_SERVER['SERVER_NAME'], ".gs")) { | if (strpos($_SERVER['SERVER_NAME'], ".gs")) { |
?> | ?> |
<script type="text/javascript"> | <script type="text/javascript"> |
var _gaq = _gaq || []; | var _gaq = _gaq || []; |
_gaq.push(['_setAccount', 'UA-12341040-3']); | _gaq.push(['_setAccount', 'UA-12341040-3']); |
_gaq.push(['_trackPageview']); | _gaq.push(['_trackPageview']); |
(function() { | (function() { |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
})(); | })(); |
</script> | </script> |
<?php | <?php |
} | } |
echo '</div> </div></body> </html>'; | echo '</div> </div></body> </html>'; |
} | } |
include ("graphs.inc.php"); | include ("graphs.inc.php"); |
/* | /* |
* File: demo_table.css | * File: demo_table.css |
* CVS: $Id$ | * CVS: $Id$ |
* Description: CSS descriptions for DataTables demo pages | * Description: CSS descriptions for DataTables demo pages |
* Author: Allan Jardine | * Author: Allan Jardine |
* Created: Tue May 12 06:47:22 BST 2009 | * Created: Tue May 12 06:47:22 BST 2009 |
* Modified: $Date$ by $Author$ | * Modified: $Date$ by $Author$ |
* Language: CSS | * Language: CSS |
* Project: DataTables | * Project: DataTables |
* | * |
* Copyright 2009 Allan Jardine. All Rights Reserved. | * Copyright 2009 Allan Jardine. All Rights Reserved. |
* | * |
* *************************************************************************** | * *************************************************************************** |
* DESCRIPTION | * DESCRIPTION |
* | * |
* The styles given here are suitable for the demos that are used with the standard DataTables | * The styles given here are suitable for the demos that are used with the standard DataTables |
* distribution (see www.datatables.net). You will most likely wish to modify these styles to | * distribution (see www.datatables.net). You will most likely wish to modify these styles to |
* meet the layout requirements of your site. | * meet the layout requirements of your site. |
* | * |
* Common issues: | * Common issues: |
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is | * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is |
* no conflict between the two pagination types. If you want to use full_numbers pagination | * no conflict between the two pagination types. If you want to use full_numbers pagination |
* ensure that you either have "example_alt_pagination" as a body class name, or better yet, | * ensure that you either have "example_alt_pagination" as a body class name, or better yet, |
* modify that selector. | * modify that selector. |
* Note that the path used for Images is relative. All images are by default located in | * Note that the path used for Images is relative. All images are by default located in |
* ../images/ - relative to this CSS file. | * ../images/ - relative to this CSS file. |
*/ | */ |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables features | * DataTables features |
*/ | */ |
.dataTables_wrapper { | .dataTables_wrapper { |
position: relative; | position: relative; |
min-height: 302px; | /*min-height: 302px;*/ |
clear: both; | clear: both; |
_height: 302px; | /*_height: 302px;*/ |
zoom: 1; /* Feeling sorry for IE */ | zoom: 1; /* Feeling sorry for IE */ |
} | } |
.dataTables_processing { | .dataTables_processing { |
position: absolute; | position: absolute; |
top: 50%; | top: 50%; |
left: 50%; | left: 50%; |
width: 250px; | width: 250px; |
height: 30px; | height: 30px; |
margin-left: -125px; | margin-left: -125px; |
margin-top: -15px; | margin-top: -15px; |
padding: 14px 0 2px 0; | padding: 14px 0 2px 0; |
border: 1px solid #ddd; | border: 1px solid #ddd; |
text-align: center; | text-align: center; |
color: #999; | color: #999; |
font-size: 14px; | font-size: 14px; |
background-color: white; | background-color: white; |
} | } |
/*.dataTables_length {*/ | /*.dataTables_length {*/ |
/* width: 40%;*/ | /* width: 40%;*/ |
/* float: left;*/ | /* float: left;*/ |
/*}*/ | /*}*/ |
/**/ | /**/ |
/*.dataTables_filter {*/ | /*.dataTables_filter {*/ |
/* width: 50%;*/ | /* width: 50%;*/ |
/* float: right;*/ | /* float: right;*/ |
/* text-align: right;*/ | /* text-align: right;*/ |
/*}*/ | /*}*/ |
.dataTables_info { | .dataTables_info { |
width: 60%; | width: 60%; |
float: left; | float: left; |
} | } |
.dataTables_paginate { | .dataTables_paginate { |
width: 44px; | width: 44px; |
* width: 50px; | * width: 50px; |
float: right; | float: right; |
text-align: right; | text-align: right; |
} | } |
/* Pagination nested */ | /* Pagination nested */ |
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { | .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { |
height: 19px; | height: 19px; |
width: 19px; | width: 19px; |
margin-left: 3px; | margin-left: 3px; |
float: left; | float: left; |
} | } |
.paginate_disabled_previous { | .paginate_disabled_previous { |
background-image: url('../images/back_disabled.jpg'); | background-image: url('../images/back_disabled.jpg'); |
} | } |
.paginate_enabled_previous { | .paginate_enabled_previous { |
background-image: url('../images/back_enabled.jpg'); | background-image: url('../images/back_enabled.jpg'); |
} | } |
.paginate_disabled_next { | .paginate_disabled_next { |
background-image: url('../images/forward_disabled.jpg'); | background-image: url('../images/forward_disabled.jpg'); |
} | } |
.paginate_enabled_next { | .paginate_enabled_next { |
background-image: url('../images/forward_enabled.jpg'); | background-image: url('../images/forward_enabled.jpg'); |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables display | * DataTables display |
*/ | */ |
table.display { | table.display { |
margin: 0 auto; | margin: 0 auto; |
clear: both; | clear: both; |
width: 100%; | width: 100%; |
/* Note Firefox 3.5 and before have a bug with border-collapse | /* Note Firefox 3.5 and before have a bug with border-collapse |
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 ) | * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 ) |
* border-spacing: 0; is one possible option. Conditional-css.com is | * border-spacing: 0; is one possible option. Conditional-css.com is |
* useful for this kind of thing | * useful for this kind of thing |
* | * |
* Further note IE 6/7 has problems when calculating widths with border width. | * Further note IE 6/7 has problems when calculating widths with border width. |
* It subtracts one px relative to the other browsers from the first column, and | * It subtracts one px relative to the other browsers from the first column, and |
* adds one to the end... | * adds one to the end... |
* | * |
* If you want that effect I'd suggest setting a border-top/left on th/td's and | * If you want that effect I'd suggest setting a border-top/left on th/td's and |
* then filling in the gaps with other borders. | * then filling in the gaps with other borders. |
*/ | */ |
} | } |
table.display thead th { | table.display thead th { |
padding: 3px 18px 3px 10px; | padding: 3px 18px 3px 10px; |
border-bottom: 1px solid black; | border-bottom: 1px solid black; |
font-weight: bold; | font-weight: bold; |
cursor: pointer; | cursor: pointer; |
* cursor: hand; | * cursor: hand; |
} | } |
table.display tfoot th { | table.display tfoot th { |
padding: 3px 18px 3px 10px; | padding: 3px 18px 3px 10px; |
border-top: 1px solid black; | border-top: 1px solid black; |
font-weight: bold; | font-weight: bold; |
} | } |
table.display tr.heading2 td { | table.display tr.heading2 td { |
border-bottom: 1px solid #aaa; | border-bottom: 1px solid #aaa; |
} | } |
table.display td { | table.display td { |
padding: 3px 10px; | padding: 3px 10px; |
} | } |
table.display td.center { | table.display td.center { |
text-align: center; | text-align: center; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables sorting | * DataTables sorting |
*/ | */ |
.sorting_asc { | .sorting_asc { |
background: url('../images/sort_asc.png') no-repeat center right; | background: url('../images/sort_asc.png') no-repeat center right; |
} | } |
.sorting_desc { | .sorting_desc { |
background: url('../images/sort_desc.png') no-repeat center right; | background: url('../images/sort_desc.png') no-repeat center right; |
} | } |
.sorting { | .sorting { |
background: url('../images/sort_both.png') no-repeat center right; | background: url('../images/sort_both.png') no-repeat center right; |
} | } |
.sorting_asc_disabled { | .sorting_asc_disabled { |
background: url('../images/sort_asc_disabled.png') no-repeat center right; | background: url('../images/sort_asc_disabled.png') no-repeat center right; |
} | } |
.sorting_desc_disabled { | .sorting_desc_disabled { |
background: url('../images/sort_desc_disabled.png') no-repeat center right; | background: url('../images/sort_desc_disabled.png') no-repeat center right; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables row classes | * DataTables row classes |
*/ | */ |
table.display tr.odd.gradeA { | table.display tr.odd.gradeA { |
background-color: #ddffdd; | background-color: #ddffdd; |
} | } |
table.display tr.even.gradeA { | table.display tr.even.gradeA { |
background-color: #eeffee; | background-color: #eeffee; |
} | } |
table.display tr.odd.gradeC { | table.display tr.odd.gradeC { |
background-color: #ddddff; | background-color: #ddddff; |
} | } |
table.display tr.even.gradeC { | table.display tr.even.gradeC { |
background-color: #eeeeff; | background-color: #eeeeff; |
} | } |
table.display tr.odd.gradeX { | table.display tr.odd.gradeX { |
background-color: #ffdddd; | background-color: #ffdddd; |
} | } |
table.display tr.even.gradeX { | table.display tr.even.gradeX { |
background-color: #ffeeee; | background-color: #ffeeee; |
} | } |
table.display tr.odd.gradeU { | table.display tr.odd.gradeU { |
background-color: #ddd; | background-color: #ddd; |
} | } |
table.display tr.even.gradeU { | table.display tr.even.gradeU { |
background-color: #eee; | background-color: #eee; |
} | } |
tr.odd { | tr.odd { |
background-color: #E2E4FF; | background-color: #E2E4FF; |
} | } |
tr.even { | tr.even { |
background-color: white; | background-color: white; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* Misc | * Misc |
*/ | */ |
.dataTables_scroll { | .dataTables_scroll { |
clear: both; | clear: both; |
} | } |
.dataTables_scrollBody { | .dataTables_scrollBody { |
*margin-top: -1px; | *margin-top: -1px; |
} | } |
.top, .bottom { | .top, .bottom { |
padding: 15px; | padding: 15px; |
background-color: #F5F5F5; | background-color: #F5F5F5; |
border: 1px solid #CCCCCC; | border: 1px solid #CCCCCC; |
} | } |
.top .dataTables_info { | .top .dataTables_info { |
float: none; | float: none; |
} | } |
.clear { | .clear { |
clear: both; | clear: both; |
} | } |
.dataTables_empty { | .dataTables_empty { |
text-align: center; | text-align: center; |
} | } |
tfoot input { | tfoot input { |
margin: 0.5em 0; | margin: 0.5em 0; |
width: 100%; | width: 100%; |
color: #444; | color: #444; |
} | } |
tfoot input.search_init { | tfoot input.search_init { |
color: #999; | color: #999; |
} | } |
td.group { | td.group { |
background-color: #d1cfd0; | background-color: #d1cfd0; |
border-bottom: 2px solid #A19B9E; | border-bottom: 2px solid #A19B9E; |
border-top: 2px solid #A19B9E; | border-top: 2px solid #A19B9E; |
} | } |
td.details { | td.details { |
background-color: #d1cfd0; | background-color: #d1cfd0; |
border: 2px solid #A19B9E; | border: 2px solid #A19B9E; |
} | } |
.example_alt_pagination div.dataTables_info { | .example_alt_pagination div.dataTables_info { |
width: 40%; | width: 40%; |
} | } |
.paging_full_numbers { | .paging_full_numbers { |
width: 400px; | width: 400px; |
height: 22px; | height: 22px; |
line-height: 22px; | line-height: 22px; |
} | } |
.paging_full_numbers span.paginate_button, | .paging_full_numbers span.paginate_button, |
.paging_full_numbers span.paginate_active { | .paging_full_numbers span.paginate_active { |
border: 1px solid #aaa; | border: 1px solid #aaa; |
-webkit-border-radius: 5px; | -webkit-border-radius: 5px; |
-moz-border-radius: 5px; | -moz-border-radius: 5px; |
padding: 2px 5px; | padding: 2px 5px; |
margin: 0 3px; | margin: 0 3px; |
cursor: pointer; | cursor: pointer; |
*cursor: hand; | *cursor: hand; |
} | } |
.paging_full_numbers span.paginate_button { | .paging_full_numbers span.paginate_button { |
background-color: #ddd; | background-color: #ddd; |
} | } |
.paging_full_numbers span.paginate_button:hover { | .paging_full_numbers span.paginate_button:hover { |
background-color: #ccc; | background-color: #ccc; |
} | } |
.paging_full_numbers span.paginate_active { | .paging_full_numbers span.paginate_active { |
background-color: #99B3FF; | background-color: #99B3FF; |
} | } |
table.display tr.even.row_selected td { | table.display tr.even.row_selected td { |
background-color: #B0BED9; | background-color: #B0BED9; |
} | } |
table.display tr.odd.row_selected td { | table.display tr.odd.row_selected td { |
background-color: #9FAFD1; | background-color: #9FAFD1; |
} | } |
/* | /* |
* Sorting classes for columns | * Sorting classes for columns |
*/ | */ |
/* For the standard odd/even */ | /* For the standard odd/even */ |
tr.odd td.sorting_1 { | tr.odd td.sorting_1 { |
background-color: #D3D6FF; | background-color: #D3D6FF; |
} | } |
tr.odd td.sorting_2 { | tr.odd td.sorting_2 { |
background-color: #DADCFF; | background-color: #DADCFF; |
} | } |
tr.odd td.sorting_3 { | tr.odd td.sorting_3 { |
background-color: #E0E2FF; | background-color: #E0E2FF; |
} | } |
tr.even td.sorting_1 { | tr.even td.sorting_1 { |
background-color: #EAEBFF; | background-color: #EAEBFF; |
} | } |
tr.even td.sorting_2 { | tr.even td.sorting_2 { |
background-color: #F2F3FF; | background-color: #F2F3FF; |
} | } |
tr.even td.sorting_3 { | tr.even td.sorting_3 { |
background-color: #F9F9FF; | background-color: #F9F9FF; |
} | } |
/* For the Conditional-CSS grading rows */ | /* For the Conditional-CSS grading rows */ |
/* | /* |
Colour calculations (based off the main row colours) | Colour calculations (based off the main row colours) |
Level 1: | Level 1: |
dd > c4 | dd > c4 |
ee > d5 | ee > d5 |
Level 2: | Level 2: |
dd > d1 | dd > d1 |
ee > e2 | ee > e2 |
*/ | */ |
tr.odd.gradeA td.sorting_1 { | tr.odd.gradeA td.sorting_1 { |
background-color: #c4ffc4; | background-color: #c4ffc4; |
} | } |
tr.odd.gradeA td.sorting_2 { | tr.odd.gradeA td.sorting_2 { |
background-color: #d1ffd1; | background-color: #d1ffd1; |
} | } |
tr.odd.gradeA td.sorting_3 { | tr.odd.gradeA td.sorting_3 { |
background-color: #d1ffd1; | background-color: #d1ffd1; |
} | } |
tr.even.gradeA td.sorting_1 { | tr.even.gradeA td.sorting_1 { |
background-color: #d5ffd5; | background-color: #d5ffd5; |
} | } |
tr.even.gradeA td.sorting_2 { | tr.even.gradeA td.sorting_2 { |
background-color: #e2ffe2; | background-color: #e2ffe2; |
} | } |
tr.even.gradeA td.sorting_3 { | tr.even.gradeA td.sorting_3 { |
background-color: #e2ffe2; | background-color: #e2ffe2; |
} | } |
tr.odd.gradeC td.sorting_1 { | tr.odd.gradeC td.sorting_1 { |
background-color: #c4c4ff; | background-color: #c4c4ff; |
} | } |
tr.odd.gradeC td.sorting_2 { | tr.odd.gradeC td.sorting_2 { |
background-color: #d1d1ff; | background-color: #d1d1ff; |
} | } |
tr.odd.gradeC td.sorting_3 { | tr.odd.gradeC td.sorting_3 { |
background-color: #d1d1ff; | background-color: #d1d1ff; |
} | } |
tr.even.gradeC td.sorting_1 { | tr.even.gradeC td.sorting_1 { |
background-color: #d5d5ff; | background-color: #d5d5ff; |
} | } |
tr.even.gradeC td.sorting_2 { | tr.even.gradeC td.sorting_2 { |
background-color: #e2e2ff; | background-color: #e2e2ff; |
} | } |
tr.even.gradeC td.sorting_3 { | tr.even.gradeC td.sorting_3 { |
background-color: #e2e2ff; | background-color: #e2e2ff; |
} | } |
tr.odd.gradeX td.sorting_1 { | tr.odd.gradeX td.sorting_1 { |
background-color: #ffc4c4; | background-color: #ffc4c4; |
} | } |
tr.odd.gradeX td.sorting_2 { | tr.odd.gradeX td.sorting_2 { |
background-color: #ffd1d1; | background-color: #ffd1d1; |
} | } |
tr.odd.gradeX td.sorting_3 { | tr.odd.gradeX td.sorting_3 { |
background-color: #ffd1d1; | background-color: #ffd1d1; |
} | } |
tr.even.gradeX td.sorting_1 { | tr.even.gradeX td.sorting_1 { |
background-color: #ffd5d5; | background-color: #ffd5d5; |
} | } |
tr.even.gradeX td.sorting_2 { | tr.even.gradeX td.sorting_2 { |
background-color: #ffe2e2; | background-color: #ffe2e2; |
} | } |
tr.even.gradeX td.sorting_3 { | tr.even.gradeX td.sorting_3 { |
background-color: #ffe2e2; | background-color: #ffe2e2; |
} | } |
tr.odd.gradeU td.sorting_1 { | tr.odd.gradeU td.sorting_1 { |
background-color: #c4c4c4; | background-color: #c4c4c4; |
} | } |
tr.odd.gradeU td.sorting_2 { | tr.odd.gradeU td.sorting_2 { |
background-color: #d1d1d1; | background-color: #d1d1d1; |
} | } |
tr.odd.gradeU td.sorting_3 { | tr.odd.gradeU td.sorting_3 { |
background-color: #d1d1d1; | background-color: #d1d1d1; |
} | } |
tr.even.gradeU td.sorting_1 { | tr.even.gradeU td.sorting_1 { |
background-color: #d5d5d5; | background-color: #d5d5d5; |
} | } |
tr.even.gradeU td.sorting_2 { | tr.even.gradeU td.sorting_2 { |
background-color: #e2e2e2; | background-color: #e2e2e2; |
} | } |
tr.even.gradeU td.sorting_3 { | tr.even.gradeU td.sorting_3 { |
background-color: #e2e2e2; | background-color: #e2e2e2; |
} | } |
/* | /* |
* Row highlighting example | * Row highlighting example |
*/ | */ |
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { | .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { |
background-color: #ECFFB3; | background-color: #ECFFB3; |
} | } |
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { | .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { |
background-color: #E6FF99; | background-color: #E6FF99; |
} | } |
.ex_highlight_row #example tr.even:hover { | .ex_highlight_row #example tr.even:hover { |
background-color: #ECFFB3; | background-color: #ECFFB3; |
} | } |
.ex_highlight_row #example tr.even:hover td.sorting_1 { | .ex_highlight_row #example tr.even:hover td.sorting_1 { |
background-color: #DDFF75; | background-color: #DDFF75; |
} | } |
.ex_highlight_row #example tr.even:hover td.sorting_2 { | .ex_highlight_row #example tr.even:hover td.sorting_2 { |
background-color: #E7FF9E; | background-color: #E7FF9E; |
} | } |
.ex_highlight_row #example tr.even:hover td.sorting_3 { | .ex_highlight_row #example tr.even:hover td.sorting_3 { |
background-color: #E2FF89; | background-color: #E2FF89; |
} | } |
.ex_highlight_row #example tr.odd:hover { | .ex_highlight_row #example tr.odd:hover { |
background-color: #E6FF99; | background-color: #E6FF99; |
} | } |
.ex_highlight_row #example tr.odd:hover td.sorting_1 { | .ex_highlight_row #example tr.odd:hover td.sorting_1 { |
background-color: #D6FF5C; | background-color: #D6FF5C; |
} | } |
.ex_highlight_row #example tr.odd:hover td.sorting_2 { | .ex_highlight_row #example tr.odd:hover td.sorting_2 { |
background-color: #E0FF84; | background-color: #E0FF84; |
} | } |
.ex_highlight_row #example tr.odd:hover td.sorting_3 { | .ex_highlight_row #example tr.odd:hover td.sorting_3 { |
background-color: #DBFF70; | background-color: #DBFF70; |
} | } |
/* | /* |
* KeyTable | * KeyTable |
*/ | */ |
table.KeyTable td { | table.KeyTable td { |
border: 3px solid transparent; | border: 3px solid transparent; |
} | } |
table.KeyTable td.focus { | table.KeyTable td.focus { |
border: 3px solid #3366FF; | border: 3px solid #3366FF; |
} | } |
table.display tr.gradeA { | table.display tr.gradeA { |
background-color: #eeffee; | background-color: #eeffee; |
} | } |
table.display tr.gradeC { | table.display tr.gradeC { |
background-color: #ddddff; | background-color: #ddddff; |
} | } |
table.display tr.gradeX { | table.display tr.gradeX { |
background-color: #ffdddd; | background-color: #ffdddd; |
} | } |
table.display tr.gradeU { | table.display tr.gradeU { |
background-color: #ddd; | background-color: #ddd; |
} | } |
div.box { | div.box { |
height: 100px; | height: 100px; |
padding: 10px; | padding: 10px; |
overflow: auto; | overflow: auto; |
border: 1px solid #8080FF; | border: 1px solid #8080FF; |
background-color: #E5E5FF; | background-color: #E5E5FF; |
} | } |
/* | /* |
* File: demo_table_jui.css | * File: demo_table_jui.css |
* CVS: $Id$ | * CVS: $Id$ |
* Description: CSS descriptions for DataTables demo pages | * Description: CSS descriptions for DataTables demo pages |
* Author: Allan Jardine | * Author: Allan Jardine |
* Created: Tue May 12 06:47:22 BST 2009 | * Created: Tue May 12 06:47:22 BST 2009 |
* Modified: $Date$ by $Author$ | * Modified: $Date$ by $Author$ |
* Language: CSS | * Language: CSS |
* Project: DataTables | * Project: DataTables |
* | * |
* Copyright 2009 Allan Jardine. All Rights Reserved. | * Copyright 2009 Allan Jardine. All Rights Reserved. |
* | * |
* *************************************************************************** | * *************************************************************************** |
* DESCRIPTION | * DESCRIPTION |
* | * |
* The styles given here are suitable for the demos that are used with the standard DataTables | * The styles given here are suitable for the demos that are used with the standard DataTables |
* distribution (see www.datatables.net). You will most likely wish to modify these styles to | * distribution (see www.datatables.net). You will most likely wish to modify these styles to |
* meet the layout requirements of your site. | * meet the layout requirements of your site. |
* | * |
* Common issues: | * Common issues: |
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is | * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is |
* no conflict between the two pagination types. If you want to use full_numbers pagination | * no conflict between the two pagination types. If you want to use full_numbers pagination |
* ensure that you either have "example_alt_pagination" as a body class name, or better yet, | * ensure that you either have "example_alt_pagination" as a body class name, or better yet, |
* modify that selector. | * modify that selector. |
* Note that the path used for Images is relative. All images are by default located in | * Note that the path used for Images is relative. All images are by default located in |
* ../images/ - relative to this CSS file. | * ../images/ - relative to this CSS file. |
*/ | */ |
/* | /* |
* jQuery UI specific styling | * jQuery UI specific styling |
*/ | */ |
.paging_two_button .ui-button { | .paging_two_button .ui-button { |
float: left; | float: left; |
cursor: pointer; | cursor: pointer; |
* cursor: hand; | * cursor: hand; |
} | } |
.paging_full_numbers .ui-button { | .paging_full_numbers .ui-button { |
padding: 2px 6px; | padding: 2px 6px; |
margin: 0; | margin: 0; |
cursor: pointer; | cursor: pointer; |
* cursor: hand; | * cursor: hand; |
} | } |
.ui-buttonset .ui-button { | .ui-buttonset .ui-button { |
margin-right: -0.1em !important; | margin-right: -0.1em !important; |
} | } |
.paging_full_numbers { | .paging_full_numbers { |
width: 350px !important; | width: 350px !important; |
} | } |
.ui-toolbar { | .ui-toolbar { |
padding: 5px; | padding: 5px; |
} | } |
.dataTables_paginate { | .dataTables_paginate { |
width: auto; | width: auto; |
} | } |
.dataTables_info { | .dataTables_info { |
padding-top: 3px; | padding-top: 3px; |
} | } |
table.display thead th { | table.display thead th { |
padding: 3px 0px 3px 10px; | padding: 3px 0px 3px 10px; |
cursor: pointer; | cursor: pointer; |
* cursor: hand; | * cursor: hand; |
} | } |
/* | /* |
* Sort arrow icon positioning | * Sort arrow icon positioning |
*/ | */ |
table.display thead th div.DataTables_sort_wrapper { | table.display thead th div.DataTables_sort_wrapper { |
position: relative; | position: relative; |
padding-right: 20px; | padding-right: 20px; |
padding-right: 20px; | padding-right: 20px; |
} | } |
table.display thead th div.DataTables_sort_wrapper span { | table.display thead th div.DataTables_sort_wrapper span { |
position: absolute; | position: absolute; |
top: 50%; | top: 50%; |
margin-top: -8px; | margin-top: -8px; |
right: 0; | right: 0; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* | * |
* Everything below this line is the same as demo_table.css. This file is | * Everything below this line is the same as demo_table.css. This file is |
* required for 'cleanliness' of the markup | * required for 'cleanliness' of the markup |
* | * |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables features | * DataTables features |
*/ | */ |
.dataTables_wrapper { | .dataTables_wrapper { |
position: relative; | position: relative; |
min-height: 302px; | /*min-height: 302px; |
_height: 302px; | _height: 302px;*/ |
clear: both; | clear: both; |
} | } |
.dataTables_processing { | .dataTables_processing { |
position: absolute; | position: absolute; |
top: 0px; | top: 0px; |
left: 50%; | left: 50%; |
width: 250px; | width: 250px; |
margin-left: -125px; | margin-left: -125px; |
border: 1px solid #ddd; | border: 1px solid #ddd; |
text-align: center; | text-align: center; |
color: #999; | color: #999; |
font-size: 11px; | font-size: 11px; |
padding: 2px 0; | padding: 2px 0; |
} | } |
.dataTables_length { | .dataTables_length { |
width: 40%; | width: 40%; |
float: left; | float: left; |
} | } |
.dataTables_filter { | .dataTables_filter { |
width: 50%; | width: 50%; |
float: right; | float: right; |
text-align: right; | text-align: right; |
} | } |
.dataTables_info { | .dataTables_info { |
width: 50%; | width: 50%; |
float: left; | float: left; |
} | } |
.dataTables_paginate { | .dataTables_paginate { |
float: right; | float: right; |
text-align: right; | text-align: right; |
} | } |
/* Pagination nested */ | /* Pagination nested */ |
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { | .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { |
height: 19px; | height: 19px; |
width: 19px; | width: 19px; |
margin-left: 3px; | margin-left: 3px; |
float: left; | float: left; |
} | } |
.paginate_disabled_previous { | .paginate_disabled_previous { |
background-image: url('../images/back_disabled.jpg'); | background-image: url('../images/back_disabled.jpg'); |
} | } |
.paginate_enabled_previous { | .paginate_enabled_previous { |
background-image: url('../images/back_enabled.jpg'); | background-image: url('../images/back_enabled.jpg'); |
} | } |
.paginate_disabled_next { | .paginate_disabled_next { |
background-image: url('../images/forward_disabled.jpg'); | background-image: url('../images/forward_disabled.jpg'); |
} | } |
.paginate_enabled_next { | .paginate_enabled_next { |
background-image: url('../images/forward_enabled.jpg'); | background-image: url('../images/forward_enabled.jpg'); |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables display | * DataTables display |
*/ | */ |
table.display { | table.display { |
margin: 0 auto; | margin: 0 auto; |
width: 100%; | width: 100%; |
clear: both; | clear: both; |
border-collapse: collapse; | border-collapse: collapse; |
} | } |
table.display tfoot th { | table.display tfoot th { |
padding: 3px 0px 3px 10px; | padding: 3px 0px 3px 10px; |
font-weight: bold; | font-weight: bold; |
font-weight: normal; | font-weight: normal; |
} | } |
table.display tr.heading2 td { | table.display tr.heading2 td { |
border-bottom: 1px solid #aaa; | border-bottom: 1px solid #aaa; |
} | } |
table.display td { | table.display td { |
padding: 3px 10px; | padding: 3px 10px; |
} | } |
table.display td.center { | table.display td.center { |
text-align: center; | text-align: center; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables sorting | * DataTables sorting |
*/ | */ |
.sorting_asc { | .sorting_asc { |
background: url('../images/sort_asc.jpg') no-repeat center right; | background: url('../images/sort_asc.jpg') no-repeat center right; |
} | } |
.sorting_desc { | .sorting_desc { |
background: url('../images/sort_desc.jpg') no-repeat center right; | background: url('../images/sort_desc.jpg') no-repeat center right; |
} | } |
.sorting { | .sorting { |
background: url('../images/sort_both.jpg') no-repeat center right; | background: url('../images/sort_both.jpg') no-repeat center right; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* DataTables row classes | * DataTables row classes |
*/ | */ |
table.display tr.odd.gradeA { | table.display tr.odd.gradeA { |
background-color: #ddffdd; | background-color: #ddffdd; |
} | } |
table.display tr.even.gradeA { | table.display tr.even.gradeA { |
background-color: #eeffee; | background-color: #eeffee; |
} | } |
table.display tr.odd.gradeA { | table.display tr.odd.gradeA { |
background-color: #ddffdd; | background-color: #ddffdd; |
} | } |
table.display tr.even.gradeA { | table.display tr.even.gradeA { |
background-color: #eeffee; | background-color: #eeffee; |
} | } |
table.display tr.odd.gradeC { | table.display tr.odd.gradeC { |
background-color: #ddddff; | background-color: #ddddff; |
} | } |
table.display tr.even.gradeC { | table.display tr.even.gradeC { |
background-color: #eeeeff; | background-color: #eeeeff; |
} | } |
table.display tr.odd.gradeX { | table.display tr.odd.gradeX { |
background-color: #ffdddd; | background-color: #ffdddd; |
} | } |
table.display tr.even.gradeX { | table.display tr.even.gradeX { |
background-color: #ffeeee; | background-color: #ffeeee; |
} | } |
table.display tr.odd.gradeU { | table.display tr.odd.gradeU { |
background-color: #ddd; | background-color: #ddd; |
} | } |
table.display tr.even.gradeU { | table.display tr.even.gradeU { |
background-color: #eee; | background-color: #eee; |
} | } |
tr.odd { | tr.odd { |
background-color: #E2E4FF; | background-color: #E2E4FF; |
} | } |
tr.even { | tr.even { |
background-color: white; | background-color: white; |
} | } |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* Misc | * Misc |
*/ | */ |
.dataTables_scroll { | .dataTables_scroll { |
clear: both; | clear: both; |
} | } |
.top, .bottom { | .top, .bottom { |
padding: 15px; | padding: 15px; |
background-color: #F5F5F5; | background-color: #F5F5F5; |
border: 1px solid #CCCCCC; | border: 1px solid #CCCCCC; |
} | } |
.top .dataTables_info { | .top .dataTables_info { |
float: none; | float: none; |
} | } |
.clear { | .clear { |
clear: both; | clear: both; |
} | } |
.dataTables_empty { | .dataTables_empty { |
text-align: center; | text-align: center; |
} | } |
tfoot input { | tfoot input { |
margin: 0.5em 0; | margin: 0.5em 0; |
width: 100%; | width: 100%; |
color: #444; | color: #444; |
} | } |
tfoot input.search_init { | tfoot input.search_init { |
color: #999; | color: #999; |
} | } |
td.group { | td.group { |
background-color: #d1cfd0; | background-color: #d1cfd0; |
border-bottom: 2px solid #A19B9E; | border-bottom: 2px solid #A19B9E; |
border-top: 2px solid #A19B9E; | border-top: 2px solid #A19B9E; |
} | } |
td.details { | td.details { |
background-color: #d1cfd0; | background-color: #d1cfd0; |
border: 2px solid #A19B9E; | border: 2px solid #A19B9E; |
} | } |
.example_alt_pagination div.dataTables_info { | .example_alt_pagination div.dataTables_info { |
width: 40%; | width: 40%; |
} | } |
.paging_full_numbers span.paginate_button, | .paging_full_numbers span.paginate_button, |
.paging_full_numbers span.paginate_active { | .paging_full_numbers span.paginate_active { |
border: 1px solid #aaa; | border: 1px solid #aaa; |
-webkit-border-radius: 5px; | -webkit-border-radius: 5px; |
-moz-border-radius: 5px; | -moz-border-radius: 5px; |
padding: 2px 5px; | padding: 2px 5px; |
margin: 0 3px; | margin: 0 3px; |
cursor: pointer; | cursor: pointer; |
*cursor: hand; | *cursor: hand; |
} | } |
.paging_full_numbers span.paginate_button { | .paging_full_numbers span.paginate_button { |
background-color: #ddd; | background-color: #ddd; |
} | } |
.paging_full_numbers span.paginate_button:hover { | .paging_full_numbers span.paginate_button:hover { |
background-color: #ccc; | background-color: #ccc; |
} | } |
.paging_full_numbers span.paginate_active { | .paging_full_numbers span.paginate_active { |
background-color: #99B3FF; | background-color: #99B3FF; |
} | } |
table.display tr.even.row_selected td { | table.display tr.even.row_selected td { |
background-color: #B0BED9; | background-color: #B0BED9; |
} | } |
table.display tr.odd.row_selected td { | table.display tr.odd.row_selected td { |
background-color: #9FAFD1; | background-color: #9FAFD1; |
} | } |
/* | /* |
* Sorting classes for columns | * Sorting classes for columns |
*/ | */ |
/* For the standard odd/even */ | /* For the standard odd/even */ |
tr.odd td.sorting_1 { | tr.odd td.sorting_1 { |
background-color: #D3D6FF; | background-color: #D3D6FF; |
} | } |
tr.odd td.sorting_2 { | tr.odd td.sorting_2 { |
background-color: #DADCFF; | background-color: #DADCFF; |
} | } |
tr.odd td.sorting_3 { | tr.odd td.sorting_3 { |
background-color: #E0E2FF; | background-color: #E0E2FF; |
} | } |
tr.even td.sorting_1 { | tr.even td.sorting_1 { |
background-color: #EAEBFF; | background-color: #EAEBFF; |
} | } |
tr.even td.sorting_2 { | tr.even td.sorting_2 { |
background-color: #F2F3FF; | background-color: #F2F3FF; |
} | } |
tr.even td.sorting_3 { | tr.even td.sorting_3 { |
background-color: #F9F9FF; | background-color: #F9F9FF; |
} | } |
/* For the Conditional-CSS grading rows */ | /* For the Conditional-CSS grading rows */ |
/* | /* |
Colour calculations (based off the main row colours) | Colour calculations (based off the main row colours) |
Level 1: | Level 1: |
dd > c4 | dd > c4 |
ee > d5 | ee > d5 |
Level 2: | Level 2: |
dd > d1 | dd > d1 |
ee > e2 | ee > e2 |
*/ | */ |
tr.odd.gradeA td.sorting_1 { | tr.odd.gradeA td.sorting_1 { |
background-color: #c4ffc4; | background-color: #c4ffc4; |
} | } |
tr.odd.gradeA td.sorting_2 { | tr.odd.gradeA td.sorting_2 { |
background-color: #d1ffd1; | background-color: #d1ffd1; |
} | } |
tr.odd.gradeA td.sorting_3 { | tr.odd.gradeA td.sorting_3 { |
background-color: #d1ffd1; | background-color: #d1ffd1; |
} | } |
tr.even.gradeA td.sorting_1 { | tr.even.gradeA td.sorting_1 { |
background-color: #d5ffd5; | background-color: #d5ffd5; |
} | } |
tr.even.gradeA td.sorting_2 { | tr.even.gradeA td.sorting_2 { |
background-color: #e2ffe2; | background-color: #e2ffe2; |
} | } |
tr.even.gradeA td.sorting_3 { | tr.even.gradeA td.sorting_3 { |
background-color: #e2ffe2; | background-color: #e2ffe2; |
} | } |
tr.odd.gradeC td.sorting_1 { | tr.odd.gradeC td.sorting_1 { |
background-color: #c4c4ff; | background-color: #c4c4ff; |
} | } |
tr.odd.gradeC td.sorting_2 { | tr.odd.gradeC td.sorting_2 { |
background-color: #d1d1ff; | background-color: #d1d1ff; |
} | } |
tr.odd.gradeC td.sorting_3 { | tr.odd.gradeC td.sorting_3 { |
background-color: #d1d1ff; | background-color: #d1d1ff; |
} | } |
tr.even.gradeC td.sorting_1 { | tr.even.gradeC td.sorting_1 { |
background-color: #d5d5ff; | background-color: #d5d5ff; |
} | } |
tr.even.gradeC td.sorting_2 { | tr.even.gradeC td.sorting_2 { |
background-color: #e2e2ff; | background-color: #e2e2ff; |
} | } |
tr.even.gradeC td.sorting_3 { | tr.even.gradeC td.sorting_3 { |
background-color: #e2e2ff; | background-color: #e2e2ff; |
} | } |
tr.odd.gradeX td.sorting_1 { | tr.odd.gradeX td.sorting_1 { |
background-color: #ffc4c4; | background-color: #ffc4c4; |
} | } |
tr.odd.gradeX td.sorting_2 { | tr.odd.gradeX td.sorting_2 { |
background-color: #ffd1d1; | background-color: #ffd1d1; |
} | } |
tr.odd.gradeX td.sorting_3 { | tr.odd.gradeX td.sorting_3 { |
background-color: #ffd1d1; | background-color: #ffd1d1; |
} | } |
tr.even.gradeX td.sorting_1 { | tr.even.gradeX td.sorting_1 { |
background-color: #ffd5d5; | background-color: #ffd5d5; |
} | } |
tr.even.gradeX td.sorting_2 { | tr.even.gradeX td.sorting_2 { |
background-color: #ffe2e2; | background-color: #ffe2e2; |
} | } |
tr.even.gradeX td.sorting_3 { | tr.even.gradeX td.sorting_3 { |
background-color: #ffe2e2; | background-color: #ffe2e2; |
} | } |
tr.odd.gradeU td.sorting_1 { | tr.odd.gradeU td.sorting_1 { |
background-color: #c4c4c4; | background-color: #c4c4c4; |
} | } |
tr.odd.gradeU td.sorting_2 { | tr.odd.gradeU td.sorting_2 { |
background-color: #d1d1d1; | background-color: #d1d1d1; |
} | } |
tr.odd.gradeU td.sorting_3 { | tr.odd.gradeU td.sorting_3 { |
background-color: #d1d1d1; | background-color: #d1d1d1; |
} | } |
tr.even.gradeU td.sorting_1 { | tr.even.gradeU td.sorting_1 { |
background-color: #d5d5d5; | background-color: #d5d5d5; |
} | } |
tr.even.gradeU td.sorting_2 { | tr.even.gradeU td.sorting_2 { |
background-color: #e2e2e2; | background-color: #e2e2e2; |
} | } |
tr.even.gradeU td.sorting_3 { | tr.even.gradeU td.sorting_3 { |
background-color: #e2e2e2; | background-color: #e2e2e2; |
} | } |
/* | /* |
* Row highlighting example | * Row highlighting example |
*/ | */ |
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { | .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { |
background-color: #ECFFB3; | background-color: #ECFFB3; |
} | } |
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { | .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { |
background-color: #E6FF99; | background-color: #E6FF99; |
} | } |