aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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