aboutsummaryrefslogtreecommitdiff
path: root/views/default/graphs/data/timestats.php
blob: 6179301a93fbf22850961a062cd075cadd0b28f9 (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
<?php

$type = $vars['type'];
$subtype = $vars['subtype'];
$relative = $vars['relative'];

elgg_load_library('elgg:graphs:timestats');

$timestats = timestats($type, $subtype, $relative);

?>

<table style="position: absolute; left: -9999em; top: -9999em;" id="data">
	<tfoot>
		<tr>
		<?php
			foreach ($timestats as $time => $stat) {
				$date = date(elgg_echo('friendlytime:date_format'), $time);
				echo "<th>$date</th>\n";
			}		
		?>
		</tr>
	</tfoot>
	<tbody>
		<tr>
		<?php
			foreach ($timestats as $time => $stat) {
				echo "<td>$stat</td>\n";
			}
		?>
		</tr>
	</tbody>
</table>