templates/header.tpl: basic flash messaging, basic capability for info and error messages; needs css styling

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@103 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 17 years ago
parent 53df296722
commit cb66e25ba4

@ -38,3 +38,23 @@ if (($CONF['show_header_text'] == "YES") and ($CONF['header_text']))
}
?>
</div>
<?php
if(isset($_SESSION['flash'])) {
if(isset($_SESSION['flash']['info'])) {
echo '<ul class="flash-info">';
foreach($_SESSION['flash']['info'] as $msg) {
echo "<li>$msg</li>";
}
echo '</ul>';
}
if(isset($_SESSION['flash']['error'])) {
echo '<ul class="flash-error">';
foreach($_SESSION['flash']['error'] as $msg) {
echo "<li>$msg</li>";
}
echo '</ul>';
}
/* nuke it from orbit. It's the only way to be sure. */
$_SESSION['flash'] = array();
}

Loading…
Cancel
Save