[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/templates/idots/ -> head.inc.php (source)

   1  <?php
   2      /**************************************************************************\
   3      * eGroupWare                                                               *
   4      * http://www.egroupware.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      /* $Id: head.inc.php 20295 2006-02-15 12:31:25Z  $ */
  13  
  14      // get used language code
  15      $lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
  16  
  17      $bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="'
  18          . $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="'
  19          . $GLOBALS['egw_info']['theme']['vlink'] . '"';
  20  
  21      if(!$GLOBALS['egw_info']['server']['htmlcompliant'])
  22      {
  23          $bodyheader .= '';
  24      }
  25  
  26      #_debug_array($GLOBALS['egw_info']['user']['preferences']['common']);
  27      $theme_css = '/phpgwapi/templates/idots/css/'.$GLOBALS['egw_info']['user']['preferences']['common']['theme'].'.css';
  28      if(!file_exists(EGW_SERVER_ROOT.$theme_css))
  29      {
  30          $theme_css = '/phpgwapi/templates/idots/css/idots.css';
  31      }
  32      $theme_css = $GLOBALS['egw_info']['server']['webserver_url'] . $theme_css;
  33      $print_css = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/print.css';
  34  
  35      //pngfix defaults to yes
  36      if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'])
  37      {
  38          $pngfix_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/pngfix.js';
  39          $pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
  40          <!--[if gte IE 5.5000]>
  41          <script src="'.$pngfix_src.'" type="text/javascript">
  42          </script>
  43          <![endif]-->';
  44      }
  45  
  46      if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
  47      {
  48          $slider_effects_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/slidereffects.js';
  49          $slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
  50          </script>';
  51      }
  52      else
  53      {
  54          $simple_show_hide_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/simple_show_hide.js';
  55          $simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
  56          </script>';
  57      }
  58  
  59      $tpl = CreateObject('phpgwapi.Template',EGW_TEMPLATE_DIR);
  60      $tpl->set_unknowns('remove');
  61      $tpl->set_file(array('_head' => 'head.tpl'));
  62      $tpl->set_block('_head','head');
  63  
  64      if ($GLOBALS['egw_info']['flags']['app_header'])
  65      {
  66          $app = $GLOBALS['egw_info']['flags']['app_header'];
  67      }
  68      else
  69      {
  70          $app = $GLOBALS['egw_info']['flags']['currentapp'];
  71          $app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
  72      }
  73  
  74      
  75      if($app!='wiki') $robots ='<meta name="robots" content="none" />';
  76      
  77      $var = Array(
  78          'img_icon'          => EGW_IMAGES_DIR . '/favicon.ico',
  79          'img_shortcut'      => EGW_IMAGES_DIR . '/favicon.ico',
  80          'pngfix'            => $pngfix,
  81          'slider_effects'    => $slider_effects,
  82          'simple_show_hide'    => $simple_show_hide,
  83          'lang_code'            => $lang_code,
  84          'charset'           => $GLOBALS['egw']->translation->charset(),
  85          'font_family'       => $GLOBALS['egw_info']['theme']['font'],
  86          'website_title'     => strip_tags($GLOBALS['egw_info']['server']['site_title']. ($app ? " [$app]" : '')),
  87          'body_tags'         => $bodyheader .' '. $GLOBALS['egw']->common->get_body_attribs(),
  88          'theme_css'         => $theme_css,
  89          'print_css'         => $print_css,
  90          'css'               => $GLOBALS['egw']->common->get_css(),
  91          'java_script'       => $GLOBALS['egw']->common->get_java_script(),
  92          'meta_robots'        => $robots,
  93          'dir_code'            => lang('language_direction_rtl') != 'rtl' ? '' : ' dir="rtl"',
  94       );
  95      $tpl->set_var($var);
  96      $tpl->pfp('out','head');
  97      unset($tpl);
  98  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7