forked from WebPA/WebPA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcookie.php
More file actions
38 lines (33 loc) · 763 Bytes
/
cookie.php
File metadata and controls
38 lines (33 loc) · 763 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
<?php
/**
*
* INDEX - Main page
*
* @copyright 2007 Loughborough University
* @license http://www.gnu.org/licenses/gpl.txt
* @version 1.0.0.0
*
*/
require_once('includes/inc_global.php');
$url = '';
if (isset($_GET['url'])) {
$url = $_GET['url'];
}
if ($_user) {
$id = '';
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
header('Location: ' . APP__WWW . '/index.php?id=' . $id);
} else if ($url) {
if (strpos($url, '?') === FALSE) {
$url .= '?';
} else {
$url .= '&';
}
header('Location: ' . $url . 'lti_errormsg=' . urlencode('Unable to connect to ' . APP__NAME . '; please ensure that your browser is not blocking third-party cookies'));
} else {
header('Location: ' . APP__WWW . '/login.php?msg=cookies');
}
exit;
?>