Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Fairy Quest - Register</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Cuprum">
- <link rel="stylesheet" type="text/css" href="clouds.css">
- <link rel="stylesheet" href="textbox2.css"/>
- <link rel="stylesheet" href="style.css"/>
- <style>
- body {
- background: rgb(17,17,17) url('pictures/bg-clouds.png') no-repeat center/cover;
- width: 100%;
- bottom: 0;
- right: 0;
- z-index: -1;
- -webkit-animation: clouds 30s infinite linear;
- -moz-animation: clouds 30s infinite linear;
- -o-animation: clouds 30s infinite linear;
- animation: clouds 30s infinite linear;
- }
- .submitButton
- {
- font-size: 15px;
- width: 395px;
- height: 40px;
- cursor: pointer;
- }
- button {
- font-family: 'cuprum', sans-serif;
- font-weight: bold;
- text-transform: uppercase;
- color: #fff;
- font-size: 18px;
- background-color: #666;
- padding: 10px;
- border:3px solid #515151;
- cursor: pointer;
- padding: 8px 0 0 0;
- padding: 2px 0 0 0;
- }
- .username {
- position: relative;
- color: #181818;
- font-size: 16px;
- height: 40px;
- }
- .username input {
- width: 395px;
- height: 35px;
- font-family: 'Cuprum', sans-serif;
- color: #181818;
- font-weight: bold;
- background: #fcfcfc;
- border: 1px solid #aaa;
- border-radius: 5px;
- box-shadow: 0 0 3px #ccc, 0 10px 15px #ebebeb inset;
- }
- .username input { text-indent: 32px;}
- .username .fa-user {
- position: absolute;
- top: 10px;
- left: 10px;
- }
- div.register {
- font-family: 'Cuprum', sans-serif;
- font-weight: bold;
- margin: auto;
- top: 0; left: 0; bottom: 0; right: 0;
- border: 1px solid black;
- background-color: #181818;
- position: absolute;
- width: 50%;
- height: 68%;
- overflow: hidden;
- min-width: 200px;
- max-width: 400px;
- padding: 10px 15px 20px 15px;
- box-shadow: inset 0 -10px #9A312D;
- }
- div.register h2{
- color: #fff;
- font-size: 30px;
- margin: 0 0 0px 1px;
- }
- div.register p {
- font-family: "Cuprum", sans-serif;
- font-weight: bold;
- color: #fff;
- margin: 0 0 0px 0px;
- padding: 0%;
- font-size: 15px;
- }
- .key2 {
- position: relative;
- color: #181818;
- font-size: 16px;
- height: 40px;
- }
- .key2 input {
- width: 195px;
- height: 35px;
- background: #fcfcfc;
- border: 1px solid #aaa;
- border-radius: 5px;
- box-shadow: 0 0 3px #ccc, 0 10px 15px #ebebeb inset;
- }
- .key2 input { text-indent: 32px;}
- .key2 .fa-key {
- position: absolute;
- top: 10px;
- left: 10px;
- }
- .right {
- float: right;
- }
- .clear { clear: both; }
- .left {
- float: left;
- }
- /* -------------------- Page Styles (not required) */
- /* -------------------- Select Box Styles: bavotasan.com Method (with special adaptations by ericrasch.com) */
- /* -------------------- Source: http://bavotasan.com/2011/style-select-box-using-only-css/ */
- .styled-select {
- background: url(http://i62.tinypic.com/15xvbd5.png) no-repeat 96% 0;
- height: 29px;
- overflow: hidden;
- width: 240px;
- }
- .styled-select select {
- background: transparent;
- border: none;
- font-size: 14px;
- height: 29px;
- padding: 5px; /* If you add too much padding here, the options won't show in IE */
- width: 268px;
- }
- .styled-select.slate {
- background: url(http://i62.tinypic.com/2e3ybe1.jpg) no-repeat right center;
- height: 34px;
- width: 240px;
- }
- .styled-select.slate select {
- border: 1px solid #ccc;
- font-size: 16px;
- height: 34px;
- width: 268px;
- }
- /* -------------------- Rounded Corners */
- .rounded {
- -webkit-border-radius: 20px;
- -moz-border-radius: 20px;
- border-radius: 20px;
- }
- .semi-square {
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- }
- /* -------------------- Colors: Background */
- .slate { background-color: #ddd; }
- .green { background-color: #779126; }
- .blue { background-color: #3b8ec2; }
- .yellow { background-color: #eec111; }
- .black { background-color: #000; }
- /* -------------------- Colors: Text */
- .slate select { color: #000; }
- .green select { color: #fff; }
- .blue select { color: #fff; }
- .yellow select { color: #000; }
- .black select { color: #fff; }
- /* -------------------- Select Box Styles: danielneumann.com Method */
- /* -------------------- Source: http://danielneumann.com/blog/how-to-style-dropdown-with-css-only/ */
- #mainselection select {
- border: 0;
- color: #EEE;
- background: transparent;
- font-size: 20px;
- font-weight: bold;
- padding: 2px 10px;
- width: 378px;
- *width: 350px;
- *background: #58B14C;
- -webkit-appearance: none;
- }
- #mainselection {
- overflow:hidden;
- width:350px;
- -moz-border-radius: 9px 9px 9px 9px;
- -webkit-border-radius: 9px 9px 9px 9px;
- border-radius: 9px 9px 9px 9px;
- box-shadow: 1px 1px 11px #330033;
- background: #58B14C url("http://i62.tinypic.com/15xvbd5.png") no-repeat scroll 319px center;
- }
- /* -------------------- Select Box Styles: stackoverflow.com Method */
- /* -------------------- Source: http://stackoverflow.com/a/5809186 */
- select#soflow, select#soflow-color {
- -webkit-appearance: button;
- -webkit-border-radius: 2px;
- -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
- -webkit-padding-end: 20px;
- -webkit-padding-start: 2px;
- -webkit-user-select: none;
- background-image: url(http://i62.tinypic.com/15xvbd5.png), -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
- background-position: 97% center;
- background-repeat: no-repeat;
- border: 1px solid #AAA;
- color: #555;
- font-size: inherit;
- margin: 0 3px 5px 0;
- overflow: hidden;
- padding: 10px 10px;
- text-overflow: ellipsis;
- white-space: nowrap;
- width: 127px;
- }
- select#soflow-color {
- color: #fff;
- background-image: url(http://i62.tinypic.com/15xvbd5.png), -webkit-linear-gradient(#779126, #779126 40%, #779126);
- background-color: #779126;
- -webkit-border-radius: 20px;
- -moz-border-radius: 20px;
- border-radius: 20px;
- padding-left: 15px;
- }
- textarea {
- font-family: 'Cuprum', sans-serif;
- width: 95%;
- height: 200px;
- padding: 12px 12px;
- box-sizing: border-box;
- border: 2px solid #ccc;
- border-radius: 4px;
- background-color: #f8f8f8;
- font-size: 16px;
- resize: none;
- }
- .alert {
- margin-bottom: 10px;
- border: 1px solid transparent;
- border-radius: 5px;
- }
- .danger-alert {
- padding: 20px;
- background-color: #f2dede;
- border-color: #ebccd1;
- color: #a94442;
- width: 970px;
- }
- .success-alert {
- padding: 20px;
- background-color: #dff0d8;
- border-color: #d6e9c6;
- color: #3c763d;
- width: 970px;
- }
- .closebtn {
- margin-left: 15px;
- color: white;
- font-weight: bold;
- float: right;
- font-size: 22px;
- line-height: 20px;
- cursor: pointer;
- transition: 0.3s;
- }
- .closebtn:hover {
- color: black;
- }
- </style>
- <script type="text/javascript">
- function checkForm(form)
- {
- ...
- if(!form.terms.checked) {
- alert("Please indicate that you accept the Terms and Conditions");
- form.terms.focus();
- return false;
- }
- return true;
- }
- </script>
- <script>
- function validatePassword() {
- var newusername,newPassword,confirmPassword,output = true;
- newusername = document.frmPasswordChange.newusername;
- newPassword = document.frmPasswordChange.newPassword;
- confirmPassword = document.frmPasswordChange.confirmPassword;
- if(!newusername.value) {
- newusername.focus();
- document.getElementById("newusername").innerHTML = "<font color='red'> Required</font>";
- output = false;
- }
- else if(!newPassword.value) {
- newPassword.focus();
- document.getElementById("newPassword").innerHTML = "<font color='red'> Required</font>";
- output = false;
- }
- else if(!confirmPassword.value) {
- confirmPassword.focus();
- document.getElementById("confirmPassword").innerHTML = "<font color='red'> Required</font>";
- output = false;
- }
- if(newPassword.value != confirmPassword.value) {
- newPassword.value="";
- confirmPassword.value="";
- newPassword.focus();
- document.getElementById("confirmPassword").innerHTML = "<font color='red'> Not Same</font>";
- output = false;
- }
- return output;
- }
- </script>
- </head>
- <body>
- </div>
- <?php
- $connection = mysql_connect("localhost", "root", "") or die("Failed to connect to MySQL: " . mysql_error());
- $db = mysql_select_db("fairytailquest", $connection) or die("Failed to connect to MySQL: " . mysql_error());
- $ip = $_SERVER['REMOTE_ADDR'];
- if(isset($_POST["submit1"])) {
- $username = mysql_escape_string($_POST['newign']);
- function gen_token($pass, $salt) {
- $salt = strtolower($salt);
- $str = hash("sha512", $pass.$salt);
- $len = strlen($salt);
- return strtoupper(substr($str, $len, 17));
- }
- $password = gen_token(mysql_escape_string($_POST['newPassword']), $username);
- $date=$_POST['type3'] . '-' . $_POST['type1'] . '-' . $_POST['type2'];
- $email = mysql_escape_string($_POST['newEmail']);
- $emailcheck = "SELECT id FROM meh_users WHERE Email='$email'";
- $result = mysql_query($emailcheck) or die (mysql_error());
- if (mysql_num_rows($result) > 0) {
- die("<div class='alert danger-alert'>
- <strong>The Email is Already Registered. Please refresh your browser or wait 3 sec to refresh<script type='text/javascript' language='JavaScript'>
- setTimeout(function () { location.href = 'register.php';
- }, 3000);
- </script>");
- }
- $usercheck = "SELECT id FROM meh_users WHERE Username = '$username'";
- $result = mysql_query($usercheck) or die (mysql_error());
- if (mysql_num_rows($result) > 0) {
- die("<div class='alert danger-alert'>
- <strong>The Username is Already Registered. Please refresh your browser or wait 3 sec to refresh<script type='text/javascript' language='JavaScript'>
- setTimeout(function () { location.href = 'register.php';
- }, 3000);
- </script>");
- }
- if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
- $query = "INSERT INTO meh_users(Username, Password, Access, ActivationFlag, Age, Gender, Email, Level, Gold, Coins, Exp, ColorHair, ColorSkin, ColorEye, ColorBase, ColorTrim, ColorAccessory, DateCreated, UpgradeExpire, UpgradeDays, BankSlots, HouseSlots, BagSlots, HairID, HairFile, HairName, Permamute, Quests, Settings, Achievement, LastArea, Country, GuildID, AchievementID, CurrentServer, Address) VALUES ('$username', '$password', '1', '5', '11', '".mysql_escape_string($_POST["gender"])."', '$email', '1', '10000', '2000', '0', '6180663', '15388042', '91294', '0', '0', '0', '2011-05-23 21:02:33', '2011-05-23 21:02:33', '9999', '0', '20', '80', '52', 'hair/M/Default.swf', 'Default', '0', '00000000000000000000000000000000000000000000000000', '0', '0', '', 'US', '0', '', 'Offline', '$ip')";
- if($result1 = mysql_query($query))
- {
- $username = mysql_escape_string($_POST['newign']);
- $idcheck = "SELECT id FROM meh_users WHERE Username= '$username'";
- $result = mysql_query($idcheck) or die(mysql_error());
- $row = mysql_fetch_assoc($result);
- $userid = $row['id'];
- $query2 = mysql_query("INSERT into meh_users_items (itemid, userid, equipped, equipment, level, quantity) values ('2','$userid', '1', 'ar', '1', '0' )") or die (mysql_error());
- $query3 = mysql_query("INSERT INTO meh_users_items(itemid, userid, equipped, equipment, level) VALUES ('1', '$userid', '1', 'Weapon', '1')") or die (mysql_error());
- $query4 = mysql_query("INSERT INTO meh_users_friends (userid) VALUES ('$userid')") or die (mysql_error());
- }
- echo("<div class='alert success-alert'>
- <strong>Registration Completed , Please Click <a href='/'>Here</a> To Play !!</strong></div>");
- } else {
- echo("<div class='alert danger-alert'>
- <strong>The Email is Not Valid</strong></div>");
- }
- }
- ?>
- <div class="float">
- <div class="register">
- <form name="frmPasswordChange" method="post" onsubmit="return checkForm(this);">
- <div class="trans-title">Register An Account</div>
- <p>Hero Name / Ingame Name(IGN) : </span></p>
- <div class="username">
- <span class="fa fa-user"></span>
- <input type="text" name="newign" required/></div>
- <div class="left">
- <p>Password : <span id="newPassword" class="required"></span></p>
- <div class="key2">
- <span class="fa fa-key"></span>
- <input type="password" class="hai2" name="newPassword" /><br></div>
- </div>
- <div class="right">
- <p>Confirm Password : <span id="confirmPassword" class="required"></span></p>
- <div class="key2">
- <span class="fa fa-key"></span>
- <input type="password" class="hai2" name="confirmPassword"/><br></div>
- </div>
- <input type="radio" name="gender" value="Male" <?php if(isset($_POST['gender']) && $_POST['gender']=="M") { ?>checked<?php } ?> required> <font color="white">Male</font>
- <input type="radio" name="gender" value="Female" <?php if(isset($_POST['gender']) && $_POST['gender']=="F") { ?>checked<?php } ?> required> <font color="white">Female</font>
- <p>Email : <span id="newEmail" class="required"></span></p>
- <div class="username">
- <span class="fa fa-user"></span>
- <input type="text" name="newEmail" required /></div>
- <select name="type1" id="soflow" required>
- <option value="">Month</option>
- <option value="01">January</option>
- <option value="02">Febuary</option>
- <option value="03">March</option>
- <option value="04">April</option>
- <option value="05">May</option>
- <option value="06">June</option>
- <option value="07">July</option>
- <option value="08">August</option>
- <option value="09">September</option>
- <option value="10">October</option>
- <option value="11">November</option>
- <option value="12">December</option>
- </select>
- <select name="type2" id="soflow" required>
- <option value="">Day</option>
- <option>1</option>
- <option>2</option>
- <option>3</option>
- <option>4</option>
- <option>5</option>
- <option>6</option>
- <option>7</option>
- <option>8</option>
- <option>9</option>
- <option>10</option>
- <option>11</option>
- <option>12</option>
- <option>13</option>
- <option>14</option>
- <option>15</option>
- <option>16</option>
- <option>17</option>
- <option>18</option>
- <option>19</option>
- <option>20</option>
- <option>21</option>
- <option>22</option>
- <option>23</option>
- <option>24</option>
- <option>25</option>
- <option>26</option>
- <option>27</option>
- <option>28</option>
- <option>29</option>
- <option>30</option>
- <option>31</option>
- </select>
- <select name="type3" id="soflow" required>
- <option value="">Year</option>
- <option>2005</option>
- <option>2004</option>
- <option>2003</option>
- <option>2002</option>
- <option>2001</option>
- <option>2000</option>
- <option>1999</option>
- <option>1998</option>
- <option>1997</option>
- <option>1996</option>
- <option>1995</option>
- <option>1994</option>
- <option>1993</option>
- <option>1992</option>
- <option>1991</option>
- <option>1990</option>
- <option>1989</option>
- <option>1988</option>
- <option>1987</option>
- <option>1986</option>
- <option>1985</option>
- <option>1984</option>
- <option>1983</option>
- <option>1982</option>
- <option>1981</option>
- <option>1980</option>
- <option>1979</option>
- <option>1978</option>
- <option>1977</option>
- <option>1976</option>
- <option>1975</option>
- </select>
- <p><input type="checkbox" required onchange="this.setCustomValidity(validity.valueMissing ? 'Please indicate that you accept the Terms and Conditions' : '');" id="field_terms" name="terms">I Accept Terms and Conditions</p>
- <button type="submit" class="submitbutton" name="submit1" onclick="return validatePassword()"/>Register Now <span class="fa fa-arrow-circle-right"></span></button>
- <script type="text/javascript">
- document.getElementById("field_terms").setCustomValidity("Please indicate that you accept the Terms and Conditions");
- </script>
- </form>
- <p style="font-size: 13px;">Note: Once you notice a bug / error in the register system please the contact the page as soon as possible..</p>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement