SF.net SVN: postfixadmin: [103] trunk/templates/header.tpl
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-09-28 19:29:07
|
Revision: 103 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=103&view=rev Author: GingerDog Date: 2007-09-28 12:29:10 -0700 (Fri, 28 Sep 2007) Log Message: ----------- templates/header.tpl: basic flash messaging, basic capability for info and error messages; needs css styling Modified Paths: -------------- trunk/templates/header.tpl Modified: trunk/templates/header.tpl =================================================================== --- trunk/templates/header.tpl 2007-09-28 19:28:24 UTC (rev 102) +++ trunk/templates/header.tpl 2007-09-28 19:29:10 UTC (rev 103) @@ -38,3 +38,23 @@ } ?> </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(); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |