Location: PHPKode > projects > Study planner > splanner_015/index.php
<?php
/**
 * Entry point for the spl application.
 *
 * $Author: jebbol $
 * $Revision: 1.7 $
 * $Date: 2006/08/08 05:47:20 $
 * 
 * @copyright Copyright (c) 2005-2006 Studiewijzer.nl 
 * @link      http://www.studiewijzer.nl
 * @license   http://www.gnu.org/copyleft/gpl.html
 * 
 * $Log: index.php,v $
 * Revision 1.7  2006/08/08 05:47:20  jebbol
 * Changed repository (cvs.sourceforge.net -> splanner.cvs.sourceforge.net)
 *
 * Revision 1.6  2006/02/11 16:25:02  jebbol
 * Renamed ui/inc/util.php -> ui/inc/util.inc.php
 *
 */


// Configuration
@include_once('inc/config.php');

if (!isset($SPL_CFG)) {
  // There is no config file, which means the application has not been setup yet
  // Redirect the user to the setup page (if it exists)
  if (file_exists('install/setup.php')) {
    header("Location: install/setup.php");
    exit; 
  }
  else {
    echo '<html><head><title>Fatal Error!</title></head><body><center><font color="red"><h1>Fatal Error</h1><p>Studiewijzer has not been setup properly.<br>To correct this problem please copy the file<br><h2>inc/default_config.php</h2>to<br><h2>inc/config.php</h2>and modify it to reflect your sites settings.<br><br>If you need any assistence, check out the forum at<h2><a href="http://www.studiewijzer.nl">www.studiewijzer.nl</a></h2></font></center></body></html>';
    exit;
  }
}

// Utility functions
include_once('ui/inc/util.inc.php');

// If the user has not logged in, redirect him to the login page
if (!isset($_SESSION['usr_id'])) {
  redirect('ui/login.php');
}

// redirect user to his start page
if (!isset($_SESSION['usp_startpage'])) {
  redirect('ui/menu.php');
}
redirect($_SESSION['usp_startpage']);

?>
Return current item: Study planner