control.inc
1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* $Id$
*
* Contains the controller helper functions
*
* Copyright (c) 1999-2002 The Owl Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
* @version $Revision$
* @author jam dms team
* @package
*/
/**
* Redirects to the specified URL
*
* @param $url the URL to forward to
*/
function redirect($url) {
// everything is relative to the root url
$url = $url . $default->owl_root_url . "/";
// if we have a session
if (isset($uid->sessdata["sessid"])) {
// check url for parameters and add sessid accordingly
if (strstr($url, "?")) {
$url = $url . "&sess=". $uid->sessdata["sessid"];
} else {
$url = $url . "?sess=". $uid->sessdata["sessid"];
}
}
header("Location: $url");
}
/**
* Redirects to login if no session is present
*/
function checkSession($sessionID) {
$sessionStatus = Owl_Session::verify($sessionID);
switch ($sessionStatus["status"]) {
}
}