From d7ba4d77fe14adee382436238e40a28786791a91 Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 16 Aug 2006 04:30:35 +0000 Subject: added number of tags, image-tag associations and image-category association on the main admin page git-svn-id: http://piwigo.org/svn/trunk@1538 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/intro.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'admin/intro.php') diff --git a/admin/intro.php b/admin/intro.php index 9c6ffa088..d855bc870 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -55,7 +55,7 @@ if (isset($_GET['action']) and 'check_upgrade' == $_GET['action']) { $versions = array('current' => PHPWG_VERSION); $lines = @file('http://www.phpwebgallery.net/latest_version'); - + // if the current version is a BSF (development branch) build, we check // the first line, for stable versions, we check the second line if (preg_match('/^BSF/', $versions{'current'})) @@ -148,6 +148,24 @@ SELECT COUNT(*) ;'; list($nb_physical) = mysql_fetch_row(pwg_query($query)); +$query = ' +SELECT COUNT(*) + FROM '.IMAGE_CATEGORY_TABLE.' +;'; +list($nb_image_category) = mysql_fetch_row(pwg_query($query)); + +$query = ' +SELECT COUNT(*) + FROM '.TAGS_TABLE.' +;'; +list($nb_tags) = mysql_fetch_row(pwg_query($query)); + +$query = ' +SELECT COUNT(*) + FROM '.IMAGE_TAG_TABLE.' +;'; +list($nb_image_tag) = mysql_fetch_row(pwg_query($query)); + $query = ' SELECT COUNT(*) FROM '.USERS_TABLE.' @@ -180,6 +198,9 @@ $template->assign_vars( $nb_physical, $nb_virtual ), + 'DB_IMAGE_CATEGORY' =>sprintf(l10n('%d associations'), $nb_image_category), + 'DB_TAGS' => sprintf(l10n('%d tags'), $nb_tags), + 'DB_IMAGE_TAG' => sprintf(l10n('%d associations'), $nb_image_tag), 'DB_USERS' => sprintf(l10n('%d users'), $nb_users), 'DB_GROUPS' => sprintf(l10n('%d groups'), $nb_groups), 'DB_COMMENTS' => sprintf(l10n('%d comments'), $nb_comments), -- cgit v1.2.3