source: trunk/phpgwapi/templates/default/head.inc.php @ 3083

Revision 3083, 3.3 KB checked in by amuller, 14 years ago (diff)

Ticket #1148 - Corrigindo caminho dos css nas imagens

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
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        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'templatejs',
22                ( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ),
23                'phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ], true );
24
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'] . '"';
29
30        $app = $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ];
31        $app = ( $app ) ? ' [' . ( isset( $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ] ) ? $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ][ 'title' ] : lang( $app ) ) . ']' : '';
32
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 ) )
37                $webserver_url .= '/';
38
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
44        $var = Array(
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                'body_tags'      => "{$bodyheader} {$GLOBALS[ 'phpgw' ] -> common -> get_body_attribs()}",
52                'css'            => $GLOBALS[ 'phpgw' ] -> common -> get_css( ),
53                'java_script'    => $GLOBALS[ 'phpgw' ] -> common -> get_java_script( ),
54                'content'        => $content
55        );
56
57        $tpl = CreateObject( 'phpgwapi.Template', PHPGW_TEMPLATE_DIR );
58        $tpl -> set_unknowns( 'remove' );
59        $tpl -> set_file( array( '_head' => 'head.tpl' ) );
60        $tpl -> set_block( '_head', 'head' );
61        $tpl -> set_var( $var );
62        $tpl -> pfp( 'out', 'head' );
63        unset( $tpl );
64?>
Note: See TracBrowser for help on using the repository browser.