2001-11-14 19:06:13 +01:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
$java_script = '';
|
2001-11-14 19:06:13 +01:00
|
|
|
if(@isset($GLOBALS['HTTP_GET_VARS']['menuaction']))
|
|
|
|
{
|
|
|
|
list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
|
2003-08-28 16:31:11 +02:00
|
|
|
if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['java_script'])
|
2001-11-14 19:06:13 +01:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
$java_script = $GLOBALS[$class]->java_script();
|
2001-11-14 19:06:13 +01:00
|
|
|
}
|
|
|
|
}
|
2003-08-28 16:31:11 +02:00
|
|
|
if (isset($GLOBALS['phpgw_info']['flags']['java_script']))
|
2001-11-14 19:06:13 +01:00
|
|
|
{
|
2003-08-28 16:31:11 +02:00
|
|
|
$java_script .= $GLOBALS['phpgw_info']['flags']['java_script'];
|
2001-11-14 19:06:13 +01:00
|
|
|
}
|
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
$bodyheader = 'bgcolor="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'" alink="'.$GLOBALS['phpgw_info']['theme']['alink'].'" link="'.$GLOBALS['phpgw_info']['theme']['link'].'" vlink="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"';
|
|
|
|
|
2001-12-31 02:17:10 +01:00
|
|
|
if ($fp = @fopen(PHPGW_APP_TPL."/app.css","r"))
|
|
|
|
{
|
|
|
|
$app_css = fread ($fp, filesize (PHPGW_APP_TPL."/app.css"));
|
|
|
|
fclose($fp);
|
|
|
|
}
|
2003-08-28 16:31:11 +02:00
|
|
|
|
|
|
|
$p = createobject('phpgwapi.preferences');
|
|
|
|
$preferences = $p->read_repository();
|
|
|
|
if(isset($preferences[$GLOBALS['phpgw_info']['flags']['currentapp']]['refreshTime']))
|
|
|
|
{
|
|
|
|
$refreshTime = $preferences[$GLOBALS['phpgw_info']['flags']['currentapp']]['refreshTime']*60;
|
|
|
|
}
|
2001-12-31 02:17:10 +01:00
|
|
|
|
2003-08-28 16:31:11 +02:00
|
|
|
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
|
|
|
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
|
|
|
|
|
2001-11-14 19:06:13 +01:00
|
|
|
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
|
|
|
$tpl->set_unknowns('remove');
|
|
|
|
$tpl->set_file(array('head' => 'head.tpl'));
|
|
|
|
$var = Array (
|
2003-08-28 16:31:11 +02:00
|
|
|
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
|
|
|
|
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
|
2001-11-14 19:06:13 +01:00
|
|
|
'charset' => lang('charset'),
|
|
|
|
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'],
|
2003-08-28 16:31:11 +02:00
|
|
|
'app_name' => $app,
|
2001-11-14 19:06:13 +01:00
|
|
|
'body_tags' => $bodyheader,
|
2001-12-31 02:17:10 +01:00
|
|
|
'bg_color' => $GLOBALS['phpgw_info']['theme']['bg_color'],
|
2003-08-28 16:31:11 +02:00
|
|
|
'refreshTime' => $refreshTime,
|
|
|
|
'css' => $GLOBALS['phpgw']->common->get_css(),
|
|
|
|
'java_script' => $java_script
|
2001-11-14 19:06:13 +01:00
|
|
|
);
|
|
|
|
$tpl->set_var($var);
|
|
|
|
$tpl->pfp('out','head');
|
|
|
|
unset($tpl);
|
|
|
|
?>
|