WebCalendar PHP Cross Reference Groupware Applications

Source: /css_cacher.php - 59 lines - 1768 bytes - Summary - Text - Print

   1  <?php
   2  /* $Id: css_cacher.php,v 1.18.2.2 2007/11/13 19:37:28 umcesrjones Exp $ */
   3  define ( '_ISVALID', true );
   4  
   5  include  'includes/translate.php';
   6  include  'includes/config.php';
   7  include  'includes/dbi4php.php';
   8  include  'includes/formvars.php';
   9  include  'includes/functions.php';
  10  
  11  do_config ( 'includes/settings.php' );
  12  include 'includes/' . $user_inc;
  13  include_once  'includes/access.php';
  14  include_once  'includes/validate.php';
  15  include_once  'includes/gradient.php';
  16  
  17  load_global_settings ();
  18  
  19  @session_start ();
  20  $login = ( empty ( $_SESSION['webcal_login'] )
  21    ? '__public__' : $_SESSION['webcal_login'] );
  22  $login = ( empty ( $_SESSION['webcal_tmp_login'] )
  23    ? $login : $_SESSION['webcal_tmp_login'] );
  24  // .
  25  // If calling script uses 'guest', we must also.
  26  if ( ! empty ( $_GET['login'] ) )
  27    $login = $_GET['login'];
  28  else
  29  if ( ! empty ( $_REQUEST['login'] ) )
  30    $login = $_REQUEST['login'];
  31  
  32  if ( substr ( $login, 0, 10 ) == '__public__' )
  33    $login = '__public__';
  34      
  35  load_user_preferences ( $login );
  36  // .
  37  // We will cache CSS as default, but override from admin and pref
  38  // by incrementing the webcalendar_csscache cookie value.
  39  $cookie = ( isset ( $_COOKIE['webcalendar_csscache'] )
  40    ? $_COOKIE['webcalendar_csscache'] : 0 );
  41  
  42  header ( 'Content-type: text/css' );
  43  header ( 'Last-Modified: ' . date ( 'r', mktime ( 0, 0, 0 ) + $cookie ) );
  44  // .
  45  // If we are calling from admin or pref, expire CSS now.
  46  if ( empty ( $_SESSION['webcal_tmp_login'] ) ) {
  47    header ( 'Expires: ' . date ( 'D, j M Y H:i:s', time () + 86400 ) . ' UTC' );
  48    header ( 'Cache-Control: Public' );
  49    header ( 'Pragma: Public' );
  50  }
  51  
  52  if ( ini_get ( 'zlib.output_compression' ) != 1 )
  53    ob_start( 'ob_gzhandler' );
  54  
  55  include_once  ( 'includes/styles.php' );
  56  
  57  unset ( $_SESSION['webcal_tmp_login'] );
  58  
  59  ?>

title

Description

title

Description

title

Description

title

title

Body