- Timestamp:
- 05/20/09 17:06:57 (15 years ago)
- Location:
- trunk/phpgwapi/templates
- Files:
-
- 4 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/templates/default/head.inc.php
r2 r882 1 1 <?php 2 3 4 5 6 7 8 9 10 2 /**************************************************************************\ 3 * phpGroupWare * 4 * http://www.phpgroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 11 12 12 13 $bodyheader = 'BGCOLOR="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'"'; 14 if($GLOBALS['phpgw_info']['server']['htmlcompliant']) 13 if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) 15 14 { 16 $bodyheader .= ' ALINK="'.$GLOBALS['phpgw_info']['theme']['alink'].'" LINK="'.$GLOBALS['phpgw_info']['theme']['link'].'" VLINK="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"'; 15 $mtime = microtime(); 16 $mtime = explode(' ',$mtime); 17 $mtime = $mtime[1] + $mtime[0]; 18 $GLOBALS['page_start_time'] = $mtime; 17 19 } 18 20 21 // get used language code 22 $lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; 23 24 $bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="' 25 . $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="' 26 . $GLOBALS['phpgw_info']['theme']['vlink'] . '"'; 27 28 if(!$GLOBALS['phpgw_info']['server']['htmlcompliant']) 29 { 30 $bodyheader .= ''; 31 } 32 $currentapp = $GLOBALS['phpgw_info']['flags']['currentapp'] ; 33 34 #_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']); 35 $theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; 36 if(!file_exists($theme_css)) 37 { 38 $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; 39 } 40 41 //pngfix defaults to yes 42 if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix']) 43 { 44 $pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/pngfix.js'; 45 $pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 46 <!--[if lt IE 7]> 47 <script src="'.$pngfix_src.'" type="text/javascript"> 48 </script> 49 <![endif]-->'; 50 } 51 52 if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects']) 53 { 54 $slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/slidereffects.js'; 55 $slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript"> 56 </script>'; 57 } 58 else 59 { 60 $simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/simple_show_hide.js'; 61 $simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript"> 62 </script>'; 63 } 64 65 $cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/cookieManager.js" type="text/javascript"></script>'; 19 66 $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 20 67 $tpl->set_unknowns('remove'); … … 22 69 $tpl->set_block('_head','head'); 23 70 24 if ($GLOBALS['phpgw_info']['flags']['app_header']) 25 { 26 $app = $GLOBALS['phpgw_info']['flags']['app_header']; 27 } 28 else 29 { 30 $app = $GLOBALS['phpgw_info']['flags']['currentapp']; 31 $app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app); 32 } 33 $var = Array ( 34 'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico', 35 'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico', 71 $app = $GLOBALS['phpgw_info']['flags']['currentapp']; 72 $app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':''; 73 74 $var = Array( 75 'img_icon' => '/'.$currentapp . '/templates/'.$_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set'].'/images/navbar.png', 76 'img_shortcut' => '/'.$currentapp . '/templates/'.$_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set'].'/images/navbar.png', 77 'pngfix' => $pngfix, 78 'slider_effects'=> $slider_effects, 79 'simple_show_hide'=> $simple_show_hide, 80 'lang_code'=> $lang_code, 36 81 'charset' => $GLOBALS['phpgw']->translation->charset(), 37 82 'font_family' => $GLOBALS['phpgw_info']['theme']['font'], 38 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),83 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app, 39 84 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), 85 'theme_css' => $theme_css, 40 86 'css' => $GLOBALS['phpgw']->common->get_css(), 41 87 'java_script' => $GLOBALS['phpgw']->common->get_java_script(), 88 'cookie_manager'=> $cookie_manager 42 89 ); 43 90 $tpl->set_var($var);
Note: See TracChangeset
for help on using the changeset viewer.