aboutsummaryrefslogtreecommitdiff
path: root/mod/graphstats/pages/graphstats/timestats.php
blob: 6516e145d406553c314b2c9067b44ebd9964d332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
 * Site time stats.
 *
 * @package ElggGraphStats
 */

elgg_load_library('elgg:graphs:timestats');

$title = elgg_echo('graphstats:timestats');

elgg_push_breadcrumb($title);
	
$type = get_input('type', 'user');
$subtype = get_input('subtype', '');
$filter = get_input('filter', 'absolute');
$type_subtype = $type . ($subtype?":$subtype":"");

$table = elgg_view('graphs/data/timestats', array(
	'type' => $type,
	'subtype' => $subtype,
	'relative' => ($filter == 'relative'),
));

$content = elgg_view('graphs/timestats', array('table' => $table));

$filter = elgg_view('graphstats/timestats_filter_menu', array('selected' => $relative));

timestats_setup_sidebar_menu();

$body = elgg_view_layout('content', array(
	'content' => $content,
	'title' => $title,
	'filter' => $filter,
));

echo elgg_view_page($title, $body);