Changeset 2623 for trunk/phpgwapi/inc/class.common.inc.php
- Timestamp:
- 04/23/10 10:41:56 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.common.inc.php
r2616 r2623 399 399 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'cookieManager', 'phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] ); 400 400 401 $this -> phpgw_header( );401 $this -> phpgw_header( $module_content ); 402 402 } 403 403 else 404 { 404 405 echo $this -> get_java_script( ); 405 406 echo $module_content;406 echo $module_content; 407 } 407 408 408 409 /*if (is_object($GLOBALS['phpgw']->accounts)) … … 1207 1208 if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'preferences' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'about') 1208 1209 { 1209 $app = $app_title = ' eGroupWare';1210 $app = $app_title = ':: ExpressoLivre ::'; 1210 1211 } 1211 1212 else … … 1250 1251 @abstract load the phpgw header 1251 1252 */ 1252 function phpgw_header( )1253 function phpgw_header( $content ) 1253 1254 { 1254 1255 // add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv) 1255 header( 'Content-type: text/html; charset='.$GLOBALS['phpgw']->translation->charset());1256 header( "Content-type: text/html; charset={$GLOBALS[ 'phpgw' ] -> translation -> charset( )}" ); 1256 1257 1257 1258 $path = PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']; 1258 1259 1259 include_once( "{$path}/head.inc.php" );1260 1261 1260 $this -> navbar( false ); 1262 1261 1263 1262 include_once( "{$path}/navbar.inc.php" ); 1264 1263 1265 if (!@$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target']) 1266 echo parse_navbar(); 1264 if ( ! @$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target']) 1265 { 1266 parse_navbar( ); 1267 $content = ob_get_contents( ) . $content; 1268 ob_clean( ); 1269 1270 parse_navbar_end( ); 1271 $content .= ob_get_contents( ) . "\t"; 1272 ob_clean( ); 1273 } 1274 1275 require_once "{$path}/head.inc.php"; 1267 1276 } 1268 1277 1269 1278 function phpgw_footer() 1270 1279 { 1271 if (!defined('PHPGW_FOOTER')) 1272 { 1273 define('PHPGW_FOOTER',True); 1274 if (!isset($GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter']) 1275 { 1276 include(PHPGW_API_INC . '/footer.inc.php'); 1277 } 1280 if ( ! defined( 'PHPGW_FOOTER' ) ) 1281 { 1282 define( 'PHPGW_FOOTER', true ); 1283 if ( ! isset( $GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter'] ) 1284 include_once PHPGW_API_INC . '/footer.inc.php'; 1278 1285 } 1279 1286 } … … 1294 1301 $tpl->set_var($GLOBALS['phpgw_info']['theme']); 1295 1302 $app_css = ''; 1303 1296 1304 if(@isset($_GET['menuaction'])) 1297 1305 { … … 1303 1311 } 1304 1312 } 1305 if (isset($GLOBALS['phpgw_info']['flags']['css'])) 1306 {1313 1314 if ( isset( $GLOBALS['phpgw_info']['flags']['css'] ) ) 1307 1315 $app_css .= $GLOBALS['phpgw_info']['flags']['css']; 1308 } 1309 $tpl->set_var( 'app_css', $app_css);1316 1317 $tpl->set_var( 'app_css', $app_css ); 1310 1318 1311 1319 // search for app specific css file … … 1318 1326 $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css ); 1319 1327 1320 $link = '< LINK href="%s" type="text/css" rel="StyleSheet">';1321 $link = sprintf( $link,1328 $link = '<link href="%s" type="text/css" rel="StyleSheet" />'; 1329 $link = "\n\t\t" . sprintf( $link, 1322 1330 "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}" 1323 1331 ); … … 1347 1355 } 1348 1356 1349 return $tpl -> subst( 'css');1357 return $tpl -> subst( 'css' ); 1350 1358 } 1351 1359 … … 1362 1370 function get_java_script( ) 1363 1371 { 1364 $java_script = '';1372 $java_script = "\t\t"; 1365 1373 1366 1374 /* this flag is for all javascript code that has to be put before other jscode.
Note: See TracChangeset
for help on using the changeset viewer.