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 | $bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="' |
---|
14 | . $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="' |
---|
15 | . $GLOBALS['phpgw_info']['theme']['vlink'] . '"'; |
---|
16 | |
---|
17 | if (! $GLOBALS['phpgw_info']['server']['htmlcompliant']) |
---|
18 | { |
---|
19 | $bodyheader .= ''; |
---|
20 | } |
---|
21 | |
---|
22 | $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/literati/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; |
---|
23 | if (!file_exists($theme_css)) |
---|
24 | { |
---|
25 | $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/literati/css/golden.css'; |
---|
26 | } |
---|
27 | $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); |
---|
28 | $tpl->set_unknowns('remove'); |
---|
29 | $tpl->set_file(array('head' => 'head.tpl')); |
---|
30 | |
---|
31 | if ($GLOBALS['phpgw_info']['flags']['app_header']) |
---|
32 | { |
---|
33 | $app = $GLOBALS['phpgw_info']['flags']['app_header']; |
---|
34 | } |
---|
35 | else |
---|
36 | { |
---|
37 | $app = $GLOBALS['phpgw_info']['flags']['currentapp']; |
---|
38 | $app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app); |
---|
39 | } |
---|
40 | $var = Array ( |
---|
41 | 'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico', |
---|
42 | 'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico', |
---|
43 | 'charset' => $GLOBALS['phpgw']->translation->charset(), |
---|
44 | 'font_family' => $GLOBALS['phpgw_info']['theme']['font'], |
---|
45 | 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''), |
---|
46 | 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), |
---|
47 | 'theme_css' => $theme_css, |
---|
48 | 'css' => $GLOBALS['phpgw']->common->get_css(), |
---|
49 | 'java_script' => $GLOBALS['phpgw']->common->get_java_script(), |
---|
50 | ); |
---|
51 | $tpl->set_var($var); |
---|
52 | $tpl->pfp('out','head'); |
---|
53 | unset($tpl); |
---|
54 | ?> |
---|