forked from hypercities/hypercities
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthFailure.php
More file actions
123 lines (119 loc) · 3.62 KB
/
authFailure.php
File metadata and controls
123 lines (119 loc) · 3.62 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
include_once 'includes/serverSession.inc';
cServerSession::start();
//$error = $_SESSION['error'];
$messages = array(
'expiredToken' => array(
'message' => 'Please have the instructor of this class report to the '
. 'Moodle team or to the HyperCities team that an expired token was used.',
'type' => 'Expired Token'
),
'notLoggedIn' => array(
'title' => 'Not Logged In',
'message' => 'Sorry, you must be logged in to HyperCities to use this feature.',
'type' => 'Not Logged In'
),
'notEnrolled' => array(
'title' => 'Not Enrolled',
'message' => 'You are not allowed to view this class collection because you are not'
. ' enrolled in this course. If you believe you have received this message'
. ' in error, please have your instructor contact the Moodle'
. ' team.',
'type' => 'Not Enrolled'
),
'remoteConnectionFailure' => array(
'message' => 'There was an error connecting to Moodle to authenticate your access'
. ' to this class. Please contact the instructor of this course, or'
. ' the HyperCities or Moodle teams.',
'type' => 'RemoteConnectionFailure'
)
);
if (isset($reason)) {
$message = $messages[$reason];
} elseif (isset($_GET['reason'])) {
$message = $messages[$_GET['reason']];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Error: <?php echo $message['title']; ?></title>
<style type="text/css">
#errorMessage {
position: absolute;
left: 30%;
top: 30%;
/*border: solid #000 1px;*/
height: 30%;
width: 37%;
}
#errorTitle {
-moz-border-radius-topleft:15px;
-moz-border-radius-topright:15px;
webkit-border-top-left-radius:15px;
-webkit-border-top-right-radius:15px;
border-top-left-radius:15px;
border-top-right-radius:15px;
background-attachment:scroll;
background-color:#33CCFF;
background-image:url("./images/background-navmenu.gif");
background-position:left top;
background-repeat:repeat-x;
border-left:4px solid #33CCFF;
border-right:4px solid #33CCFF;
border-top:4px solid #33CCFF;
font-size:large;
font-weight:bold;
height:15%;
padding:10px;
text-align:center;
color:#FFF;
}
#errorDescription {
background-color:#FFF;
border-left:4px solid #33CCFF;
border-right:4px solid #33CCFF;
font-size:small;
font-weight: bold;
height:67%;
padding:10px;
}
#errorFooter {
-moz-border-radius-bottomleft:15px;
-moz-border-radius-bottomright:15px;
-webkit-border-bottom-right-radius:15px;
-webkit-border-bottom-left-radius:15px;
background-attachment:scroll;
background-color:#33CCFF;
background-image:url("images/background-navmenu.gif");
background-position:left top;
background-repeat:repeat-x;
border-bottom:4px solid #33CCFF;
border-left:4px solid #33CCFF;
border-right:4px solid #33CCFF;
color:#FFFFFF;
font-weight:bold;
height:15%;
padding:10px;
text-align:center;
}
body {
background-color: #FFF;
font-family: Verdana, Geneva, sans-serif;
color: #00F;
}
</style>
</head>
<body>
<div id="errorMessage">
<div id="errorTitle">Authentication Failure</div>
<div id="errorDescription">
<p><?php echo $message['message'] ?></p>
</div>
<div id="errorFooter">* * * <?php echo $message['type'] ?> * * * </div>
</div>
</body>
</html>
<?php
?>