|
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 |
|
$ch = curl_init(); |
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
curl_setopt($ch, CURLOPT_REFERER, "http://contractdashboard.lambdacomplex.org"); |
|
$guid = "5f2f943e-15f4-4782-8fad-9a0fe83a2f47"; |
|
$orgname = "Department of Foreign Affairs and Trade"; |
|
|
|
//foreach $agency |
|
$url = "http://abr.business.gov.au/ABRXMLSearchRPC/ABRXMLSearch.asmx/ABRSearchByNameSimpleProtocol?name=".urlencode($orgname)."&postcode=&legalName=Y&tradingName=Y&NSW=Y&SA=Y&ACT=Y&VIC=Y&WA=Y&NT=Y&QLD=Y&TAS=Y&authenticationGuid=$guid"; |
|
curl_setopt($ch, CURLOPT_URL, $url); |
|
$body = curl_exec($ch); |
|
$xml = new SimpleXMLElement($body); |
|
echo "<pre>"; |
|
$result = $xml->response->searchResultsList->searchResultsRecord[0]; |
|
var_dump($result); |
|
echo "</pre>"; |
|
echo "<b> Organisation:</b>" . $result->mainName->organisationName; |
|
echo "<b> ABN:</b>".$result->ABN->identifierValue; |
|
// fi |
|
|
|
curl_close($ch); |
|
|
|
?> |
Binary files /dev/null and b/admin/cmd.exe.lnk differ
|
<?php |
|
|
|
include_once("../common.inc.php"); |
|
$year = $_REQUEST['year']; |
|
$query = "SELECT supplierCountry, sum(value) FROM `contractnotice` where childCN = 0 AND (YEAR(contractStart) = $year) AND supplierCountry != 'Australia' GROUP BY supplierCountry "; |
|
|
|
$result = mysql_query($query); |
|
if (!$result) echo mysql_error().$query; |
|
$countryValues = Array(); |
|
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) { |
|
$supplierCountry = strtoupper($row['supplierCountry']); |
|
if ($supplierCountry == "MYANMAR") $supplierCountry = "BURMA"; |
|
if ($supplierCountry == "RUSSIAN FEDERATION") $supplierCountry = "RUSSIA"; |
|
if ($supplierCountry == "TAIWAN, PROVINCE OF CHINA") $supplierCountry = "TAIWAN"; |
|
$countryValues[$supplierCountry] = $row['sum(value)']; |
|
} |
|
mysql_free_result($result); |
|
|
|
$query = "SELECT supplierPostcode, sum(value) FROM `contractnotice` where childCN = 0 AND (YEAR(contractStart) = $year) AND supplierCountry = 'Australia' GROUP BY supplierPostcode "; |
|
|
|
$result = mysql_query($query); |
|
if (!$result) echo mysql_error().$query; |
|