--- a/lib/common.inc.php +++ b/lib/common.inc.php @@ -4,7 +4,7 @@ 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) { die("A database error occurred.\n"); @@ -14,7 +14,7 @@ if (strstr($_SERVER['PHP_SELF'], "labs/") || strstr($_SERVER['PHP_SELF'], "admin/") || strstr($_SERVER['PHP_SELF'], "heuristics/")) { $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/library/Solarium/Autoloader.php'); Solarium\Autoloader::register(); @@ -61,7 +61,7 @@ } else { login(); } -} +}*/ // $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); function databaseError($errMsg) { @@ -96,6 +96,7 @@ function array_sum_all($a) { if (!is_array($a)) return $a; + $totale = 0; foreach ($a as $key => $value) $totale += array_sum_all($value); return $totale; @@ -273,12 +274,12 @@ </div><!-- /topbar-wrapper --> <script type="text/javascript"> -/* var options_xml = { + var options_xml = { script: function (input) { return "search_autosuggest.php?input="+input; }, varname:"input", 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> <div class="container-fluid"> <div class="row-fluid"> @@ -309,7 +310,7 @@ global $start; $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")) { ?>