[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 | |
---|
[2623] | 21 | $pngfix = ''; |
---|
| 22 | if ( ! $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'disable_pngfix' ] ) |
---|
| 23 | $pngfix = "\t\t" . '<!--[if lt IE 7]>' . "\n\t\t\t" |
---|
| 24 | . '<script src="' |
---|
| 25 | . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] . '/phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ] . '/js/pngfix.js' |
---|
| 26 | . '" type="text/javascript">' |
---|
| 27 | . "</script>\n\t\t" |
---|
| 28 | . "<![endif]-->\n"; |
---|
[2] | 29 | |
---|
[2628] | 30 | $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', |
---|
[2561] | 31 | ( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ), |
---|
[2628] | 32 | 'phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ], true ); |
---|
[882] | 33 | |
---|
[2623] | 34 | $bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] |
---|
| 35 | . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] |
---|
| 36 | . '" alink="' . $GLOBALS['phpgw_info']['theme']['alink'] |
---|
| 37 | . '" vlink="' . $GLOBALS['phpgw_info']['theme']['vlink'] . '"'; |
---|
[882] | 38 | |
---|
[2623] | 39 | $app = $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]; |
---|
| 40 | $app = ( $app ) ? ' [' . ( isset( $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ] ) ? $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ][ 'title' ] : lang( $app ) ) . ']' : ''; |
---|
[882] | 41 | |
---|
[2623] | 42 | $webserver_url = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ? |
---|
| 43 | $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/'; |
---|
| 44 | |
---|
| 45 | if ( strpos( $webserver_url, '/' ) != ( strlen( $webserver_url ) - 1 ) ) |
---|
[890] | 46 | $webserver_url .= '/'; |
---|
[2623] | 47 | |
---|
[890] | 48 | if( is_null($_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user'])) |
---|
| 49 | $tmpDefault = "default"; |
---|
| 50 | else |
---|
| 51 | $tmpDefault = $_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set']; |
---|
| 52 | |
---|
[882] | 53 | $var = Array( |
---|
[2623] | 54 | 'img_icon' => "{$webserver_url}{$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/{$tmpDefault}/images/navbar.png", |
---|
| 55 | 'img_shortcut' => "{$webserver_url}{$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/{$tmpDefault}/images/navbar.png", |
---|
| 56 | 'pngfix' => $pngfix, |
---|
| 57 | 'lang_code' => $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'lang' ], |
---|
| 58 | 'charset' => $GLOBALS[ 'phpgw' ] -> translation -> charset( ), |
---|
| 59 | 'font_family' => $GLOBALS[ 'phpgw_info' ][ 'theme' ][ 'font' ], |
---|
| 60 | 'website_title' => "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'site_title' ]} $app", |
---|
| 61 | 'body_tags' => "{$bodyheader} {$GLOBALS[ 'phpgw' ] -> common -> get_body_attribs()}", |
---|
| 62 | 'css' => $GLOBALS[ 'phpgw' ] -> common -> get_css( ), |
---|
| 63 | 'java_script' => $GLOBALS[ 'phpgw' ] -> common -> get_java_script( ), |
---|
| 64 | 'content' => $content |
---|
[2] | 65 | ); |
---|
[2623] | 66 | |
---|
| 67 | $tpl = CreateObject( 'phpgwapi.Template', PHPGW_TEMPLATE_DIR ); |
---|
| 68 | $tpl -> set_unknowns( 'remove' ); |
---|
| 69 | $tpl -> set_file( array( '_head' => 'head.tpl' ) ); |
---|
| 70 | $tpl -> set_block( '_head', 'head' ); |
---|
| 71 | $tpl -> set_var( $var ); |
---|
| 72 | $tpl -> pfp( 'out', 'head' ); |
---|
| 73 | unset( $tpl ); |
---|
[2] | 74 | ?> |
---|