openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5240b6e6e61766d3d41f479988e344a8a8ebd8dd
parent 53a9daeebe72774abe375e94497e95c3efc4535e
Author: dankert <devnull@localhost>
Date:   Sat, 16 Apr 2005 23:33:13 +0200

Erweiterter Funktionsaufruf fuer Notizen/Meldungen

Diffstat:
actionClasses/Action.class.php | 10+++++++---
themes/default/pages/html/header.tpl.php | 20++++++--------------
2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/actionClasses/Action.class.php b/actionClasses/Action.class.php @@ -20,7 +20,10 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ -// Revision 1.16 2005-02-17 19:20:32 dankert +// Revision 1.17 2005-04-16 21:33:13 dankert +// Erweiterter Funktionsaufruf fuer Notizen/Meldungen +// +// Revision 1.16 2005/02/17 19:20:32 dankert // Beruecksichtigung von Konfiguration: interface-override_title // // Revision 1.15 2005/01/23 11:55:52 dankert @@ -151,14 +154,14 @@ class Action } - function addNotice( $type,$name,$text,$status='ok' ) + function addNotice( $type,$name,$text,$status='ok',$vars=array() ) { if ( !isset($this->templateVars['notices']) ) $this->templateVars['notices'] = array(); $this->templateVars['notices'][] = array('type'=>$type, 'name'=>$name, - 'text'=>lang('NOTICE_'.$text), + 'text'=>lang('NOTICE_'.$text,$vars), 'status'=>$status); } @@ -196,6 +199,7 @@ class Action global $conf; global $PHP_SELF; global $HTTP_SERVER_VARS; + global $image_dir; $tplFileName = $tplName.'.tpl.'.PHP_EXT; $conf_php = PHP_EXT; diff --git a/themes/default/pages/html/header.tpl.php b/themes/default/pages/html/header.tpl.php @@ -14,25 +14,17 @@ <?php if (isset($notices) && count($notices)>0 ) { ?> -<!-- $Id$ --> -<center> - -<table class="main" width="99%" cellspacing="0" cellpadding="4"> - - <tr> - <th colspan="3"><?php echo lang('GLOBAL_NOTICES') ?></th> - </tr> + + <?php windowOpen('GLOBAL_NOTICES',3) ?> <?php foreach( $notices as $notice ) { ?> <tr> - <td class="f1"><img src="<?php echo $image_dir.'icon_'.$notice['type'].IMG_EXT ?>" align="left" /><?php echo $notice['name'] ?></td> - <td class="f1"><img src="<?php echo $image_dir.'notice_'.$notice['status'].IMG_EXT ?>" align="left" /> - <strong><?php echo $notice['text'] ?></strong></td> + + <td><img src="<?php echo $image_dir.'notice_'.$notice['status'].IMG_EXT ?>" style="padding:10px" /></td> + <td class="f1"><?php if ($notice['name']!='') { ?><img src="<?php echo $image_dir.'icon_'.$notice['type'].IMG_EXT ?>" align="left" /><?php echo $notice['name'] ?>: <?php } ?><?php if ($notice['status']=='error') { ?><strong><?php } ?><?php echo $notice['text'] ?><?php if ($notice['status']=='error') { ?></strong><?php } ?></td> </tr> <?php } ?> -</table> - -</center> + <?php windowClose() ?> <?php } ?>