- Timestamp:
- Jun 22, 2006, 11:28:54 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r1377 r1380 112 112 $user = array(); 113 113 $lang = array(); 114 114 $warnings = array(); 115 115 116 116 @include(PHPWG_ROOT_PATH .'include/mysql.inc.php'); … … 148 148 if (count(array_diff($existing, $applied)) > 0) 149 149 { 150 ob_start();// buffer output so that cookies work 151 152 echo 153 '<p>' 154 .'Some database upgrades are missing, ' 155 .'<a href="'.PHPWG_ROOT_PATH.'upgrade_feed.php">upgrade now</a>' 156 .'</p>' 157 ; 150 $warnings[] = 'Some database upgrades are missing, ' 151 .'<a href="'.PHPWG_ROOT_PATH.'upgrade_feed.php">upgrade now</a>'; 158 152 } 159 153 } … … 177 171 if ($conf['gallery_locked']) 178 172 { 179 ob_start(); // make sure we can send cookies 180 echo 181 '<div style="text-align:center;">' 182 .$lang['gallery_locked_message']; 183 echo '<a href="'.PHPWG_ROOT_PATH.'identification.php">.</a>'; 184 echo '</div>'; 173 $warnings[] = $lang['gallery_locked_message'] 174 . '<a href="'.PHPWG_ROOT_PATH.'identification.php">.</a>'; 185 175 186 176 if ( basename($_SERVER["PHP_SELF"]) != 'identification.php' … … 219 209 if (is_adviser()) 220 210 { 221 ob_start();// buffer output so that cookies work 222 echo ' 223 <div class="titrePage"> 224 <h2> 225 <div style="text-align:center;">'.$lang['adviser_mode_enabled'].' 226 </div> 227 </h2> 228 </div> 229 '; 211 $warnings[] = $lang['adviser_mode_enabled']; 230 212 } 231 213 232 214 // template instance 233 215 $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']); 216 217 if (count($warnings) > 0) 218 { 219 $template->assign_block_vars('warnings',array()); 220 foreach ($warnings as $warning) 221 { 222 $template->assign_block_vars('warnings.warning', array('WARNING'=>$warning)); 223 } 224 } 234 225 ?> -
trunk/template/yoga/header.tpl
r1377 r1380 31 31 <body id="{BODY_ID}"> 32 32 <div id="the_page"> 33 34 33 {PAGE_BANNER} 34 <!-- BEGIN warnings --> 35 <div class="infos"> 36 <ul> 37 <!-- BEGIN warning --> 38 <li>{warnings.warning.WARNING}</li> 39 <!-- END warning --> 40 </ul> 41 </div> 42 <!-- END warnings -->
Note: See TracChangeset
for help on using the changeset viewer.