[2] | 1 | <?php |
---|
[882] | 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 | \**************************************************************************/ |
---|
[2] | 11 | |
---|
| 12 | |
---|
[882] | 13 | if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) |
---|
[2] | 14 | { |
---|
[2623] | 15 | $mtime = microtime(); |
---|
| 16 | $mtime = explode(' ',$mtime); |
---|
| 17 | $mtime = $mtime[1] + $mtime[0]; |
---|
| 18 | $GLOBALS['page_start_time'] = $mtime; |
---|
[2] | 19 | } |
---|
| 20 | |
---|
[2931] | 21 | $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'templatejs', |
---|
[2561] | 22 | ( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ), |
---|
[2628] | 23 | 'phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ], true ); |
---|
[882] | 24 | |
---|
[2623] | 25 | $bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] |
---|
| 26 | . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] |
---|
| 27 | . '" alink="' . $GLOBALS['phpgw_info']['theme']['alink'] |
---|
| 28 | . '" vlink="' . $GLOBALS['phpgw_info']['theme']['vlink'] . '"'; |
---|
[882] | 29 | |
---|
[2623] | 30 | $app = $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]; |
---|
| 31 | $app = ( $app ) ? ' [' . ( isset( $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ] ) ? $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ][ 'title' ] : lang( $app ) ) . ']' : ''; |
---|
[882] | 32 | |
---|
[2623] | 33 | $webserver_url = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ? |
---|
| 34 | $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/'; |
---|
| 35 | |
---|
| 36 | if ( strpos( $webserver_url, '/' ) != ( strlen( $webserver_url ) - 1 ) ) |
---|
[890] | 37 | $webserver_url .= '/'; |
---|
[2623] | 38 | |
---|
[890] | 39 | if( is_null($_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user'])) |
---|
| 40 | $tmpDefault = "default"; |
---|
| 41 | else |
---|
| 42 | $tmpDefault = $_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set']; |
---|
| 43 | |
---|
[882] | 44 | $var = Array( |
---|
[2623] | 45 | 'img_icon' => "{$webserver_url}{$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/{$tmpDefault}/images/navbar.png", |
---|
| 46 | 'img_shortcut' => "{$webserver_url}{$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/{$tmpDefault}/images/navbar.png", |
---|
| 47 | 'lang_code' => $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'lang' ], |
---|
| 48 | 'charset' => $GLOBALS[ 'phpgw' ] -> translation -> charset( ), |
---|
| 49 | 'font_family' => $GLOBALS[ 'phpgw_info' ][ 'theme' ][ 'font' ], |
---|
| 50 | 'website_title' => "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'site_title' ]} $app", |
---|
| 51 | 'css' => $GLOBALS[ 'phpgw' ] -> common -> get_css( ), |
---|
| 52 | 'java_script' => $GLOBALS[ 'phpgw' ] -> common -> get_java_script( ), |
---|
| 53 | 'content' => $content |
---|
[2] | 54 | ); |
---|
[2623] | 55 | |
---|
| 56 | $tpl = CreateObject( 'phpgwapi.Template', PHPGW_TEMPLATE_DIR ); |
---|
| 57 | $tpl -> set_unknowns( 'remove' ); |
---|
| 58 | $tpl -> set_file( array( '_head' => 'head.tpl' ) ); |
---|
| 59 | $tpl -> set_block( '_head', 'head' ); |
---|
| 60 | $tpl -> set_var( $var ); |
---|
| 61 | $tpl -> pfp( 'out', 'head' ); |
---|
| 62 | unset( $tpl ); |
---|
[2] | 63 | ?> |
---|