aboutsummaryrefslogtreecommitdiff
path: root/mod/graphstats/views/default/graphs/data/timestats.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/graphstats/views/default/graphs/data/timestats.php')
-rw-r--r--mod/graphstats/views/default/graphs/data/timestats.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/mod/graphstats/views/default/graphs/data/timestats.php b/mod/graphstats/views/default/graphs/data/timestats.php
new file mode 100644
index 000000000..6179301a9
--- /dev/null
+++ b/mod/graphstats/views/default/graphs/data/timestats.php
@@ -0,0 +1,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>