forked from ndlibersa/auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
107 lines (73 loc) · 3.4 KB
/
admin.php
File metadata and controls
107 lines (73 loc) · 3.4 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
<?php
/*
**************************************************************************************************************************
** CORAL Authentication Module v. 1.0
**
** Copyright (c) 2011 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
**
** CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License along with CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
session_start();
include_once 'directory.php';
if (isset($_SESSION['loginID'])){
$loginID=$_SESSION['loginID'];
}
$user = new User(new NamedArguments(array('primaryKey' => $loginID)));
if (($user->isAdmin) && ($user->getOpenSession())){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CORAL Authentication</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" />
<link rel="SHORTCUT ICON" href="images/clownfishfavicon.ico" />
<script type="text/javascript" src="js/plugins/jquery.js"></script>
<script type="text/javascript" src="js/plugins/thickbox.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
<noscript><font face=arial>JavaScript must be enabled in order for you to use CORAL. However, it seems JavaScript is either disabled or not supported by your browser. To use CORAL, enable JavaScript by changing your browser options, then <a href="">try again</a>. </font></noscript>
<center>
<form name="reportlist" method="post" action="report.php">
<br />
<div style="width:451px; height:91px;background-image:url('images/authtitle.gif');background-repeat:no-repeat;text-align:right;">
</div>
<div class='bordered' style='width:447px;margin-left:2px;'>
<br />
<div class='headerText' style='text-align: left;margin:0px 60px 3px 60px;'>Users</div>
<div class='smallDarkRedText' style='margin-bottom:5px;'>* Login ID must match the login ID set up in the modules</div>
<div style='text-align:left;margin:0px 60px 60px 60px;' id='div_users'>
<br />
<br />
<img src='images/circle.gif'> <span style='font-size:90%'>Processing...</span>
</div>
</div>
<div class='smallerText' style='text-align:center; margin-top:13px;'><a href='index.php'>Login page</a></div>
</form>
<br />
<br />
</center>
<br />
<br />
<script type="text/javascript" src="js/admin.js"></script>
</body>
</html>
<?php
}else{
if ($user->getOpenSession()){
header('Location: index.php?service=admin.php&invalid');
}else{
header('Location: index.php?service=admin.php&admin');
}
}
?>