Guest User

Untitled

a guest
Jan 23rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.79 KB | None | 0 0
  1. <?php
  2. if (!defined('AXE'))
  3. exit;
  4.  
  5.  
  6. if (!$a_user['is_guest'])
  7. {
  8. box ('Hmm','You are already logged in, why would you want a new account? <br>Please continue...');
  9. $tpl_footer = new Template("styles/".$style."/footer.php");
  10. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  11. print $tpl_footer->toString();
  12. exit;
  13. }
  14. //common include
  15. $box_simple_wide = new Template("styles/".$style."/box_simple_wide.php");
  16. $box_wide = new Template("styles/".$style."/box_wide.php");
  17. $box_wide->setVar("imagepath", 'styles/'.$style.'/images/');
  18. $box_simple_wide->setVar("imagepath", 'styles/'.$style.'/images/');
  19. //end common include
  20. if (isset($_POST['action']))
  21. {
  22. //do login stuff:
  23. $login = preg_replace( "/[^A-Za-z0-9]/", "", $_POST['username'] ); //only letters and numbers
  24.  
  25. if ($login=='')
  26. {
  27. $war1="<font color='red'>Enter your username</font>";
  28. }
  29. else //pass empty
  30. {
  31. $db->select_db($acc_db);
  32. $result = $db->query("SELECT ".$db_translation['login']." FROM ".$db_translation['accounts']." WHERE ".$db_translation['login']." = '".$db->escape($login)."' LIMIT 1") or die(mysql_error());
  33. $rows = $db->num_rows($result);
  34. if ($rows>=1)
  35. {
  36. $war1="<font color='red'>The username '".$login."' already exists, please pick another.</font>";
  37. $db->select_db($db_name);
  38. }
  39. else //pass username
  40. {
  41. if ($smtp_h=='')
  42. {
  43. $pass1 = preg_replace( "/[^A-Za-z0-9]/", "", $_POST['password'] ); //only letters and numbers
  44. $pass2 = preg_replace( "/[^A-Za-z0-9]/", "", $_POST['password2'] ); //only letters and numbers
  45. if ($pass1=='')
  46. {
  47. box ('Fail',"Type in password.");
  48. $tpl_footer = new Template("styles/".$style."/footer.php");
  49. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  50. print $tpl_footer->toString();
  51. exit;
  52. }
  53. else //pass empty
  54. {
  55. if ($pass1<>$pass2)
  56. {
  57. box ('Failure',"Passwords do not match.");
  58. $tpl_footer = new Template("styles/".$style."/footer.php");
  59. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  60. print $tpl_footer->toString();
  61. exit;
  62. }
  63. }
  64. }
  65. $email = pun_htmlspecialchars($_POST['email']);
  66. if ($email=='')
  67. {
  68. $war3="<font color='red'>Type in your e-mail address</font>";
  69. }
  70. else //pass empty
  71. {
  72. $db->select_db($acc_db);
  73. $result = $db->query("SELECT ".$db_translation['login']." FROM ".$db_translation['accounts']." WHERE ".$db_translation['email']." = '".$db->escape($email)."' LIMIT 1") or die(mysql_error());
  74. $rows = $db->num_rows($result);
  75. if ($rows>=1)
  76. {
  77. $war3="<font color='red'>The e-mail address '".$email."' is already in use!</font><br/>";
  78. $db->select_db($db_name);
  79. }
  80. else //pass
  81. {
  82. $question = $_POST['question'];
  83. $answer = preg_replace( "/[^A-Za-z0-9]/", "", $_POST['answer'] );
  84. if ($answer=='')
  85. {
  86. $war4="<font color='red'>Make sure you type in your answer.</font><br/>";
  87. }
  88. else //pass final
  89. {
  90.  
  91. //random pass
  92. if ($smtp_h<>'' && $smtp_u<>'') //check if there is smtp info
  93. {
  94. $pass1=random_pass('6');
  95. }
  96.  
  97. $db->select_db($acc_db);
  98. //create_account($user,$pass,$email,$securityq,$securitya)
  99. $createacc=create_account($login,$pass1,$db->escape($email));
  100. if ($createacc)
  101. {
  102. box ('Fail',$createacc);
  103. $tpl_footer = new Template("styles/".$style."/footer.php");
  104. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  105. print $tpl_footer->toString();
  106. exit;
  107. }
  108. $db->select_db($db_name);
  109. //add additional data
  110. $result2 = $db->query("INSERT INTO accounts_more (acc_login, vp, question_id, answer, dp) VALUES ('".strtoupper($login)."','0','".$question."','".$db->escape($answer)."','0')") or die(mysql_error());
  111.  
  112. if ($question=='1')
  113. {
  114. $questi="Your middle name?";
  115. }
  116. elseif ($question=='2')
  117. {
  118. $questi="Your birth town?";
  119. }
  120. elseif ($question=='3')
  121. {
  122. $questi="Your pet's name?";
  123. }
  124. elseif ($question=='4')
  125. {
  126. $questi="Your mother's maiden name?";
  127. }
  128. else
  129. {
  130. print "Something was wrong with your security question.<br/>";
  131. }
  132.  
  133. //SMTP START
  134. if ($smtp_h<>'' && $smtp_u<>'') //check if there is smtp info
  135. {
  136. $from =trim($email);
  137. $to = trim($email);
  138. $subject = $title." - Account Info";
  139. $body = "Thank you for creating account, ".$login."!\n\nYour password: ".$pass1."\n\nEnjoy your stay!\n\n".$domain_url;
  140. require_once "smtp.php";
  141.  
  142. }
  143. //SMTP END
  144.  
  145. $thisboxstring.='<span class="colorgood">You have successfully created your account. You are now logged in.</span><br><br>'.$smtpme;
  146. if ($smtp_h=='' && $smtp_u<>'') //check if there is smtp info
  147. {
  148. $thisboxstring.=' Your password is <strong>'.$pass1.'</strong>. You can change it from the Account Panel.';
  149. }
  150.  
  151. $thisboxstring.='<a href="./quest.php?name=account">Go to the Account Panel</a>';
  152. box ('Success',$thisboxstring);
  153. //login
  154. $_SESSION['user']=pun_htmlspecialchars($login);
  155.  
  156.  
  157.  
  158. $tpl_footer = new Template("styles/".$style."/footer.php");
  159. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  160. print $tpl_footer->toString();
  161. exit;
  162. }
  163.  
  164. }
  165. }
  166.  
  167. }
  168. }
  169.  
  170. }
  171.  
  172. $cont2='<center>
  173. <div class="sub-box1" align="left">
  174. <form action="" method="post">
  175. &nbsp;Username:<br/>
  176. <input type="text" id="username" maxlength="20" name="username" /><br/> '. $war1.'
  177. ';
  178. if ($smtp_h=='') //check if there is smtp info
  179. {
  180. $cont2.='
  181. &nbsp;Password:<br/>
  182. <input type="password" id="password" maxlength="20" name="password" /><br/>
  183. &nbsp;Confirm Password:<br/>
  184. <input type="password" id="password2" maxlength="20" name="password2" /> <br/>'. $war2.'
  185. ';}
  186. $cont2.='
  187. &nbsp;Email Address:<br/>
  188. <input type="text" id="email" maxlength="40" name="email" /><br/> '. $war3.'
  189. &nbsp;Security Question:<br/>
  190. <div class="bord1">
  191. <label><input class="fix1" name="question" type="radio" value="1" />&nbsp; Your middle name?</label><br />
  192. <label><input class="fix1" name="question" type="radio" value="2" checked="checked" />&nbsp; Your birth town?</label><br />
  193. <label><input class="fix1" name="question" type="radio" value="3" />&nbsp; Your pet\'s name?</label><br />
  194. <label><input class="fix1" name="question" type="radio" value="4" />&nbsp; Your mother maiden name?</label><br />
  195. </div>
  196. &nbsp;Security Answer:<br/>
  197. <input type="text" id="answer" maxlength="100" name="answer" /><br/> '.$war4.'
  198. May only contain alphabetic letters (A-Z, a-z) and numbers (0-9).<br/><br/>
  199. <div id="log-b2"><input type="submit" name="action" value="Create Account" class="button doit" /></div>
  200. </form>
  201. </div>
  202.  
  203. <br/>
  204.  
  205. <div class="sub-box1" align="left">
  206. <strong>*Connection Guide</strong> <br/>
  207. <strong><font color="#464646">1)</font></strong> Open C:\Program Files\World of Warcraft\Data\enGB/enUS\realmlist.wtf with notepad.<br/>
  208. <strong><font color="#464646">2)</font></strong>
  209. Remove all and add set realmlist <font color="#9a2828">Abolished-Gaming.dyndns.tv</font> and save.<br/>
  210. <strong><font color="#464646">3)</font></strong> Register an account above.<br/>
  211. <strong><font color="#464646">4)</font></strong> Download Abolished-Gaming.exe From the Download Section, Enjoy the realms of Abolished-Gaming!<br/>
  212. </div>
  213. </center>
  214. ';
  215.  
  216. $box_wide->setVar("content_title", "Registration");
  217. $box_wide->setVar("content", $cont2);
  218. print $box_wide->toString();
Add Comment
Please, Sign In to add comment