aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-07-17 01:35:46 +0000
committerCash Costello <cash.costello@gmail.com>2009-07-17 01:35:46 +0000
commitbbd3f9d8566a7050784d1adbbbbe84ab6521ec19 (patch)
treef4864cc05151098f55c0ab991552d8d9e16187a5 /views/default
parente013de96d9c734b4b4ce7bc26c928c2b82c4063a (diff)
downloadelgg-bbd3f9d8566a7050784d1adbbbbe84ab6521ec19.tar.gz
elgg-bbd3f9d8566a7050784d1adbbbbe84ab6521ec19.tar.bz2
simple stats
Diffstat (limited to 'views/default')
-rw-r--r--views/default/tidypics/stats.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/views/default/tidypics/stats.php b/views/default/tidypics/stats.php
index 8680ab052..ebaf9a061 100644
--- a/views/default/tidypics/stats.php
+++ b/views/default/tidypics/stats.php
@@ -1,3 +1,14 @@
<?php
- echo 'Stats go here';
+
+ $img_type = get_subtype_id('object', 'image');
+ $query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+ $total = get_data_row($query);
+ $num_images = $total->total;
+
+ $img_type = get_subtype_id('object', 'album');
+ $query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+ $total = get_data_row($query);
+ $num_albums = $total->total;
+
+ echo $num_images . " Photos in " . $num_albums . " Albums";
?> \ No newline at end of file