· 9 years ago · May 25, 2017, 07:12 PM
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5<title><?=$servername?> Register Page : </title>
6<link rel="icon" href="favicon.ico">
7<style type="text/css">
8</style>
9<style type="text/css">
10img { behavior: url("pngfix.htc"); }
11</style>
12</head>
13<?php
14/*
15This Register Page Was Written By WizKid
16This Anti Sql Injection Was Written By gWX0
17This Anti Right Click Was Written By Kyuma
18All Rights Reserved. Any Support Can Be Requested Via RageZone.
19
20You'Re Allowed To Edit This Script And Modify The Template.
21HowEver, You Are NOT Allowed To Remove And/Or Edit Our [ Wizkid , Kyuma And gWX0 ] CopyRight.
22
23Removing This CopyRight Will Be Your Death.
24*/
25
26//Edit To Fit YOUR Requirements.
27$servername = "Your Gunz Name Here";
28$accounttable = "Account";
29$logintable = "Login";
30
31//Edit These Variables. If Not, No Register Page For You. (Or You'Re Fux Pro With The Same Login As Me.)
32$host = "Your Host Here Example --> Kyuma09\SQLEXPRESS";
33$user = "sa";
34$pass = "Your sa Account Password";
35$dbname = "GunzDB";
36
37$connect = odbc_connect("Driver={SQL Server};Server={$host}; Database={$dbname}", $user, $pass) or die("Can't connect the MSSQL server.");
38
39function antisql ( $sql ) {
40 return ( str_replace( "'", "''", $sql ) );
41}
42
43//My Favorite Function. Get The Fuck Off. (Nothing Personally :].)
44function gtfo($wut) {
45echo "<center><table width='500' cellpadding='5' cellspacing='0' border='0' style='border: 1px ;'>
46<tr>
47<td align=center width='100%' style='border-bottom: 1px solid black;'><b><?=$servername?> Register Page : </b></td>
48</tr>
49<tr>
50<td width='100%'><center>$wut</center></td>
51</tr>
52</table>";
53die();
54}
55
56//Check E-Mail Function. This To Prevent Fake E-Mails. (Remember The Time YOU Doing That?)
57function checkemail($address) {
58list($local, $host) = explode("@", $address);
59$pattern_local = "^([0-9a-z]*([-|_]?[0-9a-z]+)*)(([-|_]?)\.([-|_]?)[0-9a-z]*([-|_]?[0-9a-z]+)+)*([-|_]?)$";
60$pattern_host = "^([0-9a-z]+([-]?[0-9a-z]+)*)(([-]?)\.([-]?)[0-9a-z]*([-]?[0-9a-z]+)+)*\.[a-z]{2,4}$";
61$match_local = eregi($pattern_local, $local);
62$match_host = eregi($pattern_host, $host);
63if($match_local && $match_host) {
64return 1;
65}
66else {
67return 0;
68}
69}
70
71//The Num_rows() Function For ODBC Since The Default One Always Returns -1.
72Function num_rows(&$rid) {
73
74//We Can Try It At Least, Right?
75$num= odbc_num_rows($rid);
76if ($num >= 0) {
77return $num;
78}
79
80if (!odbc_fetch_row($rid, 1)) {
81odbc_fetch_row($rid, 0);
82return 0;
83}
84
85if (!odbc_fetch_row($rid, 2)) {
86odbc_fetch_row($rid, 0);
87return 1;
88}
89
90$lo= 2;
91$hi= 8192000;
92
93while ($lo < ($hi - 1)) {
94$mid= (int)(($hi + $lo) / 2);
95if (odbc_fetch_row($rid, $mid)) {
96$lo= $mid;
97} else {
98$hi= $mid;
99}
100}
101$num= $lo;
102odbc_fetch_row($rid, 0);
103return $num;
104}
105?>
106<html>
107<head>
108<title><?=$servername?> Register Page : </title>
109</head>
110<body>
111<center>
112<?php
113//Oh Well. Let's Create The Variable $ip To Start With.
114$ip = antisql($_SERVER['REMOTE_ADDR']);
115
116/*
117An Extra Feature. This Is NOT Enabled Before You Remove This + The Comment Thingy's.
118
119To Ban 1 IP It Will Be:
120if ($ip == "xxxxxx")
121{
122gtfo("Your IP Is BANNED!.");
123}
124
125For Multiple IP's, Use This Way:
126if ($ip == "xxxxxx" OR $ip == "xxxxxx")
127{
128gtfo("Your IP Is BANNED!.");
129}
130*/
131
132//Get The AID Out Of The Login Table (Defined At The Top Of This File) Where LastIP Is The Visitors IP.
133$query1 = odbc_exec($connect,"SELECT AID FROM $logintable WHERE LastIP = '$ip'");
134
135//UnderStable For The Real People. Editing This Without Knowledge Will Be The Death Of Your Register Page.
136$i=1;
137while (odbc_fetch_row($query1, $i)){
138$aid = odbc_result($query1, 'AID');
139
140$query2 = odbc_exec($connect,"SELECT UGradeID FROM $accounttable WHERE AID = '$aid'");
141odbc_fetch_row($query2);
142$ugradeid = odbc_result($query2, 1);
143
144if ($ugradeid == "253")
145{
146//Get The Fuck Off.
147gtfo("You Have One Or More Accounts Banned Here. You'Re Not Welcome Anymore.");
148}
149
150$i++;
151}
152
153//The Doreg Part.
154if (isset($_GET['act']) AND $_GET['act'] == "doreg")
155{
156
157//Check For Any Shit.
158if (!is_numeric($_POST['age']) OR !checkemail($_POST['email']) OR empty($_POST['username']) OR empty($_POST['password']) OR empty($_POST['email']) OR empty($_POST['name']) OR empty($_POST['age']))
159{
160gtfo("You'Re Not Funny.");
161}
162
163//Check If The User ID Exists Already.
164$query1 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
165$count1 = num_rows($query1);
166
167if ($count1 >= 1)
168{
169gtfo("User ID In Use.");
170}
171
172//Check If The E-Mail Is In Use.
173$query2 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE Email = '" . antisql($_POST['email']) . "'");
174$count2 = num_rows($query2);
175
176if ($count2 >= 1)
177{
178gtfo("E-Mail Address In Use.");
179}
180
181//Regdate
182$regdate = date("Y-m-d H:i:s");
183
184//Time For The Real Work. Editing This Will Be The End Of Your Register Page.
185$query3 = odbc_exec($connect, "INSERT INTO $accounttable (UserID, UGradeID, PGradeID, RegDate, Email, Age, Name) VALUES ('".antisql($_POST['username'])."', '0', '0', '$regdate', '".antisql($_POST['email'])."', '".antisql($_POST['age'])."', '".antisql($_POST['name'])."')");
186
187$query4 = odbc_exec($connect, "SELECT AID FROM $accounttable WHERE UserID = '" . antisql($_POST['username']) . "'");
188odbc_fetch_row($query4);
189$aid = odbc_result($query4, 1);
190
191//If No Results Comes Back. (Registration Failed.)
192if (!$aid)
193{
194gtfo("Something Happened. Please Report This Bug At <?=$servername?> Forums!");
195}
196
197odbc_exec($connect, "INSERT INTO $logintable (UserID, AID, Password) VALUES ('".antisql($_POST['username'])."', '$aid', '".antisql($_POST['password'])."')");
198
199//When Everything Is Done, show The User ID And The Password To The Visitor.
200//IF YOU WANT U CAN EDIT THE $_POST[password] AND PUT **************** FOR HIDE THE PASSWORD!.
201gtfo("Your <?=$servername?> Account Has Been Created. ! <br><br>
202Your User ID : $_POST[username]<br>
203Your Password : $_POST[password]<br><br>
204Have Fun At $servername ! ");
205}
206
207//Here The Party Begins. Feel Free To Edit This.
208echo "<table width='350'>
209<form action='" . $_SERVER['PHP_SELF'] . "?act=doreg' method='POST'>
210<b><?=$servername?> Register Page : </b><br><br>
211<tr>
212<td width='50%'><b>Your User ID : </b></td>
213<td width='50%'><input type='text' name='username'></td>
214</tr>
215<tr>
216<td width='50%'><b>Your Password : </b></td>
217<td width='50%'><input type='password' name='password'></td>
218</tr>
219<tr>
220<td width='50%'><b>Your E-Mail : </b></td>
221<td width='50%'><input type='text' name='email'></td>
222</tr>
223<tr>
224<td width='50%'><b>Your Name : </b></td>
225<td width='50%'><input type='text' name='name'></td>
226</tr>
227<tr>
228<td width='50%'><b>Your Age : </b></td>
229<td width='50%'><input type='text' name='age'></td>
230</tr>
231<tr>
232<td width='50%'><b></b></td>
233<td width='50%'><input type='submit' value='Register An <?=$servername?> Account'></td>
234</tr>
235</table>";
236?>
237<br>
238<!-- No You Cant Remove It. -->
239<font size="3">Copyright 2009~2010 WizKid , Kyuma And gWX0 - <?=$servername?> </font>
240<!-- See? -->
241</center>
242</body>
243</html></div>
244</select>
245</form>
246</table>
247</div>
248</body>
249</html>
250<head>
251
252<script language="JavaScript"> <!--
253// No RightClick Script v.0.5
254// (C) 2009~2010 Kyuma
255// Kyuma09@hotmail.com Or kyuma@legendarygamerz.com
256// Don't Delete This Header!
257
258var message="Get The Fuck Off"; // Message For The Alert Box
259
260// Don't Edit Below!
261
262function click(e) {
263if (document.all) {
264if (event.button == 2) {
265alert(message);
266return false;
267}
268}
269if (document.layers) {
270if (e.which == 3) {
271alert(message);
272return false;
273}
274}
275}
276if (document.layers) {
277document.captureEvents(Event.MOUSEDOWN);
278}
279document.onmousedown=click;
280// --> </script>