aboutsummaryrefslogtreecommitdiffstats
path: root/admin/intro.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-08-17 14:25:38 +0000
committerplegall <plg@piwigo.org>2005-08-17 14:25:38 +0000
commit20f05416971676e5433da86f3f924d4efe2f92df (patch)
tree406375600205f9e264694da57de66a0f14ea1acd /admin/intro.php
parentde22732f93fad45f94d8c95fdca4cdf6a870327d (diff)
- modification : major simplification of admin.php. Titles are managed by
included page, localized items are managed directly in the template. - new : sub template admin/double_select is included in templates admin/cat_options, admin/user_perm and admin/group_perm. I haven't been able to use it in admin/picture_modify because it seems impossible to have two instance of the same sub-template without interfering. - modification : bug 99, in profile manager, no auto submit when changing language (useless and generate accessibility problem). - improvement : HTML semantically correct for administration menu, simpler syntax, less tags, correct tags (dl/dt/dd instead of div/div). - modification : number of waiting elements and unvalidated comments are displayed in admin/intro instead of administration menu (with a link to the dedicated pages). - deletion : no link to profile from admin/user_list anymore (no need). git-svn-id: http://piwigo.org/svn/trunk@817 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/intro.php')
-rw-r--r--admin/intro.php40
1 files changed, 39 insertions, 1 deletions
diff --git a/admin/intro.php b/admin/intro.php
index 25369e832..450f39902 100644
--- a/admin/intro.php
+++ b/admin/intro.php
@@ -192,7 +192,45 @@ $template->assign_vars(
add_session_id(PHPWG_ROOT_PATH.'admin.php?action=phpinfo')
)
);
-
+
+// waiting elements
+$query = '
+SELECT COUNT(*)
+ FROM '.WAITING_TABLE.'
+ WHERE validated=\'false\'
+;';
+list($nb_waiting) = mysql_fetch_row(pwg_query($query));
+
+if ($nb_waiting > 0)
+{
+ $template->assign_block_vars(
+ 'waiting',
+ array(
+ 'URL' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=waiting'),
+ 'INFO' => sprintf(l10n('%d waiting for validation'), $nb_waiting)
+ )
+ );
+}
+
+// unvalidated comments
+$query = '
+SELECT COUNT(*)
+ FROM '.COMMENTS_TABLE.'
+ WHERE validated=\'false\'
+;';
+list($nb_comments) = mysql_fetch_row(pwg_query($query));
+
+if ($nb_comments > 0)
+{
+ $template->assign_block_vars(
+ 'unvalidated',
+ array(
+ 'URL' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=comments'),
+ 'INFO' => sprintf(l10n('%d waiting for validation'), $nb_comments)
+ )
+ );
+}
+
// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+