diff options
author | plegall <plg@piwigo.org> | 2005-06-11 14:10:04 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-06-11 14:10:04 +0000 |
commit | e851f504acebc9422b79f58da25420666da6e296 (patch) | |
tree | f90d0104a9799caa29bcd47d0bd2c6edabcefe79 /admin.php | |
parent | 4fedaac43ac404dc50193d6032307697412bb2c9 (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.php | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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'); // +-----------------------------------------------------------------------+ |