WebCalendar PHP Cross Reference Groupware Applications

Source: /index.php - 37 lines - 1468 bytes - Summary - Text - Print

   1  <?php
   2  /* $Id: index.php,v 1.16.2.2 2007/08/06 02:28:30 cknudsen Exp $ */
   3  include_once  'includes/init.php';
   4  
   5  // If not yet logged in, you will be redirected to login.php before
   6  // we get to this point (by init.php included above).
   7  if ( ! empty ( $STARTVIEW ) ) {
   8    $page = get_preferred_view ();
   9    if ( access_can_view_page ( $page ) )
  10      send_to_preferred_view ();
  11    else {
  12      // User's preferences need to be updated to their preferred view.
  13      if ( access_can_access_function ( ACCESS_PREFERENCES ) )
  14        do_redirect ( 'pref.php' );
  15      // User does not have access to preferences...
  16      // So, we need to pick another page.
  17      if ( access_can_access_function ( ACCESS_WEEK ) )
  18        do_redirect ( 'week.php' );
  19      elseif ( access_can_access_function ( ACCESS_MONTH ) )
  20        do_redirect ( 'month.php' );
  21      elseif ( access_can_access_function ( ACCESS_DAY ) )
  22        do_redirect ( 'day.php' );
  23      elseif ( access_can_access_function ( ACCESS_YEAR ) )
  24        do_redirect ( 'year.php' );
  25      // At this point, this user cannot view the preferred view in their
  26      // preferences (and they cannot update their preferences), and they cannot
  27      // view any of the standard day/week/month/year pages. All that's left is a
  28      // custom view that is either created by them or a global view.
  29      if ( count ( $views ) > 0 )
  30        do_redirect ( $views[0]['url'] );
  31  
  32      // No views either?  You gotta be kidding me! ;-)
  33    }
  34  } else
  35    do_redirect ( 'month.php' );
  36  
  37  ?>

title

Description

title

Description

title

Description

title

title

Body