Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require "mysql.php";
- require "global_func.php";
- print <<<EOF
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <script language="JavaScript">
- <!--
- function getCookieVal (offset) {
- var endstr = document.cookie.indexOf (";", offset);
- if (endstr == -1)
- endstr = document.cookie.length;
- return unescape(document.cookie.substring(offset, endstr));
- }
- function GetCookie (name) {
- var arg = name + "=";
- var alen = arg.length;
- var clen = document.cookie.length;
- var i = 0;
- while (i < clen) {
- var j = i + alen;
- if (document.cookie.substring(i, j) == arg)
- return getCookieVal (j);
- i = document.cookie.indexOf(" ", i) + 1;
- if (i == 0) break;
- }
- return null;
- }
- function SetCookie (name,value,expires,path,domain,secure) {
- document.cookie = name + "=" + escape (value) +
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
- }
- function DeleteCookie (name,path,domain) {
- if (GetCookie(name)) {
- document.cookie = name + "=" +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- "; expires=Thu, 01-Jan-70 00:00:01 GMT";
- }
- }
- // -->
- </script>
- <script language="JavaScript">
- var usr;
- var pw;
- var sv;
- function getme()
- {
- usr = document.login.username;
- pw = document.login.password;
- sv = document.login.save;
- if (GetCookie('player') != null)
- {
- usr.value = GetCookie('username')
- pw.value = GetCookie('password')
- if (GetCookie('save') == 'true')
- {
- sv[0].checked = true;
- }
- }
- }
- function saveme()
- {
- if (usr.value.length != 0 && pw.value.length != 0)
- {
- if (sv[0].checked)
- {
- expdate = new Date();
- expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000));
- SetCookie('username', usr.value, expdate);
- SetCookie('password', pw.value, expdate);
- SetCookie('save', 'true', expdate);
- }
- if (sv[1].checked)
- {
- DeleteCookie('username');
- DeleteCookie('password');
- DeleteCookie('save');
- }
- }
- else
- {
- alert('You must enter a username/password.');
- return false;
- }
- }
- </script>
- </head>
- <head>
- <!--
- SEO Requirements
- -->
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="description" content="Massive online multiplayer text based RPG game. Gangster warfare at its best.">
- <meta name="keywords" content="rpg games, fun games, online rpg, multiplayer games, play free game, free rpg, rpg game, online mmorpg, mmorpg games, fun game">
- <meta name="robots" content="index,follow" />
- <meta name="author" content="Dragon Blade">
- <link href="css/style.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- <!--
- @import url("css/layout.css");
- -->
- </style>
- <title>LostNation</title>
- </head>
- <div id="wrapper" class="bg7">
- <div class="bg8">
- <div id="wrapperA"></div>
- <div class="content">
- <div id="header">
- <div id="logo">
- <h1>LostNation</h1>
- <h2> </h2>
- </div>
- <div id="splash">
- <h3> </h3>
- </div>
- </div>
- <div id="mainmenu" class="bg3" style="margin-left: 15px;">
- <ul>
- <li><a href="login.php" id="mainmenu1" accesskey="1" title="" class="link1">Home</a></li>
- <li><a href="news.php" id="mainmenu2" accesskey="2" title="" class="link1 vline">News</a></li>
- <li><a href="reviews.php" id="mainmenu3" accesskey="3" title="" class="link1 vline">Reviews</a></li>
- <li><a href="articles.php" id="mainmenu4" accesskey="4" title="" class="link1 vline">Articles</a></li>
- <li><a href="details.php" id="mainmenu5" accesskey="5" title="" class="link1 vline">Staff</a></li>
- <li><a href="contact.php" id="mainmenu6" accesskey="6" title="" class="link1 vline">Contact</a></li>
- </ul>
- <p class="text1" style="width: 200px; float: right; margin: 0px 15px 0 0;"><script language="JavaScript" type="text/javascript" src="date.js"></script></p>
- </div>
- <!-- Begin Main Content -->
- <div class="two-col">
- <div class="colA">
- <div id="box1">
- <h2 class="text2 title1">LostNation Links</h2>
- <ul class="ul1">
- <li><span class="bbit-li-info"><a href="login.php">Login</a></span></li>
- <li><span class="bbit-li-info"><a href="register.php">Register</a></span></li>
- <li><span class="bbit-li-info"><a href="resend.php">Lost Password</a></span></li>
- <li><span class="bbit-li-info"><a href="tos.php">Terms of Service</a></span></li>
- <li><span class="bbit-li-info"><a href="policy.php">Privacy Policy</a></span></li>
- <li><span class="bbit-li-info"><a href="preview.php">Preview</a></span></li>
- </ul>
- <div class="boxfoot">
- <!-- # -->
- </div>
- </div>
- </div>
- <div class="colB">
- <div id="box5">
- <div class="notice-donate">LostNation Registration</div>
- EOF;
- $ip = ($_SERVER['REMOTE_ADDR']);
- if (file_exists('ipbans/' . $ip)) {
- die(
- "<b><span style='color: red; font-size: 120%'>
- Your IP has been banned, there is no way around this.
- </span></b>
- </body></html>");
- }
- if ($_POST['username']) {
- if (!$_SESSION['captcha'] or $_SESSION['captcha'] != $_POST['captcha']) {
- unset($_SESSION['captcha']);
- print "Captcha Test Failed
- ><a href='register.php'>Back</a>";
- exit();
- }
- unset($_SESSION['captcha']);
- }
- if ($_POST['username']) {
- $sm = 100;
- if ($_POST['promo'] == "Your Promo Code Here") {
- $sm += 100;
- }
- $class = mysql_query("SELECT className, money, crystals, strength, guard, agility, iq, labor FROM player_class WHERE classID = {$_POST['classID']}");
- if (mysql_num_rows($class)) {
- $c = mysql_fetch_array($class);
- $money = $c["money"] + $sm;
- $crystals = $c["crystals"];
- $strength = $c["strength"];
- $guard = $c["guard"];
- $agility = $c["agility"];
- $iq = $c["iq"];
- $labor = $c["labor"];
- } else {
- $crystals = 10;
- $strength = 10;
- $guard = 10;
- $agility = 10;
- $iq = 10;
- $labor = 10;
- }
- $username = $_POST['username'];
- $username = str_replace(array("<", ">"), array("<", ">"), $username);
- $q = mysql_query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'");
- $q2 = mysql_query("SELECT * FROM users WHERE email='{$_POST['email']}'");
- if (strlen($_POST['username']) < 6) {
- print "Sorry, the username is too short.
- ><a href='register.php'>Back</a>";
- } else if (strlen($_POST['username']) > 15) {
- print "Sorry, the username is too large.
- ><a href='register.php'>Back</a>";
- } else if (mysql_num_rows($q)) {
- print "Username already in use. Choose another.
- ><a href='register.php'>Back</a>";
- } else if (!preg_match("/^[ a-zA-Z0-9]*$/", trim($_POST['username']))) {
- print "Your username contained characters that aren't allowed. Only A-Z, 0-9 and spaces accepted.
- ><a href='register.php'>Back</a>";
- } else if (mysql_num_rows($q2)) {
- print "E-Mail already in use. Choose another.
- ><a href='register.php'>Back</a>";
- } else if (strlen($_POST['password']) < 6) {
- print "Your password is too small.
- ><a href='register.php'>Back</a>";
- } else if ($_POST['password'] != $_POST['cpassword']) {
- print "The passwords did not match, go back and try again.
- ><a href='register.php'>Back</a>";
- } else {
- $_POST['ref'] = abs((int) $_POST['ref']);
- $IP = $_SERVER['REMOTE_ADDR'];
- $q = mysql_query("SELECT * FROM users WHERE lastip='$IP' AND userid={$_POST['ref']}");
- if (mysql_num_rows($q)) {
- die("No creating referral multies. Bad dog.
- ><a href='register.php'>Back</a>");
- }
- if ($_POST['ref'] > 0) {
- $ref = mysql_query("SELECT * FROM users WHERE userid={$_POST['ref']}");
- if (!mysql_num_rows($ref)) {
- die("Your adding a non existent refer
- ><a href='register.php'>Back</a>");
- }
- }
- $r = mysql_fetch_array($q);
- }
- mysql_query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill,
- brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup,player_class) VALUES( '{$username}', '{$username}',
- md5('{$_POST['password']}'), 1, $money, $crystals, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}',
- -1, '$IP', '$IP','{$_POST['classID']}')");
- $i = mysql_insert_id($c);
- mysql_query(
- "INSERT INTO userstats VALUES($i, $strength, $agility, $guard, $labor, $iq)", $c);
- if ($_POST['ref']) {
- mysql_query(
- "UPDATE `users`
- SET `crystals` = `crystals` + 2
- WHERE `userid` = {$_POST['ref']}");
- event_add($_POST['ref'], "For refering $username to the game, you have earnt 2 valuable crystals!", $c);
- $e_rip = mysql_real_escape_string($rem_IP, $c);
- $e_oip = mysql_real_escape_string($ip, $c);
- mysql_query(
- "INSERT INTO `referals`
- VALUES(NULL, {$_POST['ref']}, $i, " . time()
- . ", '{$e_rip}', '$e_oip')", $c);
- }
- print
- "You have signed up, enjoy the game.
- > <a href='login.php'>Login</a>";
- } else {
- $gref = abs((int) $_GET['REF']);
- $fref = $gref ? $gref : '';
- $chars =
- "1234567890";
- $len = strlen($chars);
- $_SESSION['captcha'] = "";
- for ($i = 0; $i < 4; $i++)
- $_SESSION['captcha'] .= $chars[rand(0, $len - 1)];
- echo"
- <center><div style='background-color:#222222; text-align: left; color:white; padding-left: 10px; width:75%; border:1px solid #EEEEEE'>
- <small><b><h3><u><b>Register:</b></u></h3>
- Its never been easier to sign up and register an account.
- Registration is free and within just a few minutes you can being joining the ultimate RPG gaming experience.Just complete the fields below.
- Fields marked <font size = 3 color = red>*</font> are to be completed:
- </div>
- </center>
- <form action='register.php' method='post'>
- <table width='75%' class='table' cellspacing='1'>
- <tr>
- <td><font color = red>*</font> Username:</td><td><center><input type='text' name='username' /></center></td>
- </tr>
- <tr>
- <td><font color = red>*</font> Password:</td><td><center><input type='password' name='password' /></center></td>
- </tr>
- <tr>
- <td><font color = red>*</font> Confirm Password:</td><td><center><input type='password' name='cpassword' /></center></td>
- </tr>
- <tr>
- <td><font color = red>*</font> Email:</td><td><center><input type='text' name='email' /></center></td>
- </tr>
- <tr>
- <td><font color = red>*</font> Confirm Email:</td><td><center><input type='text' name='cemail' /></center></td>
- </tr>
- <tr>
- <td>Promo Code:</td><td><center><input type='text' name='promo' /></center></td>
- </tr>
- <tr>
- <td>Player Class:</td><td><center>" . class_dropdown(NULL, "classID") . "</td></center>
- </tr>
- <tr>
- <td><img src='captcha.php?bgcolor=C3C3C3' width='200' height='50' /></td><td><input type='text' name='captcha' /></td>
- </tr>
- <tr>
- <td colspan= '2'><center><input type='submit' value='Submit' /></center></td>
- </form></table>
- <center><div style='background-color:#222222; text-align: left; color:white; padding-left: 10px; width:75%; border:1px solid #EEEEEE'>
- <small><b><h3><u><b>Disclaimer:</b></u></h3>When registering an account you accept all Terms of Service & Privacy Policy. In addition you are required to comply with all ingame rules. If you disagree with any of the Terms of Service / Privacy Policy or Game Rules at anytime you should terminate all use of your account and contact accounts@LostNation.net and request that your account be deleted.
- </div>
- </center>
- <hr width = 75%><center>> <a href='login.php'>Login</a><hr width = 75%></center>";
- }
- print '
- </div>
- </div>
- </div>
- <div id="login-wrapperB" $ie6_fix></div>
- <br style="clear: both;" />
- </div>
- </div>
- </div>
- <div id="footer"><p class="style2">Game Copyright ©{$year} Dragon Blade. All rights reserved worldwide.</center></i></p></div>
- </div>
- </body>
- </html>
- ';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement