Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.43 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. if(file_exists("install.php") == "1"){
  4. header('Location: install.php');
  5. exit();
  6. }
  7. include 'inc/database.php';
  8. include 'inc/captcha.php';
  9. include 'db.php';
  10. $result = mysqli_query($con, "SELECT * FROM `settings` LIMIT 1") or die(mysqli_error($con));
  11. while($row = mysqli_fetch_assoc($result)){
  12. $website = $row['website'];
  13. $favicon = $row['favicon'];
  14. }
  15. if (!isset($_SESSION)) {
  16. session_start();
  17. }
  18. if (isset($_SESSION['username'])) {
  19. header('Location: index.php');
  20. exit();
  21. }
  22. // Test Input Function
  23. function testInput($data){
  24. $data = trim($data);
  25. $data = stripslashes($data);
  26. $data = htmlspecialchars($data);
  27. return $data;
  28. }
  29. if(isset($_POST['first_last_name']) && isset($_POST['username']) && isset($_POST['password']) && isset($_POST['confirmpassword']) && isset($_POST['email'])){
  30. // Name Verification
  31. $first_last_name = testInput($_POST['first_last_name']);
  32. if (!preg_match("/^[a-zA-Z ]*$/",$first_last_name)) {
  33. die("In first name field Only letters and white space allowed");
  34. }
  35. // Username Verification
  36. $username = testInput($_POST['username']);
  37. if (!preg_match("/^[a-zA-Z ]*$/",$username)) {
  38. $username = mysqli_real_escape_string($con, $username);
  39. die("In username field Only letters allowed");
  40. }
  41. $contains = "script";
  42. if(isset($_POST['username']) && preg_match("/\b($contains)\b/", $username && $email))
  43. {
  44. die("We Dont Accept XSS Around Here");
  45. }
  46. $password = mysqli_real_escape_string($con, $_POST['password']);
  47. $confirmpassword = mysqli_real_escape_string($con, $_POST['confirmpassword']);
  48. $email = htmlspecialchars($_POST['email']);
  49. if($password != $confirmpassword){
  50. die("The confirmation password was not equal to the password.");
  51. }
  52. if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
  53. die("The email entered was not correct.");
  54. }
  55. $result = mysqli_query($con, "SELECT * FROM `users` WHERE `first_last_name` = '$first_last_name'") or die(mysqli_error($con));
  56. if(mysqli_num_rows($result) > 0){
  57. die("This name is already in out database please enter your name");
  58. }
  59. $result = mysqli_query($con, "SELECT * FROM `users` WHERE `username` = '$username'") or die(mysqli_error($con));
  60. if(mysqli_num_rows($result) > 0){
  61. die("This username already exists.");
  62. }
  63. $result = mysqli_query($con, "SELECT * FROM `users` WHERE `email` = '$email'") or die(mysqli_error($con));
  64. if(mysqli_num_rows($result) > 0){
  65. die("This email already exists.");
  66. }
  67. // Return Success - Valid Email
  68.  
  69. $hash = ( rand(0,100000) ); // Generate random 32 character hash and assign it to a local variable.
  70. // Example output: f4552671f8909587cf485ea990207f3b
  71.  
  72. $subject = "Digidripz.us | Email Confirmation";
  73.  
  74. $message = "
  75. <div style='background:#f2f2f2;margin:0 auto;max-width:640px;padding:0 20px'>
  76. <table align='center' border='0' cellpadding='0' cellspacing='0'>
  77. <tbody>
  78. <tr>
  79. <td>&nbsp;</td>
  80. </tr>
  81. <tr>
  82. <td>
  83. <div style='width:96%;margin:auto;padding:5px 0 0px 0;text-align:center'>
  84. <h1 class='text-center'><b><font color='blue'>Digidripz.us</font></b></h1>
  85. </div>
  86. <div style='text-align: center;background-color: #2196F3;color: #Fff;font-family:'Open Sans', sans-serif;font-size:13px; padding: 1px;margin-top: 10px;border-radius:10px 10px 0px 0px;'>
  87. <h2><center>Account Registration</center></h2>
  88. </div>
  89. <div style='background:#fff;color:#5b5b5b;font-family:'Open Sans', sans-serif;font-size:13px;padding:10px 20px;margin:20px auto;line-height:25px;border:1px #ddd solid;border-top:0;clear:both;margin-top: 0;max-width:400px;border-radius: 0 0 10px 10px'>
  90.  
  91. <p class='text-center'>".$user."Your Account Has Been Successfully Registered</p>
  92. <p class='text-center'>Click The Button Below To Confirm Your Account</p>
  93. <div style='text-align:center;margin:15px'>
  94. <a class'button' style=' background: #3498db;
  95. background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
  96. background-image: -moz-linear-gradient(top, #3498db, #2980b9);
  97. background-image: -ms-linear-gradient(top, #3498db, #2980b9);
  98. background-image: -o-linear-gradient(top, #3498db, #2980b9);
  99. background-image: linear-gradient(to bottom, #3498db, #2980b9);
  100. -webkit-border-radius: 28;
  101. -moz-border-radius: 28;
  102. border-radius: 28px;
  103. font-family: Arial;
  104. color: #ffffff;
  105. font-size: 20px;
  106. padding: 10px 20px 10px 20px;
  107. text-decoration: none;' href='https://digitools.host/generator2/verify.php?email=$email&hash=$hash'>Login Here</a>
  108.  
  109. </div>
  110. </div>
  111. </td>
  112. </tr>
  113. </tbody>
  114. </table>
  115. </div>
  116. ";
  117.  
  118. // Always set content-type when sending HTML email
  119. $headers = "MIME-Version: 1.0" . "\r\n";
  120. $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
  121.  
  122. // More headers
  123. $headers .= 'From: <no-reply@digidripz.us>' . "\r\n";
  124.  
  125. mail($email,$subject,$message,$headers);
  126.  
  127.  
  128.  
  129. $pass_encrypted = password_hash($password, PASSWORD_BCRYPT);
  130. $ip = mysqli_real_escape_string($con, $_SERVER['REMOTE_ADDR']);
  131. $date = date('Y-m-d');
  132. mysqli_query($con, "INSERT INTO `users` (`first_last_name`, `username`, `password`, `email`, `date`, `ip`, `hash`, `active`,`profile_img`) VALUES ('$first_last_name', '$username', '$pass_encrypted', '$email', '$date', '$ip','$hash' ,'0' ,'https://nsmbhd.net/file/QxeiiK3ZDB06O6M2/501px-Artwork_-_Mario_Circle.svg.png')") or die(mysqli_error($con));
  133. header("Location: thankyou.php");
  134. }
  135. ?>
  136. <!DOCTYPE html>
  137. <html class="no-js">
  138. <head>
  139. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  140. <title>
  141. <?php echo $website ?>
  142. </title>
  143. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  144. <meta name="keywords" content="<?php echo $website ?>, Account, Premium, Cheap, Netflix, free, Spotify, Hulu, account gen, account generator, Best, Minecraft, Account Gen, Amazon, account, topaccgen, best account generator, cheap account generator, topaccgen generator">
  145. <meta name="description" content="<?php echo $website ?> is the best account generator on the market! Generate thousands of premium accounts for a small one time cost. Generate Netflix, Hulu, Minecraft, and much more Free to Sign Up!">
  146. <meta name="author" content="Best Account Generator">
  147. <link rel="shortcut icon" href="<?php echo $favicon ?>">
  148. <!-- Styles -->
  149. <link rel="stylesheet" type="text/css" href="ll_files/bootstrap.css">
  150. <link rel="stylesheet" href="ll_files/icons.css">
  151. <link rel="stylesheet" type="text/css" href="ll_files/style.css">
  152. <link rel="stylesheet" type="text/css" href="ll_files/responsive.css">
  153. <link rel="stylesheet" type="text/css" href="ll_files/color.css">
  154. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
  155. </head>
  156. <body>
  157. <div class="pageloader" style="display: none;">
  158. <div class="loader">
  159. <div class="cssload-thecube">
  160. <div class="cssload-cube cssload-c1">
  161. </div>
  162. <div class="cssload-cube cssload-c2">
  163. </div>
  164. <div class="cssload-cube cssload-c4">
  165. </div>
  166. <div class="cssload-cube cssload-c3">
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <!-- Page Loader -->
  172. <style>
  173. button{
  174. margin:auto;
  175. display:block;
  176. }
  177. </style>
  178. <div class="login-page" style="height: 700px;">
  179. <div class="login-box">
  180. <center>
  181. <h3 style="font-weight:bold;color:#6991f7;text-shadow: 0px 0px 7px #6991f7">
  182. <?php echo $website ?> - Register
  183. </h3>
  184. </center>
  185. <form class="form-signin" action="register.php" method="POST">
  186. <div class="row">
  187. <div class="form-group col-lg-6">
  188. <label>Username
  189. </label>
  190. <input type="text" id="username" name="username" class="form-control" placeholder="Username: Ex. MrModder" required autofocus>
  191. </div>
  192. <div class="form-group col-lg-6">
  193. <label>Full Name
  194. </label>
  195. <input type="text" id="first_last_name" name="first_last_name" class="form-control" placeholder="Full Name: Ex. Jon Doe" required>
  196. </div>
  197. <div class="form-group col-lg-6">
  198. <label>Email
  199. </label>
  200. <input type="text" id="email" name="email" class="form-control" placeholder="Email: Ex. admin@gmail.com" required>
  201. </div>
  202. <div class="form-group col-lg-6">
  203. <label>Password
  204. </label>
  205. <input type="password" id="password" name="password" class="form-control" placeholder="Password: Ex. {12;we#';rt]" required>
  206. </div>
  207. <div class="form-group col-lg-6">
  208. <label>Confirm Password
  209. </label>
  210. <input type="password" id="confirmpassword" name="confirmpassword" class="form-control" placeholder="Confirm Password: Ex. {12;we#';rt]" required>
  211. </div>
  212. <div class="form-group col-lg-6">
  213. <label>Captcha
  214. </label>
  215. <input type="text" class="form-control" name="captcha" placeholder="<?php getNumbers(); ?>" value="" maxlength="5" required>
  216. </div>
  217. </div>
  218. <div>
  219. <div class="checkbox checkbox-success">
  220. <input id="checkbox3" type="checkbox" required>
  221. <label for="checkbox3">
  222. I have read & accept the
  223. <a href="tos.php"> T.O.S
  224. </a>
  225. </label>
  226. </div>
  227. <center>
  228. <button class="btn btn-primary">Register
  229. </button>
  230. <a class="btn btn-default" href="login.php">Login
  231. </a>
  232. </center>
  233. </div>
  234. </form>
  235. </div>
  236. </div>
  237. </div>
  238. </section>
  239. <!-- End main content-->
  240. </div>
  241. <!-- Vendor scripts -->
  242. <script src="vendor/pacejs/pace.min.js">
  243. </script>
  244. <script src="vendor/jquery/dist/jquery.min.js">
  245. </script>
  246. <script src="vendor/bootstrap/js/bootstrap.min.js">
  247. </script>
  248. <!-- App scripts -->
  249. <script src="scripts/luna.js">
  250. </script>
  251. </body>
  252. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement