-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
executable file
·88 lines (83 loc) · 1.96 KB
/
register.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
<?php
/*
Copyright © 2009,2015,2022 Siggi Bjarnason.
Licensed under GNU GPL v3 and later. Check out LICENSE.TXT for details
or see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>
*/
require("header.php");
if(isset($_POST["btnSubmit"]))
{
$btnSubmitValue = $_POST["btnSubmit"];
}
else
{
$btnSubmitValue = "";
}
if($strReferer != $strPageURL and $PostVarCount > 0)
{
printPg("Invalid operation, Bad Reference!!!","error");
exit;
}
if(isset($_SESSION["auth_username"] ) )
{
printPg("You're already registered, what are you trying to do????","error");
exit;
}
$RegFoot = $TextArray["RegFoot"];
$RegHeader = $TextArray["RegHead"];
$strName = "";
$strAddr1 = "";
$strAddr2 = "";
$strCity = "";
$strState = "";
$strZip = "";
$strCountry = "";
$iPrivLevel = "";
$strEmail = "";
$strUserID = "";
$strCell = "";
$bSuccess = FALSE;
if(isset($GLOBALS["ConfArray"]["minRegLevel"]) )
{
$iLevel = $GLOBALS["ConfArray"]["minRegLevel"];
}
else
{
$iLevel = 1;
}
if($btnSubmitValue == "Submit")
{
require_once("CleanReg.php");
if($strEmail)
{
$strNameParts = explode(" ",$strName);
$HowMany = count($strNameParts);
if($HowMany==1)
{
printPg("Please provide both first and last name","error");
}
else
{
if(!$bSpam)
{
require("UserAdd.php");
}
}
}
else
{
printPg("Can't create new user without an email. Contact $SupportEmail if you have any questions.","error");
}
}
if(!$bSuccess)
{
printPg("$RegHeader","center");
print "<form method=\"POST\">\n";
require("UserRegForm.php");
print "<tr>\n<td colspan=\"2\" align=\"center\">$RegFoot</td>\n</tr>\n";
print "<tr>\n<td colspan=\"2\" align=\"center\"><input type=\"Submit\" value=\"Submit\" name=\"btnSubmit\"></td>\n</tr>\n";
print "</table>\n";
print "</form>\n";
}
require("footer.php");
?>