Advertisement
Guest User

Untitled

a guest
Nov 1st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.74 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Fairy Quest - Register</title>
  4.  
  5. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  6. <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  7. <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Cuprum">
  8. <link rel="stylesheet" type="text/css" href="clouds.css">
  9. <link rel="stylesheet" href="textbox2.css"/>
  10.  
  11. <link rel="stylesheet" href="style.css"/>
  12. <style>
  13. body {
  14. background: rgb(17,17,17) url('pictures/bg-clouds.png') no-repeat center/cover;
  15. width: 100%;
  16. bottom: 0;
  17. right: 0;
  18. z-index: -1;
  19.  
  20. -webkit-animation: clouds 30s infinite linear;
  21. -moz-animation: clouds 30s infinite linear;
  22. -o-animation: clouds 30s infinite linear;
  23. animation: clouds 30s infinite linear;
  24. }
  25. .submitButton
  26. {
  27. font-size: 15px;
  28. width: 395px;
  29. height: 40px;
  30. cursor: pointer;
  31. }
  32. button {
  33. font-family: 'cuprum', sans-serif;
  34. font-weight: bold;
  35. text-transform: uppercase;
  36. color: #fff;
  37. font-size: 18px;
  38. background-color: #666;
  39. padding: 10px;
  40. border:3px solid #515151;
  41. cursor: pointer;
  42. padding: 8px 0 0 0;
  43. padding: 2px 0 0 0;
  44.  
  45. }
  46. .username {
  47. position: relative;
  48. color: #181818;
  49. font-size: 16px;
  50. height: 40px;
  51. }
  52.  
  53.  
  54. .username input {
  55. width: 395px;
  56. height: 35px;
  57. font-family: 'Cuprum', sans-serif;
  58. color: #181818;
  59. font-weight: bold;
  60. background: #fcfcfc;
  61. border: 1px solid #aaa;
  62. border-radius: 5px;
  63. box-shadow: 0 0 3px #ccc, 0 10px 15px #ebebeb inset;
  64. }
  65.  
  66. .username input { text-indent: 32px;}
  67.  
  68. .username .fa-user {
  69. position: absolute;
  70. top: 10px;
  71. left: 10px;
  72. }
  73. div.register {
  74. font-family: 'Cuprum', sans-serif;
  75. font-weight: bold;
  76. margin: auto;
  77. top: 0; left: 0; bottom: 0; right: 0;
  78. border: 1px solid black;
  79. background-color: #181818;
  80.  
  81. position: absolute;
  82. width: 50%;
  83. height: 68%;
  84. overflow: hidden;
  85. min-width: 200px;
  86. max-width: 400px;
  87. padding: 10px 15px 20px 15px;
  88. box-shadow: inset 0 -10px #9A312D;
  89. }
  90. div.register h2{
  91. color: #fff;
  92. font-size: 30px;
  93. margin: 0 0 0px 1px;
  94.  
  95. }
  96. div.register p {
  97. font-family: "Cuprum", sans-serif;
  98. font-weight: bold;
  99. color: #fff;
  100. margin: 0 0 0px 0px;
  101. padding: 0%;
  102. font-size: 15px;
  103.  
  104. }
  105. .key2 {
  106. position: relative;
  107. color: #181818;
  108. font-size: 16px;
  109. height: 40px;
  110.  
  111. }
  112.  
  113.  
  114. .key2 input {
  115. width: 195px;
  116. height: 35px;
  117.  
  118. background: #fcfcfc;
  119. border: 1px solid #aaa;
  120. border-radius: 5px;
  121. box-shadow: 0 0 3px #ccc, 0 10px 15px #ebebeb inset;
  122. }
  123.  
  124. .key2 input { text-indent: 32px;}
  125.  
  126. .key2 .fa-key {
  127. position: absolute;
  128. top: 10px;
  129. left: 10px;
  130. }
  131. .right {
  132. float: right;
  133. }
  134. .clear { clear: both; }
  135. .left {
  136. float: left;
  137. }
  138. /* -------------------- Page Styles (not required) */
  139.  
  140.  
  141. /* -------------------- Select Box Styles: bavotasan.com Method (with special adaptations by ericrasch.com) */
  142. /* -------------------- Source: http://bavotasan.com/2011/style-select-box-using-only-css/ */
  143. .styled-select {
  144. background: url(http://i62.tinypic.com/15xvbd5.png) no-repeat 96% 0;
  145. height: 29px;
  146. overflow: hidden;
  147. width: 240px;
  148. }
  149.  
  150. .styled-select select {
  151. background: transparent;
  152. border: none;
  153. font-size: 14px;
  154. height: 29px;
  155. padding: 5px; /* If you add too much padding here, the options won't show in IE */
  156. width: 268px;
  157. }
  158.  
  159. .styled-select.slate {
  160. background: url(http://i62.tinypic.com/2e3ybe1.jpg) no-repeat right center;
  161. height: 34px;
  162. width: 240px;
  163. }
  164.  
  165. .styled-select.slate select {
  166. border: 1px solid #ccc;
  167. font-size: 16px;
  168. height: 34px;
  169. width: 268px;
  170. }
  171.  
  172. /* -------------------- Rounded Corners */
  173. .rounded {
  174. -webkit-border-radius: 20px;
  175. -moz-border-radius: 20px;
  176. border-radius: 20px;
  177. }
  178.  
  179. .semi-square {
  180. -webkit-border-radius: 5px;
  181. -moz-border-radius: 5px;
  182. border-radius: 5px;
  183. }
  184.  
  185. /* -------------------- Colors: Background */
  186. .slate { background-color: #ddd; }
  187. .green { background-color: #779126; }
  188. .blue { background-color: #3b8ec2; }
  189. .yellow { background-color: #eec111; }
  190. .black { background-color: #000; }
  191.  
  192. /* -------------------- Colors: Text */
  193. .slate select { color: #000; }
  194. .green select { color: #fff; }
  195. .blue select { color: #fff; }
  196. .yellow select { color: #000; }
  197. .black select { color: #fff; }
  198.  
  199.  
  200. /* -------------------- Select Box Styles: danielneumann.com Method */
  201. /* -------------------- Source: http://danielneumann.com/blog/how-to-style-dropdown-with-css-only/ */
  202. #mainselection select {
  203. border: 0;
  204. color: #EEE;
  205. background: transparent;
  206. font-size: 20px;
  207. font-weight: bold;
  208. padding: 2px 10px;
  209. width: 378px;
  210. *width: 350px;
  211. *background: #58B14C;
  212. -webkit-appearance: none;
  213. }
  214.  
  215. #mainselection {
  216. overflow:hidden;
  217. width:350px;
  218. -moz-border-radius: 9px 9px 9px 9px;
  219. -webkit-border-radius: 9px 9px 9px 9px;
  220. border-radius: 9px 9px 9px 9px;
  221. box-shadow: 1px 1px 11px #330033;
  222. background: #58B14C url("http://i62.tinypic.com/15xvbd5.png") no-repeat scroll 319px center;
  223. }
  224.  
  225.  
  226. /* -------------------- Select Box Styles: stackoverflow.com Method */
  227. /* -------------------- Source: http://stackoverflow.com/a/5809186 */
  228. select#soflow, select#soflow-color {
  229. -webkit-appearance: button;
  230. -webkit-border-radius: 2px;
  231. -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  232. -webkit-padding-end: 20px;
  233. -webkit-padding-start: 2px;
  234. -webkit-user-select: none;
  235. background-image: url(http://i62.tinypic.com/15xvbd5.png), -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
  236. background-position: 97% center;
  237. background-repeat: no-repeat;
  238. border: 1px solid #AAA;
  239. color: #555;
  240. font-size: inherit;
  241. margin: 0 3px 5px 0;
  242. overflow: hidden;
  243. padding: 10px 10px;
  244. text-overflow: ellipsis;
  245. white-space: nowrap;
  246. width: 127px;
  247. }
  248.  
  249. select#soflow-color {
  250. color: #fff;
  251. background-image: url(http://i62.tinypic.com/15xvbd5.png), -webkit-linear-gradient(#779126, #779126 40%, #779126);
  252. background-color: #779126;
  253. -webkit-border-radius: 20px;
  254. -moz-border-radius: 20px;
  255. border-radius: 20px;
  256. padding-left: 15px;
  257. }
  258. textarea {
  259. font-family: 'Cuprum', sans-serif;
  260.  
  261. width: 95%;
  262. height: 200px;
  263. padding: 12px 12px;
  264. box-sizing: border-box;
  265. border: 2px solid #ccc;
  266. border-radius: 4px;
  267. background-color: #f8f8f8;
  268. font-size: 16px;
  269. resize: none;
  270. }
  271. .alert {
  272.  
  273. margin-bottom: 10px;
  274. border: 1px solid transparent;
  275. border-radius: 5px;
  276.  
  277. }
  278. .danger-alert {
  279. padding: 20px;
  280. background-color: #f2dede;
  281. border-color: #ebccd1;
  282. color: #a94442;
  283. width: 970px;
  284. }
  285.  
  286. .success-alert {
  287. padding: 20px;
  288. background-color: #dff0d8;
  289. border-color: #d6e9c6;
  290. color: #3c763d;
  291. width: 970px;
  292. }
  293. .closebtn {
  294. margin-left: 15px;
  295. color: white;
  296. font-weight: bold;
  297. float: right;
  298. font-size: 22px;
  299. line-height: 20px;
  300. cursor: pointer;
  301. transition: 0.3s;
  302. }
  303. .closebtn:hover {
  304. color: black;
  305. }
  306.  
  307.  
  308.  
  309. </style>
  310.  
  311. <script type="text/javascript">
  312.  
  313. function checkForm(form)
  314. {
  315. ...
  316. if(!form.terms.checked) {
  317. alert("Please indicate that you accept the Terms and Conditions");
  318. form.terms.focus();
  319. return false;
  320. }
  321. return true;
  322. }
  323.  
  324. </script>
  325. <script>
  326. function validatePassword() {
  327. var newusername,newPassword,confirmPassword,output = true;
  328.  
  329. newusername = document.frmPasswordChange.newusername;
  330. newPassword = document.frmPasswordChange.newPassword;
  331. confirmPassword = document.frmPasswordChange.confirmPassword;
  332.  
  333. if(!newusername.value) {
  334. newusername.focus();
  335. document.getElementById("newusername").innerHTML = "<font color='red'>&nbsp;Required</font>";
  336. output = false;
  337. }
  338. else if(!newPassword.value) {
  339. newPassword.focus();
  340. document.getElementById("newPassword").innerHTML = "<font color='red'>&nbsp;Required</font>";
  341. output = false;
  342. }
  343. else if(!confirmPassword.value) {
  344. confirmPassword.focus();
  345. document.getElementById("confirmPassword").innerHTML = "<font color='red'>&nbsp;Required</font>";
  346. output = false;
  347. }
  348. if(newPassword.value != confirmPassword.value) {
  349. newPassword.value="";
  350. confirmPassword.value="";
  351. newPassword.focus();
  352. document.getElementById("confirmPassword").innerHTML = "<font color='red'>&nbsp;Not Same</font>";
  353. output = false;
  354. }
  355. return output;
  356. }
  357. </script>
  358.  
  359. </head>
  360. <body>
  361.  
  362. </div>
  363. <?php
  364. $connection = mysql_connect("localhost", "root", "") or die("Failed to connect to MySQL: " . mysql_error());
  365. $db = mysql_select_db("fairytailquest", $connection) or die("Failed to connect to MySQL: " . mysql_error());
  366. $ip = $_SERVER['REMOTE_ADDR'];
  367. if(isset($_POST["submit1"])) {
  368. $username = mysql_escape_string($_POST['newign']);
  369. function gen_token($pass, $salt) {
  370. $salt = strtolower($salt);
  371. $str = hash("sha512", $pass.$salt);
  372. $len = strlen($salt);
  373. return strtoupper(substr($str, $len, 17));
  374. }
  375. $password = gen_token(mysql_escape_string($_POST['newPassword']), $username);
  376. $date=$_POST['type3'] . '-' . $_POST['type1'] . '-' . $_POST['type2'];
  377. $email = mysql_escape_string($_POST['newEmail']);
  378. $emailcheck = "SELECT id FROM meh_users WHERE Email='$email'";
  379. $result = mysql_query($emailcheck) or die (mysql_error());
  380. if (mysql_num_rows($result) > 0) {
  381. die("<div class='alert danger-alert'>
  382. <strong>The Email is Already Registered. Please refresh your browser or wait 3 sec to refresh<script type='text/javascript' language='JavaScript'>
  383. setTimeout(function () { location.href = 'register.php';
  384. }, 3000);
  385. </script>");
  386. }
  387.  
  388.  
  389.  
  390. $usercheck = "SELECT id FROM meh_users WHERE Username = '$username'";
  391. $result = mysql_query($usercheck) or die (mysql_error());
  392. if (mysql_num_rows($result) > 0) {
  393. die("<div class='alert danger-alert'>
  394. <strong>The Username is Already Registered. Please refresh your browser or wait 3 sec to refresh<script type='text/javascript' language='JavaScript'>
  395. setTimeout(function () { location.href = 'register.php';
  396. }, 3000);
  397. </script>");
  398. }
  399.  
  400.  
  401. if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
  402. $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')";
  403.  
  404. if($result1 = mysql_query($query))
  405. {
  406. $username = mysql_escape_string($_POST['newign']);
  407. $idcheck = "SELECT id FROM meh_users WHERE Username= '$username'";
  408. $result = mysql_query($idcheck) or die(mysql_error());
  409. $row = mysql_fetch_assoc($result);
  410. $userid = $row['id'];
  411. $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());
  412. $query3 = mysql_query("INSERT INTO meh_users_items(itemid, userid, equipped, equipment, level) VALUES ('1', '$userid', '1', 'Weapon', '1')") or die (mysql_error());
  413. $query4 = mysql_query("INSERT INTO meh_users_friends (userid) VALUES ('$userid')") or die (mysql_error());
  414. }
  415. echo("<div class='alert success-alert'>
  416. <strong>Registration Completed , Please Click <a href='/'>Here</a> To Play !!</strong></div>");
  417. } else {
  418. echo("<div class='alert danger-alert'>
  419. <strong>The Email is Not Valid</strong></div>");
  420. }
  421.  
  422. }
  423. ?>
  424.  
  425. <div class="float">
  426.  
  427. <div class="register">
  428.  
  429.  
  430. <form name="frmPasswordChange" method="post" onsubmit="return checkForm(this);">
  431. <div class="trans-title">Register An Account</div>
  432.  
  433.  
  434.  
  435. <p>Hero Name / Ingame Name(IGN) : </span></p>
  436. <div class="username">
  437. <span class="fa fa-user"></span>
  438. <input type="text" name="newign" required/></div>
  439. <div class="left">
  440. <p>Password : <span id="newPassword" class="required"></span></p>
  441. <div class="key2">
  442. <span class="fa fa-key"></span>
  443. <input type="password" class="hai2" name="newPassword" /><br></div>
  444. </div>
  445. <div class="right">
  446. <p>Confirm Password : <span id="confirmPassword" class="required"></span></p>
  447. <div class="key2">
  448. <span class="fa fa-key"></span>
  449. <input type="password" class="hai2" name="confirmPassword"/><br></div>
  450. </div>
  451. <input type="radio" name="gender" value="Male" <?php if(isset($_POST['gender']) && $_POST['gender']=="M") { ?>checked<?php } ?> required> <font color="white">Male</font>
  452. <input type="radio" name="gender" value="Female" <?php if(isset($_POST['gender']) && $_POST['gender']=="F") { ?>checked<?php } ?> required> <font color="white">Female</font>
  453. <p>Email : <span id="newEmail" class="required"></span></p>
  454. <div class="username">
  455. <span class="fa fa-user"></span>
  456. <input type="text" name="newEmail" required /></div>
  457. <select name="type1" id="soflow" required>
  458.  
  459. <option value="">Month</option>
  460. <option value="01">January</option>
  461. <option value="02">Febuary</option>
  462. <option value="03">March</option>
  463. <option value="04">April</option>
  464. <option value="05">May</option>
  465. <option value="06">June</option>
  466. <option value="07">July</option>
  467. <option value="08">August</option>
  468. <option value="09">September</option>
  469. <option value="10">October</option>
  470. <option value="11">November</option>
  471. <option value="12">December</option>
  472. </select>
  473.  
  474. <select name="type2" id="soflow" required>
  475.  
  476. <option value="">Day</option>
  477. <option>1</option>
  478. <option>2</option>
  479. <option>3</option>
  480. <option>4</option>
  481. <option>5</option>
  482. <option>6</option>
  483. <option>7</option>
  484. <option>8</option>
  485. <option>9</option>
  486. <option>10</option>
  487. <option>11</option>
  488. <option>12</option>
  489. <option>13</option>
  490. <option>14</option>
  491. <option>15</option>
  492. <option>16</option>
  493. <option>17</option>
  494. <option>18</option>
  495. <option>19</option>
  496. <option>20</option>
  497. <option>21</option>
  498. <option>22</option>
  499. <option>23</option>
  500. <option>24</option>
  501. <option>25</option>
  502. <option>26</option>
  503. <option>27</option>
  504. <option>28</option>
  505. <option>29</option>
  506. <option>30</option>
  507. <option>31</option>
  508.  
  509. </select>
  510. <select name="type3" id="soflow" required>
  511.  
  512. <option value="">Year</option>
  513. <option>2005</option>
  514. <option>2004</option>
  515. <option>2003</option>
  516. <option>2002</option>
  517. <option>2001</option>
  518. <option>2000</option>
  519. <option>1999</option>
  520. <option>1998</option>
  521. <option>1997</option>
  522. <option>1996</option>
  523. <option>1995</option>
  524. <option>1994</option>
  525. <option>1993</option>
  526. <option>1992</option>
  527. <option>1991</option>
  528. <option>1990</option>
  529. <option>1989</option>
  530. <option>1988</option>
  531. <option>1987</option>
  532. <option>1986</option>
  533. <option>1985</option>
  534. <option>1984</option>
  535. <option>1983</option>
  536. <option>1982</option>
  537. <option>1981</option>
  538. <option>1980</option>
  539. <option>1979</option>
  540. <option>1978</option>
  541. <option>1977</option>
  542. <option>1976</option>
  543. <option>1975</option>
  544.  
  545. </select>
  546. <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>
  547. <button type="submit" class="submitbutton" name="submit1" onclick="return validatePassword()"/>Register Now&nbsp;<span class="fa fa-arrow-circle-right"></span></button>
  548.  
  549. <script type="text/javascript">
  550. document.getElementById("field_terms").setCustomValidity("Please indicate that you accept the Terms and Conditions");
  551. </script>
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558. </form>
  559. <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>
  560. </div>
  561.  
  562.  
  563.  
  564.  
  565.  
  566. </body>
  567. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement