source: Dev/trunk/classes/master.php @ 91

Last change on this file since 91 was 58, checked in by fpvanagthoven, 14 years ago

mainmenu.php tweaked for usability. When not logged in, the user gets redirected to index.php

File size: 551 bytes
Line 
1<?php
2
3/**
4 * Description of master
5 *
6 * For autoloading of classes for example.
7 *
8 * @author fpvanagthoven
9 */
10// Determine our absolute document root
11define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
12
13/* Session */
14session_name("cpsft");   // Set a session name
15session_start();  // Start the session
16
17
18
19function __autoload($class_name) {
20    require 'classes/' . $class_name . '.php';
21}
22
23
24// Redirects user to $url
25function redirect($url = null)
26{
27        if (is_null($url))
28                $url = $_SERVER['PHP_SELF'];
29
30        header("Location: $url");
31        exit();
32}
Note: See TracBrowser for help on using the repository browser.