Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php error_reporting(E_ALL); ini_set('display_errors', TRUE); ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>RUS GOLD Sign Up</title>
- <link rel="icon" href="favicon.ico">
- <style>
- .logo {float: left;} .nav {float: right; margin: 30px; margin-right: 45px;}
- .nav a { font-size: 25px;text-decoration:none;color: #000; font-family: Lucida Sans Unicode; font-weight: normal;} .nav a:hover {opacity:.5;}
- .sign { width: 50%;} .sign_2 {float:right;width: 50%; margin-top: -227px;}
- h1 {text-align: center; font-family: arial; font-size: 35px; color: #5E0000;}
- .sign input { float: right; padding: 15px; border: none;border-bottom: 1px solid #ccc; width: 60%; margin-right: 40px;}
- .sign_2 input {float: left; padding: 15px; border: none;border-bottom: 1px solid #ccc; width: 60%; margin-left: 40px;}
- button {float: right; margin-right: 200px; background-color: #D4A713; color: #fff; padding: 15px; border: none;font-size: 15px; font-weight: bold;cursor: pointer;}
- </style>
- </head>
- <body>
- <div class="logo">
- <img style="height: 80px;" src="rus_logo.png">
- <p style="margin-top: -15px; margin-left: 60px; opacity: 0.7;">beta</p>
- </div>
- <div class="nav"><a href="faucet.php">Claim RUS GOLD</a></div><br><br><br><br><br>
- <h1>Create An Account</h1><br><br><br>
- <form method="POST">
- <div class="sign">
- <input type="text" name="username" placeholder="Enter Username..." ><br><br><br><br><br>
- <input type="email" name="email" placeholder="Enter E-Mail..." ><br><br><br><br><br>
- <input type="text" name="ref" value="<?php $user = $_GET['ref']; if ( isset($_GET['ref']) && $_GET['ref'] == $user ){ echo $user;} ?>" placeholder="Refferal Name..." readonly><br><br>
- </div>
- <div class="sign_2">
- <input type="password" name="pass" placeholder="Enter Password..." ><br><br><br><br><br>
- <input type="password" name="confpass" placeholder="Confirm Password..." ><br><br><br><br><br>
- <?php
- if (isset($_POST['submit'])) {
- include 'conn.php';
- $username = mysqli_real_escape_string($conn, $_POST['username']);
- $email = mysqli_real_escape_string($conn, $_POST['email']);
- $password = mysqli_real_escape_string($conn, $_POST['pass']);
- $confpassword = mysqli_real_escape_string($conn, $_POST['confpass']);
- if(isset($_POST['ref'])){
- $filename = mysqli_real_escape_string($conn, $_POST['ref']);
- }
- if (empty($username) || empty($email) || empty($password) || empty($confpassword) ) {
- echo "<script>alert('Invalid Inputs');</script>";
- }
- else if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
- echo "<script>alert('Invalid E-Mail');</script>";
- }
- else if ($password !== $confpassword) {
- echo "<script>alert('Your Password does not match with each other');</script>";
- }
- else {
- $sql = "SELECT * FROM login WHERE email = '$email'";
- $result = mysqli_query($conn, $sql);
- $res = mysqli_num_rows($result);
- if ($res > 0) {
- echo "<script>alert('E-Mail Already Exists');</script>";
- } else {
- $hashedpw = password_hash($password, PASSWORD_DEFAULT);
- $selector = bin2hex(random_bytes(8));
- $token = random_bytes(32);
- $tok = bin2hex($token);
- $expires = date("U") + 604800;
- $sql = "INSERT INTO login (username,email,password,ref,poi,refval,selector,validator,val) VALUES ('$username', '$email', '$hashedpw', '$filename','100','$expires', '$selector','$tok','0');";
- if ($conn->query($sql) === TRUE) {
- $url = "http://inforus.xyz/val.php?selector=". $selector . "&validator=". $tok;
- include 'testk.php';
- echo "<script> alert('Please Confirm your Email.');</script>";
- $snh = "INSERT INTO exp (username,expires) VALUES ('$username', '155399945');";
- mysqli_query($conn, $snh);
- } else {
- echo "<script>alert('SQL Error Please inform us about the Error so we can solve this as soon as possible');</script>";
- }
- }
- }
- }
- ?>
- <button type="submit" name="submit">Sign Up</button>
- </div>
- </form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment