--- a/displayCalendar.php +++ b/displayCalendar.php @@ -2,11 +2,17 @@ include_once("./lib/common.inc.php"); -include_header("Months and Years"); + if ($_REQUEST['month']) { - echo "<center><h1>" . $_REQUEST['month'] . "</h1></center>"; - $monthParts = explode("-", $_REQUEST['month']); + $monthParts = explode("-", str_replace(Array("'","/","\\",'-'), "",$_REQUEST['month'])); + $year = $monthParts[1]; + $month = $monthParts[0]; + $monthName = date("F Y", mktime(0,0,0,$month,1,$year)); + + include_header($monthName); + echo "<center><h1>" . $monthName . "</h1></center>"; + $query = 'SELECT "CNID", "description", "value", "agencyName", "category", "contractStart", "supplierName" FROM contractnotice WHERE "childCN" is null @@ -52,7 +58,7 @@ Year/Month drilldown - largest contracts, agencies, suppliers count per month big picture graphs? */ - +include_header("Months and Years"); ContractStartingGraph(); ContractPublishedGraph(); @@ -75,7 +81,7 @@ setlocale(LC_MONETARY, 'en_US'); $value = number_format(doubleval($row["val"]), 2); $month_name = date('F', mktime(0, 0, 0, $row[1])); - echo ("<tr><td><b><a href=\"?month=$row[1]-$row[0]\">$month_name {$row[0]}</a></b></td><td>\$$value</td><td>({$row['count']} contracts)</td></tr>"); + echo ('<tr><td><b><a href="?month=$row[1]-$row[0]">'.$month_name.' '.$row[0].'</a></b></td><td>$'.$value.'</td><td>(' .$row['count'].' contracts)</td></tr>'); } echo "</table>"; }