forked from ChelseaSchool/MyIEP
/
superuser_new_member.php
executable file
·143 lines (125 loc) · 5.79 KB
/
superuser_new_member.php
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
/** @file
* @brief add a user
* @copyright 2014 Chelsea School
* @copyright 2005 Grasslands Regional Division #6
* @copyright This program 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 2 of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* @authors Rik Goldman, Sabre Goldman, Jason Banks, Alex, James, Paul, Bryan, TJ, Jonathan, Micah, Stephen, Joseph
* @author M. Nielson
* @todo Filter input
*/
//the authorization level for this page!
$MINIMUM_AUTHORIZATION_LEVEL = 0;
/**
* Path for IPP required files.
*/
$system_message = $system_message;
define('IPP_PATH','./');
/* eGPS required files. */
require_once(IPP_PATH . 'etc/init.php');
require_once(IPP_PATH . 'include/db.php');
require_once(IPP_PATH . 'include/auth.php');
require_once(IPP_PATH . 'include/log.php');
require_once(IPP_PATH . 'include/user_functions.php');
header('Pragma: no-cache'); //don't cache this page!
if(isset($_POST['LOGIN_NAME']) && isset( $_POST['PASSWORD'] )) {
if(!validate( $_POST['LOGIN_NAME'] , $_POST['PASSWORD'] )) {
$system_message = $system_message . $error_message;
IPP_LOG($system_message,$_SESSION['egps_username'],'ERROR');
require(IPP_PATH . 'index.php');
exit();
}
} else {
if(!validate()) {
$system_message = $system_message . $error_message;
IPP_LOG($system_message,$_SESSION['egps_username'],'ERROR');
require(IPP_PATH . 'index.php');
exit();
}
}
//************* SESSION active past here **************************
//check permission levels
if(getPermissionLevel($_SESSION['egps_username']) > $MINIMUM_AUTHORIZATION_LEVEL && !(isLocalAdministrator($_SESSION['egps_username']))) {
$system_message = $system_message . "You do not have permission to view this page (IP: " . $_SERVER['REMOTE_ADDR'] . ")";
IPP_LOG($system_message,$_SESSION['egps_username'],'ERROR');
require(IPP_PATH . 'security_error.php');
exit();
}
//************** validated past here SESSION ACTIVE****************
$szBackGetVars="";
foreach($_GET as $key => $value) {
$szBackGetVars = $szBackGetVars . $key . "=" . $value . "&";
}
//strip trailing '&'
$szBackGetVars = substr($szBackGetVars, 0, -1);
?>
<!DOCTYPE HTML>
<HTML lang=en>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">
<TITLE><?php echo $page_title; ?></TITLE>
<style type="text/css" media="screen">
<!--
@import "<?php echo IPP_PATH;?>layout/greenborders.css";
-->
</style>
<!-- All code Copyright © 2005 Grasslands Regional Division #6.
-Concept and Design by Grasslands IPP Focus Group 2005
-Programming and Database Design by M. Nielsen, Grasslands
Regional Division #6
-User Interface Design and Educational Factors by P Stoddart,
Grasslands Regional Division #6
-CSS and layout images are courtesy A. Clapton.
-->
</HEAD>
<BODY>
<table class="shadow" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="shadow-topLeft"></td>
<td class="shadow-top"></td>
<td class="shadow-topRight"></td>
</tr>
<tr>
<td class="shadow-left"></td>
<td class="shadow-center" valign="top">
<table class="frame" width=620px align=center border="0">
<tr align="Center">
<td><center><img src="<?php echo $page_logo_path; ?>"></center></td>
</tr>
<tr>
<td valign="top">
<div id="main">
<?php if ($system_message) { echo "<center><table width=\"80%\"><tr><td><p class=\"message\">" . $system_message . "</p></td></tr></table></center>";} ?>
<center><table><tr><td><center><p class="header">- IPP Add Member (Superuser)-</p></center></td></tr></table></center>
<BR>
<center>
This section under development. Friday June 16, 2006.
</center>
</div>
</td>
</tr>
</table></center>
</td>
<td class="shadow-right"></td>
</tr>
<tr>
<td class="shadow-left"> </td>
<td class="shadow-center"><table border="0" width="100%"><tr><td width="60"><a href="
<?php
echo IPP_PATH . "superuser_manage_users.php?$szBackGetVars";
?>"><img src="<?php echo IPP_PATH; ?>images/back-arrow.png" border=0></a></td><td width="60"><a href="<?php echo IPP_PATH . "main.php"; ?>"><img src="<?php echo IPP_PATH; ?>images/homebutton.png" border=0></a></td><td valign="bottom" align="center">Logged in as: <?php echo $_SESSION['egps_username'];?></td><td align="right"><a href="<?php echo IPP_PATH;?>"><img src="<?php echo IPP_PATH; ?>images/logout.png" border=0></a></td></tr></table></td>
<td class="shadow-right"> </td>
</tr>
<tr>
<td class="shadow-bottomLeft"></td>
<td class="shadow-bottom"></td>
<td class="shadow-bottomRight"></td>
</tr>
</table>
<center></center>
</BODY>
</HTML>