Fix more graphs
[contractdashboard.git] / displayCalendar.php
blob:a/displayCalendar.php -> blob:b/displayCalendar.php
--- 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']);

+    $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,10 +58,10 @@
       Year/Month drilldown - largest contracts, agencies, suppliers

       count per month

       big picture graphs? */

+include_header("Months and Years");

 

-

-    echo '<img src="graphs/displayContractStartingGraph.php">';

-    echo '<img src="graphs/displayContractPublishedGraph.php">';

+    ContractStartingGraph();

+    ContractPublishedGraph();

 

 

     $query = 'SELECT extract(year from "contractStart"), extract(month from "contractStart"),