aboutsummaryrefslogtreecommitdiff
path: root/views/default/graphs/data/timestats.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:42:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:42:50 -0300
commit36102a094de700ee339f6eaeffb8ab16ba4f2f3b (patch)
tree57676a64905ae0e112cc5d698a5f61b36a88c5b3 /views/default/graphs/data/timestats.php
downloadelgg-36102a094de700ee339f6eaeffb8ab16ba4f2f3b.tar.gz
elgg-36102a094de700ee339f6eaeffb8ab16ba4f2f3b.tar.bz2
Squashed 'mod/graphstats/' content from commit b5d0461
git-subtree-dir: mod/graphstats git-subtree-split: b5d046138c5841d55b4497618d5678cb8027c245
Diffstat (limited to 'views/default/graphs/data/timestats.php')
-rw-r--r--views/default/graphs/data/timestats.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/views/default/graphs/data/timestats.php b/views/default/graphs/data/timestats.php
new file mode 100644
index 000000000..6179301a9
--- /dev/null
+++ b/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>