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

Revision 2931, 3.7 KB checked in by amuller, 14 years ago (diff)

Ticket #1036 - Adicionando ponto e vírgula faltante e mudando nomes

  • 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        $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";
29
30        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'templatejs',
31                ( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ),
32                'phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ], true );
33
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'] . '"';
38
39        $app = $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ];
40        $app = ( $app ) ? ' [' . ( isset( $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ] ) ? $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ][ 'title' ] : lang( $app ) ) . ']' : '';
41
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 ) )
46                $webserver_url .= '/';
47
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
53        $var = Array(
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
65        );
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 );
74?>
Note: See TracBrowser for help on using the repository browser.