Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 480 Bytes
<?php
/**
* Viewing a summary of statistics by month
* @author Daniel15 <daniel at dan.cx>
*/
require __DIR__ . '/includes/core.php';
// Querystring parameters
$year = !empty($_GET['year']) ? (int) $_GET['year'] : date('Y');
$month = !empty($_GET['month']) ? (int) $_GET['month'] : date('m');
$start_date = mktime(0, 0, 0, $month, 1, $year);
$data = Data_Summary::month($start_date);
View::factory('month')
->set('date', $start_date)
->set('data', $data)
->render();
?>