--- a/lib/common.inc.php +++ b/lib/common.inc.php @@ -14,6 +14,11 @@ if (strstr($_SERVER['PHP_SELF'], "labs/")) { $basePath = "../"; } +require $basePath."lib/amon-php/amon.php"; +Amon::config(array('address'=> 'http://127.0.0.1:2464', + 'protocol' => 'http', + 'secret_key' => "JBcSUdFOi5lK0vCjLjbHDpQamcBnRA4iV7QLaTADeDQ")); +Amon::setup_exception_handler(); require ROOT . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'openid.php'; $openid = new LightOpenID($_SERVER['HTTP_HOST']); @@ -49,6 +54,7 @@ function databaseError($errMsg) { if ($errMsg[2] != "") { echo '
'; + Amon::log(print_r($errMsg, true).print_r($_REQUEST, true).print_r($_SERVER, true), array('error')); die(print_r($errMsg, true)); echo "
"; } @@ -100,9 +106,9 @@ $startYear = 2007; $year = filter_var($_REQUEST['year'], FILTER_SANITIZE_NUMBER_INT); -if ($year != "") +if ($year != "") { $yearQ = "YEAR(publishDate) = " . $year . " AND "; - +} $standardQ = ' "childCN" is null '; // AND YEAR(contractStart) >= 2007 AND YEAR(contractStart) <= 2010'; $start = 0.0; @@ -113,9 +119,28 @@ function include_header($title) { global $start; ?> - - + + <?php echo $title; ?> - Contract Dashboard