<!--BEGIN CUSTOM HTML CODE-->
<script type=text/javascript>
var msg = "Right click disabled !"
if(document.layers) window.captureEvents(Event.MOUSEDOWN);
function no_click(e){
if (navigator.appName == 'Netscape' && ( e.which == 2 || e.which == 3))
{
alert(msg);return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
{
alert(msg);return false;
}
}
window.onmousedown=no_click;
document.onmousedown=no_click; </script>
<div align="center">
<p><strong><font color="#FFFFFF"></font></strong></p>
<p>
<?php
/*
This script was written by Wizkid.
All rights reserved. Any support can be requested via RageZone.
You're allowed to edit this script and modify the template.
However, you are NOT allowed to remove and/or edit my copyright.
Removing this copyright will be your death.
*/
//Edit to fit YOUR requirements.
$servername = "Abused-GunZ";
$accounttable = "Account";
$logintable = "Login";
//Edit these variables. If not, no regpage for you. (Or you're fuxpro with the same logins as me.)
$host = "host";
$user = "user";
$pass = "pass";
$dbname = "GunzDB";
$connect = odbc_connect("Driver={SQL Server};Server={$host}; Database={$dbname}", $user, $pass) or die("Can't connect the MSSQL server.");
//The well-known antisql injection. Bad enough, it's needed.
function antisql($sql) {
return ( str_replace( "'", "''", $sql ) );
}
//My favorite function. Get The **** Off. (Nothing personally :].)
function gtfo($wut) {
echo "<center><table width='500' cellpadding='5' cellspacing='0' border='0' style='border: 1px ;'>
<tr>
<td align=center width='100%' style='border-bottom: 1px solid black;'><b>Message</b></td>
</tr>
<tr>
<td width='100%'><center>$wut</center></td>
</tr>
</table>";
die();
}
//Check email function. This to prevent fake emails. (Remember the time YOU doing that?)
function checkemail($address) {
list($local, $host) = explode("@", $address);
$pattern_local = "^([0-9a-z]*([-|_]?[0-9a-z]+)*)(([-|_]?)\.([-|_]?)[0-9a-z]*([-|_]?[0-9a-z]+)+)*([-|_]?)$";
$pattern_host = "^([0-9a-z]+([-]?[0-9a-z]+)*)(([-]?)\.([-]?)[0-9a-z]*([-]?[0-9a-z]+)+)*\.[a-z]{2,4}$";
$match_local = eregi($pattern_local, $local);
$match_host = eregi($pattern_host, $host);
if($match_local && $match_host) {
return 1;
}
else {
return 0;
}
}
//The num_rows() function for ODBC since the default one always returns -1.
function num_rows(&$rid) {
//We can try it at least, right?
$num= odbc_num_rows($rid);
if ($num >= 0) {
return $num;
}
if (!odbc_fetch_row($rid, 1)) {
odbc_fetch_row($rid, 0);
return 0;
}
if (!odbc_fetch_row($rid, 2)) {
odbc_fetch_row($rid, 0);
return 1;
}
$lo= 2;
$hi= 8192000;
while ($lo < ($hi - 1)) {
$mid= (int)(($hi + $lo) / 2);
if (odbc_fetch_row($rid, $mid)) {
$lo= $mid;
} else {
$hi= $mid;
}
}
$num= $lo;
odbc_fetch_row($rid, 0);
return $num;
}
?>
<html>
<title>Abused-GunZ</title>
<head>
</p>
</div>
</head>
<body>
<center>
<?php
//Oh well. Let's create the variable $ip to start with.
$ip = antisql($_SERVER['REMOTE_ADDR']);
/*
An extra feature. This is NOT enabled before you remove this + the comment thingy's.
To ban 1 IP it will be:
if ($ip == "xxxxxx")
{
gtfo("Your IP is blacklisted.");
}
For multiple IP's, use this way:
if ($ip == "xxxxxx" OR $ip == "xxxxxx")
{
gtfo("Your IP is blacklisted.");
}
*/
//Get the AID out of the Login table (defined at the top of this file) where LastIP is the visitors IP.
$query1 = odbc_exec($connect,"SELECT AID FROM $logintable WHERE LastIP = '$ip'");
//Understable for the real people. Editing this without knowledge will be the death of your regpage.
$i=1;
while (odbc_fetch_row($query1, $i)){
$aid = odbc_result($query1, 'AID');
$query2 = odbc_exec($connect,"SELECT UGradeID FROM $accounttable WHERE AID = '$aid'");
odbc_fetch_row($query2);
$ugradeid = odbc_result($query2, 1);
if ($ugradeid == "253")
{
//Get the **** off.
gtfo("You're account is banned!");
}
$i++;
}
$rofltown = odbc_exec($connect, "SELECT CID, Name FROM Character WHERE AID = '1' AND CharNum != '-1'");
?>
<select name="charlist">
<?
while( $char = odbc_fetch_array($rofltown) )
{
echo "<option value=\"$char[CID]\">$char[Name]</option>\n";
}
?>
</select>
<br>
<font size="1">Copyright © 2010 Wizkid & Abused Gamers - All rights reserved.</font>
</center>
</html>
<!--END CUSTOM HTML CODE-->