add amendments metric
--- a/about.php
+++ b/about.php
@@ -1,6 +1,55 @@
+<?php
+
+
+include('./lib/common.inc.php');
+include_header("Map");
+?>
+
+<div class="msg_list">
+<p class="msg_head">Header-1 </p>
+<div class="msg_body">
+orem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet, consectetuer adipiscing elit
+</div>
+<p class="msg_head">Header-2</p>
+<div class="msg_body">
+orem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet, consectetuer adipiscing elit
+</div>
+<p class="msg_head">Header-3</p>
+<div class="msg_body">
+orem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet, consectetuer adipiscing elit
+</div>
+</div>
+
sourced from austender
Government Agency Information (2009-07-10): National Archives of Australia, http://www.naa.gov.au under Creative Commons - Attribution 2.5 Australia (CC-BY)
jpgraph for php
ABR
Redhat Liberation fonts
-
+
+
+<?php
+include_once("./lib/common.inc.php");
+$query = "SELECT DATE(importDate) as importday, count(*) as count, min(publishDate) as start, max(publishDate) as end
+FROM `contractnotice` WHERE childCN = 0 AND parentCN = 0 AND DATE(importDate) in (select * from (SELECT DATE(importDate)
+FROM `contractnotice` ORDER BY `importDate` DESC limit 1) alias)";
+$result = mysql_query($query);
+echo "<div>";
+$stats = mysql_fetch_array($result, MYSQL_BOTH);
+echo $stats["count"] . " new records in period " . $stats["start"] . " to " . $stats["end"] ."<br>";
+
+
+$query = "SELECT DATE(importDate) as importday, count(*) as count, min(publishDate) as start, max(publishDate) as end
+FROM `contractnotice` WHERE (childCN != 0 OR parentCN != 0) AND DATE(importDate) in (select * from (SELECT DATE(importDate)
+FROM `contractnotice` ORDER BY `importDate` DESC limit 1) alias)";
+$result = mysql_query($query);
+echo "<div>";
+$stats = mysql_fetch_array($result, MYSQL_BOTH);
+echo $stats["count"] . " updated records in period " . $stats["start"] . " to " . $stats["end"] ."<br>";
+
+
+echo "Last updated: ". $stats["importday"]."<br>";
+/* Check for null Procurement method and 0 ABN when not ABN exempt */
+
+
+include_footer();
+?>
--- a/admin/updateUNSPSC.php
+++ b/admin/updateUNSPSC.php
@@ -1,11 +1,7 @@
<?php
error_reporting(E_ALL);
-$link = mysql_connect('localhost', 'team7', 'wlUsnD2xu9');
-if (!$link) {
- die('Could not connect: ' . mysql_error());
-}
-@mysql_select_db("team7") or die("Unable to select database");
+include_once("../lib/common.inc.php");
$unspscresult = mysql_query ("select * from UNSPSCcategories;");
while ($row = mysql_fetch_assoc($unspscresult)) {
--- /dev/null
+++ b/autosuggest_inquisitor.css
@@ -1,1 +1,177 @@
+/*
+================================================
+autosuggest, inquisitor style
+================================================
+*/
+body
+{
+ position: relative;
+}
+
+
+div.autosuggest
+{
+ position: absolute;
+ background-image: url(images/img_inquisitor/as_pointer.gif);
+ background-position: top;
+ background-repeat: no-repeat;
+ padding: 10px 0 0 0;
+}
+
+div.autosuggest div.as_header,
+div.autosuggest div.as_footer
+{
+ position: relative;
+ height: 6px;
+ padding: 0 6px;
+ background-image: url(images/img_inquisitor/ul_corner_tr.gif);
+ background-position: top right;
+ background-repeat: no-repeat;
+ overflow: hidden;
+}
+div.autosuggest div.as_footer
+{
+ background-image: url(images/img_inquisitor/ul_corner_br.gif);
+}
+
+div.autosuggest div.as_header div.as_corner,
+div.autosuggest div.as_footer div.as_corner
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 6px;
+ width: 6px;
+ background-image: url(images/img_inquisitor/ul_corner_tl.gif);
+ background-position: top left;
+ background-repeat: no-repeat;
+}
+div.autosuggest div.as_footer div.as_corner
+{
+ background-image: url(images/img_inquisitor/ul_corner_bl.gif);
+}
+div.autosuggest div.as_header div.as_bar,
+div.autosuggest div.as_footer div.as_bar
+{
+ height: 6px;
+ overflow: hidden;
+ background-color: #333;
+}
+
+
+div.autosuggest ul
+{
+ list-style: none;
+ margin: 0 0 -4px 0;
+ padding: 0;
+ overflow: hidden;
+ background-color: #333;
+}
+
+div.autosuggest ul li
+{
+ color: #ccc;
+ padding: 0;
+ margin: 0 4px 4px;
+ text-align: left;
+}
+
+div.autosuggest ul li a
+{
+ color: #ccc;
+ display: block;
+ text-decoration: none;
+ background-color: transparent;
+ text-shadow: #000 0px 0px 5px;
+ position: relative;
+ padding: 0;
+ width: 100%;
+}
+div.autosuggest ul li a:hover
+{
+ background-color: #444;
+}
+div.autosuggest ul li.as_highlight a:hover
+{
+ background-color: #1B5CCD;
+}
+
+div.autosuggest ul li a span
+{
+ display: block;
+ padding: 3px 6px;
+ font-weight: bold;
+}
+
+div.autosuggest ul li a span small
+{
+ font-weight: normal;
+ color: #999;
+}
+
+div.autosuggest ul li.as_highlight a span small
+{
+ color: #ccc;
+}
+
+div.autosuggest ul li.as_highlight a
+{
+ color: #fff;
+ background-color: #1B5CCD;
+ background-image: url(images/img_inquisitor/hl_corner_br.gif);
+ background-position: bottom right;
+ background-repeat: no-repeat;
+}
+
+div.autosuggest ul li.as_highlight a span
+{
+ background-image: url(images/img_inquisitor/hl_corner_bl.gif);
+ background-position: bottom left;
+ background-repeat: no-repeat;
+}
+
+div.autosuggest ul li a .tl,
+div.autosuggest ul li a .tr
+{
+ background-image: transparent;
+ background-repeat: no-repeat;
+ width: 6px;
+ height: 6px;
+ position: absolute;
+ top: 0;
+ padding: 0;
+ margin: 0;
+}
+div.autosuggest ul li a .tr
+{
+ right: 0;
+}
+
+div.autosuggest ul li.as_highlight a .tl
+{
+ left: 0;
+ background-image: url(images/img_inquisitor/hl_corner_tl.gif);
+ background-position: bottom left;
+}
+
+div.autosuggest ul li.as_highlight a .tr
+{
+ right: 0;
+ background-image: url(images/img_inquisitor/hl_corner_tr.gif);
+ background-position: bottom right;
+}
+
+
+
+div.autosuggest ul li.as_warning
+{
+ font-weight: bold;
+ text-align: center;
+}
+
+div.autosuggest ul em
+{
+ font-style: normal;
+ color: #6EADE7;
+}
--- a/cutenews/data/auto_archive.db.php
+++ b/cutenews/data/auto_archive.db.php
--- a/cutenews/data/cat.num.php
+++ b/cutenews/data/cat.num.php
--- a/cutenews/data/category.db.php
+++ b/cutenews/data/category.db.php
--- a/cutenews/data/config.php
+++ b/cutenews/data/config.php
--- a/cutenews/data/flood.db.php
+++ b/cutenews/data/flood.db.php
--- a/cutenews/data/ipban.db.php
+++ b/cutenews/data/ipban.db.php
--- a/cutenews/data/rss_config.php
+++ b/cutenews/data/rss_config.php
--- a/cutenews/data/users.db.php
+++ b/cutenews/data/users.db.php
--- a/cutenews/example1.php
+++ b/cutenews/example1.php
--- a/cutenews/example2.php
+++ b/cutenews/example2.php
--- a/cutenews/inc/functions.inc.php
+++ b/cutenews/inc/functions.inc.php
--- a/cutenews/inc/shows.inc.php
+++ b/cutenews/inc/shows.inc.php
--- a/cutenews/index.php
+++ b/cutenews/index.php
--- a/cutenews/register.php
+++ b/cutenews/register.php
--- a/cutenews/rss.php
+++ b/cutenews/rss.php
--- a/cutenews/search.php
+++ b/cutenews/search.php
--- a/cutenews/show_archives.php
+++ b/cutenews/show_archives.php
--- a/cutenews/show_news.php
+++ b/cutenews/show_news.php
--- a/cutenews/skins/compact.skin.php
+++ b/cutenews/skins/compact.skin.php
--- a/cutenews/skins/default.skin.php
+++ b/cutenews/skins/default.skin.php
--- a/cutenews/skins/simple.skin.php
+++ b/cutenews/skins/simple.skin.php
--- a/displayAgency.php
+++ b/displayAgency.php
@@ -19,11 +19,14 @@
--- info
website, procurement plan, annual reports
+ Breakdown of divisions/branches
Breakdown percentage,number,value by procurement type
Histograph, overlaying number value reported per week over X years
Compliance statistics: amendments, delay in reporting average and number completely late*/
} else {
-
+ /*
+ split by portfolio
+ */
include_header("Agencies");
$query = "SELECT SUM(value), agencyName
FROM `contractnotice`
--- /dev/null
+++ b/displayAmendments.php
@@ -1,1 +1,20 @@
+<?php
+include_once ("./lib/common.inc.php");
+ include_header("Amendments");
+$query = "select CNID, description, value, pvalue, (value - pvalue) as diff from contractnotice, (SELECT CNID as cn, childCN as ccn, value as pvalue FROM contractnotice where childCN > 0) a where CNID = ccn order by diff DESC";
+$result = mysql_query($query);
+echo "<table>";
+while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
+ setlocale(LC_MONETARY, 'en_US');
+ $value = number_format(doubleval($row['value']) , 2);
+ $pvalue = number_format(doubleval($row['pvalue']) , 2);
+ $diff = number_format(doubleval($row['diff']) , 2);
+ echo ("<tr>");
+ echo "<td><A href=\"displayContract.php?CNID={$row['CNID']}\"><b>{$row['description']}</b></a></td>";
+ echo "<td>\$$pvalue</td><td>\$$value</td><td>\$$diff</td></tr>";
+}
+echo "</table>";
+mysql_free_result($result);
+include_footer();
+?>
--- a/displayCalendar.php
+++ b/displayCalendar.php
@@ -1,12 +1,38 @@
<?php
include_once("./lib/common.inc.php");
+include_header("Months and Years");
+
+if ($_REQUEST['category']) {
+ echo "<center><h1>".$_REQUEST['category']."</h1></center>";
+ $query = "SELECT CNID, description, value, agencyName, category, contractStart, supplierName
+ FROM `contractnotice`
+ WHERE childCN = 0
+ AND category = '" . $_REQUEST['category'] . "'
+ ORDER BY value DESC";
+ $result = mysql_query($query);
+ echo "<table>";
+ while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
+ setlocale(LC_MONETARY, 'en_US');
+ $value = number_format(doubleval($row['value']) , 2);
+ echo ("<tr>
+ <td><a href=\"displayContract.php?CNID={$row['CNID']}\">{$row['CNID']}</a></td>
+ <td><b>{$row['description']}</b></a></td>
+ <td>\$$value</td><td>{$row['agencyName']}</td>
+ <td>{$row['contractStart']}</td>
+ <td>{$row['supplierName']}</td>
+ </tr>");
+ }
+ echo "</table>";
+ mysql_free_result($result);
+} else {
/*
+ split by year
todo:
-Year/Month drilldown - largest contracts, agencies, suppliers*/
+Year/Month drilldown - largest contracts, agencies, suppliers
+big picture graphs?*/
-include_header("Months and Years");
$query = "SELECT YEAR(contractStart), MONTH(contractStart),
value FROM `contractnotice` WHERE childCN = 0 GROUP BY MONTH(contractStart), YEAR(contractStart) ORDER BY YEAR(contractStart), MONTH(contractStart) ";
@@ -20,6 +46,6 @@
}
echo "</table>";
mysql_free_result($result);
-
+}
include_footer();
?>
--- a/displayCategory.php
+++ b/displayCategory.php
@@ -24,7 +24,9 @@
echo "</table>";
mysql_free_result($result);
} else {
-
+ /*
+ split by main categories
+ */
include_header("Categories");
$query = "SELECT sum(value), category
FROM `contractnotice`
--- a/displayConfidentialities.php
+++ b/displayConfidentialities.php
@@ -1,4 +1,31 @@
-agencies that use alot of consultacies
+<?php
+
+include_once("./lib/common.inc.php");
+/*
+
+
+agencies that use alot of Confidentialities
suppliers that provide alot
how much is spent overall per year
+*/
+include_header("Confidentialities");
+$query = "SELECT value, procurementMethod
+FROM `contractnotice`
+GROUP BY procurementMethod ";
+
+$result = mysql_query($query);
+
+echo "<table>";
+while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
+setlocale(LC_MONETARY, 'en_US');
+$value = number_format(doubleval($row[0]),2);
+ echo ("<tr><td><b>{$row[1]}</b></td><td>\$$value</td></tr>");
+}
+echo "</table>";
+mysql_free_result($result);
+include_footer();
+?>
+
+
+
--- a/displayConsultancies.php
+++ b/displayConsultancies.php
@@ -1,4 +1,31 @@
+<?php
+
+include_once("./lib/common.inc.php");
+/*
+
+
agencies that use alot of consultacies
suppliers that provide alot
how much is spent overall per year
+*/
+include_header("Consultancies");
+$query = "SELECT value, procurementMethod
+FROM `contractnotice`
+GROUP BY procurementMethod ";
+
+$result = mysql_query($query);
+
+echo "<table>";
+while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
+setlocale(LC_MONETARY, 'en_US');
+$value = number_format(doubleval($row[0]),2);
+ echo ("<tr><td><b>{$row[1]}</b></td><td>\$$value</td></tr>");
+}
+echo "</table>";
+mysql_free_result($result);
+include_footer();
+?>
+
+
+
--- a/displayContract.php
+++ b/displayContract.php
--- a/displayLatestUpdate.php
+++ /dev/null
@@ -1,23 +1,1 @@
-<?php
-include_once("./lib/common.inc.php");
-$query = "SELECT DATE(importDate) as importday, count(*) as count, min(publishDate) as start, max(publishDate) as end
-FROM `contractnotice` WHERE childCN = 0 AND parentCN = 0 AND DATE(importDate) in (select * from (SELECT DATE(importDate)
-FROM `contractnotice` ORDER BY `importDate` DESC limit 1) alias)";
-$result = mysql_query($query);
-echo "<table>";
-$stats = mysql_fetch_array($result, MYSQL_BOTH);
-echo $stats["count"] . " new records in period " . $stats["start"] . " to " . $stats["end"] ."<br>";
-
-
-$query = "SELECT DATE(importDate) as importday, count(*) as count, min(publishDate) as start, max(publishDate) as end
-FROM `contractnotice` WHERE (childCN != 0 OR parentCN != 0) AND DATE(importDate) in (select * from (SELECT DATE(importDate)
-FROM `contractnotice` ORDER BY `importDate` DESC limit 1) alias)";
-$result = mysql_query($query);
-echo "<table>";
-$stats = mysql_fetch_array($result, MYSQL_BOTH);
-echo $stats["count"] . " updated records in period " . $stats["start"] . " to " . $stats["end"] ."<br>";
-
-
-echo "Last updated: ". $stats["importday"]."<br>";
-/* Check for null Procurement method and 0 ABN when not ABN exempt */
-?>
+
--- a/displayMap.php
+++ b/displayMap.php
--- a/displayProcurementMethod.php
+++ b/displayProcurementMethod.php
--- a/displaySupplier.php
+++ b/displaySupplier.php
@@ -9,7 +9,7 @@
echo '<img src="graphs/displayMethodValueGraph.php?supplier=' . stripslashes($supplier) . '">';
/*lobbyist ties
-
+ links to ABR/ASIC/Google News/ASX/Court records
total value to various agencies (bar graph)
@@ -19,7 +19,9 @@
spread of industries (textual?)*/
} else {
-
+ /*
+ histograph of supplier size/value
+ */
include_header("Suppliers");
$query = "SELECT SUM(value) as val, supplierName, supplierABN
FROM `contractnotice`
--- a/futureindex.php
+++ b/futureindex.php
--- a/graphs/displayAgenciesGraph.php
+++ b/graphs/displayAgenciesGraph.php
--- a/graphs/displayAgencySuppliersGraph.php
+++ b/graphs/displayAgencySuppliersGraph.php
--- a/graphs/displayCnCGraph.php
+++ b/graphs/displayCnCGraph.php