aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-06-11 14:10:04 +0000
committerplegall <plg@piwigo.org>2005-06-11 14:10:04 +0000
commite851f504acebc9422b79f58da25420666da6e296 (patch)
treef90d0104a9799caa29bcd47d0bd2c6edabcefe79 /admin.php
parent4fedaac43ac404dc50193d6032307697412bb2c9 (diff)
- errors and informations boxes : management centralized in admin.php,
$errors and $infos arrays replaced by $page['errors'] and $page['infos'], special management for admin/update.php (more complex management) git-svn-id: http://piwigo.org/svn/trunk@792 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/admin.php b/admin.php
index 60a6b25db..ade076020 100644
--- a/admin.php
+++ b/admin.php
@@ -265,6 +265,9 @@ $template->assign_vars(array(
//--------------------------------------------------------------------- summary
$link_start = PHPWG_ROOT_PATH.'admin.php?page=';
//------------------------------------------------------------- content display
+$page['errors'] = array();
+$page['infos'] = array();
+
if ($page_valide)
{
switch ($_GET['page'])
@@ -294,6 +297,26 @@ else
)
);
}
+// +-----------------------------------------------------------------------+
+// | errors & infos |
+// +-----------------------------------------------------------------------+
+if (count($page['errors']) != 0)
+{
+ $template->assign_block_vars('errors',array());
+ foreach ($page['errors'] as $error)
+ {
+ $template->assign_block_vars('errors.error',array('ERROR'=>$error));
+ }
+}
+if (count($page['infos']) != 0)
+{
+ $template->assign_block_vars('infos',array());
+ foreach ($page['infos'] as $info)
+ {
+ $template->assign_block_vars('infos.info',array('INFO'=>$info));
+ }
+}
+
$template->parse('admin');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
// +-----------------------------------------------------------------------+