--- 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 @@
@@ -309,7 +310,7 @@ global $start; $end = (float) array_sum(explode(' ', microtime())); - echo '
'; + echo '