[727] | 1 | <?php |
---|
| 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 | |
---|
| 12 | |
---|
| 13 | if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) |
---|
| 14 | { |
---|
| 15 | $mtime = microtime(); |
---|
| 16 | $mtime = explode(' ',$mtime); |
---|
| 17 | $mtime = $mtime[1] + $mtime[0]; |
---|
| 18 | $GLOBALS['page_start_time'] = $mtime; |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | // get used language code |
---|
| 22 | $lang_code = 'en'; |
---|
| 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 | |
---|
| 33 | #_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']); |
---|
| 34 | $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; |
---|
| 35 | if(!file_exists($theme_css)) |
---|
| 36 | { |
---|
| 37 | $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | //pngfix defaults to yes |
---|
| 41 | if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix']) |
---|
| 42 | { |
---|
| 43 | $pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/pngfix.js'; |
---|
| 44 | $pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> |
---|
| 45 | <!--[if gte IE 5.5000]> |
---|
| 46 | <script src="'.$pngfix_src.'" type="text/javascript"> |
---|
| 47 | </script> |
---|
| 48 | <![endif]-->'; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects']) |
---|
| 52 | { |
---|
| 53 | $slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/slidereffects.js'; |
---|
| 54 | $slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript"> |
---|
| 55 | </script>'; |
---|
| 56 | } |
---|
| 57 | else |
---|
| 58 | { |
---|
| 59 | $simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/jerryr/js/simple_show_hide.js'; |
---|
| 60 | $simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript"> |
---|
| 61 | </script>'; |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | // 030204 ndee for calling foldertree |
---|
| 65 | |
---|
| 66 | $foldertree_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/js/foldertree/foldertree.js'; |
---|
| 67 | $js_foldertree = '<script src="'.$foldertree_src.'" type="text/javascript"></script>'; |
---|
| 68 | |
---|
| 69 | $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); |
---|
| 70 | $tpl->set_unknowns('remove'); |
---|
| 71 | $tpl->set_file(array('_head' => 'head.tpl')); |
---|
| 72 | $tpl->set_block('_head','head'); |
---|
| 73 | |
---|
| 74 | if ($GLOBALS['phpgw_info']['flags']['app_header']) |
---|
| 75 | { |
---|
| 76 | $app = $GLOBALS['phpgw_info']['flags']['app_header']; |
---|
| 77 | } |
---|
| 78 | else |
---|
| 79 | { |
---|
| 80 | $app = $GLOBALS['phpgw_info']['flags']['currentapp']; |
---|
| 81 | $app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app); |
---|
| 82 | } |
---|
| 83 | $var = Array( |
---|
| 84 | 'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico', |
---|
| 85 | 'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico', |
---|
| 86 | 'pngfix' => $pngfix, |
---|
| 87 | 'slider_effects'=> $slider_effects, |
---|
| 88 | 'simple_show_hide'=> $simple_show_hide, |
---|
| 89 | 'lang_code'=> $lang_code, |
---|
| 90 | 'charset' => $GLOBALS['phpgw']->translation->charset(), |
---|
| 91 | 'font_family' => $GLOBALS['phpgw_info']['theme']['font'], |
---|
| 92 | 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''), |
---|
| 93 | 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), |
---|
| 94 | 'theme_css' => $theme_css, |
---|
| 95 | 'css' => $GLOBALS['phpgw']->common->get_css(), |
---|
| 96 | 'java_script' => $GLOBALS['phpgw']->common->get_java_script(), |
---|
| 97 | 'js_foldertree' => $js_foldertree, |
---|
| 98 | ); |
---|
| 99 | $tpl->set_var($var); |
---|
| 100 | $tpl->pfp('out','head'); |
---|
| 101 | unset($tpl); |
---|
| 102 | ?> |
---|