Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- // Config vars
- include("../config/config.php");
- // Variables
- $register = $_POST["Submit"];
- $user = $_POST["Username"];
- $pass = $_POST["Password"];
- $repass = $_POST["RepeatPassword"];
- $email = $_POST["Email"];
- # If the "CREATE PENGUIN" button was pressed
- if(isset($register)) {
- mysql_connect($server, $username, $password);
- if(!$conn) {
- die('<!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Wizguin - Register</title>
- <link rel="shortcut icon" href="assets/favicon-magic.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="screen">
- <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="css/hover-min.css">
- <link rel="stylesheet" href="css/styles.css">
- <link rel="stylesheet" href="css/register.css">
- </head>
- <body>
- <div class="navbar navbar-default">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand">Wizguin</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="navbar-main">
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="http://wizguin.byethost3.com/">Home</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/play.html">Play</a>
- </li>
- <li class="active">
- <a href="http://wizguin.byethost3.com/register.html">Register</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/account.html">Account</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/highscores.html">Highscores</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/blog.html">Blog</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container register">
- <div class="well bs-component">
- <fieldset>
- <legend>
- Register
- </legend>
- <h5> <strong> Error: </strong> We have failed to contact the server. Reason: ' . mysql_error() . ' </h5>
- </fieldset>
- </div>
- </div>
- <div class="footer-container">
- <div class="footer-top" id="footer-scroll">
- <div class="container">
- <div class="col-md-6">
- <h3>Latest News</h3>
- <a href="blog.html#5">Game Release</a>
- <a href="blog.html#4">Latest News 2</a>
- <a href="blog.html#3">Latest News 3</a>
- <a href="blog.html#2">Latest News 4</a>
- </div>
- <div class="col-md-6">
- <h3>Recent Tweets</h3>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- </div>
- </div>
- </div>
- <div class="container footer">
- Wizguin ©
- <div style="float:right;">Some rights reserved to Disney, Club Penguin™</div>
- </div>
- </div>
- </body>
- </html>');
- }
- # Queries for an existing name, to prevent over-write
- $res = mysql_db_query("wizguin", 'SELECT Username FROM users WHERE Username="' . $user . '"');
- # If name exists in SQL
- if(mysql_num_rows($res) != 0) {
- mysql_close();
- print('<!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Wizguin - Register</title>
- <link rel="shortcut icon" href="assets/favicon-magic.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="screen">
- <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="css/hover-min.css">
- <link rel="stylesheet" href="css/styles.css">
- <link rel="stylesheet" href="css/register.css">
- </head>
- <body>
- <div class="navbar navbar-default">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand">Wizguin</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="navbar-main">
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="http://wizguin.byethost3.com/">Home</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/play.html">Play</a>
- </li>
- <li class="active">
- <a href="http://wizguin.byethost3.com/register.html">Register</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/account.html">Account</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/highscores.html">Highscores</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/blog.html">Blog</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container register">
- <div class="well bs-component">
- <fieldset>
- <legend>
- Register
- </legend>
- <h5> <strong> Error: </strong> The username you have selected already exists. Please try again. </h5>
- </fieldset>
- </div>
- </div>
- <div class="footer-container">
- <div class="footer-top" id="footer-scroll">
- <div class="container">
- <div class="col-md-6">
- <h3>Latest News</h3>
- <a href="blog.html#5">Game Release</a>
- <a href="blog.html#4">Latest News 2</a>
- <a href="blog.html#3">Latest News 3</a>
- <a href="blog.html#2">Latest News 4</a>
- </div>
- <div class="col-md-6">
- <h3>Recent Tweets</h3>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- </div>
- </div>
- </div>
- <div class="container footer">
- Wizguin ©
- <div style="float:right;">Some rights reserved to Disney, Club Penguin™</div>
- </div>
- </div>
- </body>
- </html>');
- }
- # If the password and repeated are the same
- if($pass == $repass) {
- # If the passwords are 4-30
- if(strlen($pass) >= 4 && strlen($pass) <= 30) {
- # If the username is 4-12
- if(strlen($user) >= 4 && strlen($user) <= 12) {
- mysql_db_query("wizguin", 'INSERT INTO users (Email, Username, Password, LoginKey, RegisteredTime, Buddies, Ignores, Inventory) VALUES ("' . $email . '", "' . $user . '", "' . $pass . '", "' . rand(0, 10000000) . 'oi", "' . time() . '", "[[]]", "[]", "["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","413"]")');
- mysql_close();
- print('
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Wizguin - Register</title>
- <link rel="shortcut icon" href="assets/favicon-magic.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="screen">
- <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="css/hover-min.css">
- <link rel="stylesheet" href="css/styles.css">
- <link rel="stylesheet" href="css/register.css">
- </head>
- <body>
- <div class="navbar navbar-default">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand">Wizguin</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="navbar-main">
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="http://wizguin.byethost3.com/">Home</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/play.html">Play</a>
- </li>
- <li class="active">
- <a href="http://wizguin.byethost3.com/register.html">Register</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/account.html">Account</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/highscores.html">Highscores</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/blog.html">Blog</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container register">
- <div class="well bs-component">
- <fieldset>
- <legend>
- Register
- </legend>
- <h5> You have successfully created a new account! Click Play to go online and play! </h5>
- </fieldset>
- </div>
- </div>
- <div class="footer-container">
- <div class="footer-top" id="footer-scroll">
- <div class="container">
- <div class="col-md-6">
- <h3>Latest News</h3>
- <a href="blog.html#5">Game Release</a>
- <a href="blog.html#4">Latest News 2</a>
- <a href="blog.html#3">Latest News 3</a>
- <a href="blog.html#2">Latest News 4</a>
- </div>
- <div class="col-md-6">
- <h3>Recent Tweets</h3>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- </div>
- </div>
- </div>
- <div class="container footer">
- Wizguin ©
- <div style="float:right;">Some rights reserved to Disney, Club Penguin™</div>
- </div>
- </div>
- </body>
- </html>');
- }
- else print('
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Wizguin - Register</title>
- <link rel="shortcut icon" href="assets/favicon-magic.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="screen">
- <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="css/hover-min.css">
- <link rel="stylesheet" href="css/styles.css">
- <link rel="stylesheet" href="css/register.css">
- </head>
- <body>
- <div class="navbar navbar-default">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand">Wizguin</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="navbar-main">
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="http://wizguin.byethost3.com/">Home</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/play.html">Play</a>
- </li>
- <li class="active">
- <a href="http://wizguin.byethost3.com/register.html">Register</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/account.html">Account</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/highscores.html">Highscores</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/blog.html">Blog</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container register">
- <div class="well bs-component">
- <fieldset>
- <legend>
- Register
- </legend>
- <h5> <strong> Error: </strong> The username you have selected is too long/short. Please try again. </h5>
- </fieldset>
- </div>
- </div>
- <div class="footer-container">
- <div class="footer-top" id="footer-scroll">
- <div class="container">
- <div class="col-md-6">
- <h3>Latest News</h3>
- <a href="blog.html#5">Game Release</a>
- <a href="blog.html#4">Latest News 2</a>
- <a href="blog.html#3">Latest News 3</a>
- <a href="blog.html#2">Latest News 4</a>
- </div>
- <div class="col-md-6">
- <h3>Recent Tweets</h3>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- </div>
- </div>
- </div>
- <div class="container footer">
- Wizguin ©
- <div style="float:right;">Some rights reserved to Disney, Club Penguin™</div>
- </div>
- </div>
- </body>
- </html>');
- }
- else print('
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Wizguin - Register</title>
- <link rel="shortcut icon" href="assets/favicon-magic.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="screen">
- <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="css/hover-min.css">
- <link rel="stylesheet" href="css/styles.css">
- <link rel="stylesheet" href="css/register.css">
- </head>
- <body>
- <div class="navbar navbar-default">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand">Wizguin</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="navbar-main">
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="http://wizguin.byethost3.com/">Home</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/play.html">Play</a>
- </li>
- <li class="active">
- <a href="http://wizguin.byethost3.com/register.html">Register</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/account.html">Account</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/highscores.html">Highscores</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/blog.html">Blog</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container register">
- <div class="well bs-component">
- <fieldset>
- <legend>
- Register
- </legend>
- <h5> <strong> Error: </strong> The passwords you have selected is too long/short. Please try again. </h5>
- </fieldset>
- </div>
- </div>
- <div class="footer-container">
- <div class="footer-top" id="footer-scroll">
- <div class="container">
- <div class="col-md-6">
- <h3>Latest News</h3>
- <a href="blog.html#5">Game Release</a>
- <a href="blog.html#4">Latest News 2</a>
- <a href="blog.html#3">Latest News 3</a>
- <a href="blog.html#2">Latest News 4</a>
- </div>
- <div class="col-md-6">
- <h3>Recent Tweets</h3>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- </div>
- </div>
- </div>
- <div class="container footer">
- Wizguin ©
- <div style="float:right;">Some rights reserved to Disney, Club Penguin™</div>
- </div>
- </div>
- </body>
- </html>');
- }
- # If the password and repeated aren't the same
- if($pass != $repass) {
- mysql_close();
- print('<!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Wizguin - Register</title>
- <link rel="shortcut icon" href="assets/favicon-magic.ico">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="screen">
- <link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="css/hover-min.css">
- <link rel="stylesheet" href="css/styles.css">
- <link rel="stylesheet" href="css/register.css">
- </head>
- <body>
- <div class="navbar navbar-default">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand">Wizguin</a>
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="navbar-collapse collapse" id="navbar-main">
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="http://wizguin.byethost3.com/">Home</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/play.html">Play</a>
- </li>
- <li class="active">
- <a href="http://wizguin.byethost3.com/register.html">Register</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/account.html">Account</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/highscores.html">Highscores</a>
- </li>
- <li>
- <a href="http://wizguin.byethost3.com/blog.html">Blog</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="container register">
- <div class="well bs-component">
- <fieldset>
- <legend>
- Register
- </legend>
- <h5> <strong> Error: </strong> The passwords you have selected do not match. Please try again. </h5>
- </fieldset>
- </div>
- </div>
- <div class="footer-container">
- <div class="footer-top" id="footer-scroll">
- <div class="container">
- <div class="col-md-6">
- <h3>Latest News</h3>
- <a href="blog.html#5">Game Release</a>
- <a href="blog.html#4">Latest News 2</a>
- <a href="blog.html#3">Latest News 3</a>
- <a href="blog.html#2">Latest News 4</a>
- </div>
- <div class="col-md-6">
- <h3>Recent Tweets</h3>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- <a href="#" class="tweet">@wizguin New Website Theme</a>
- <a class="tweet-date">9 September 2016</a>
- </div>
- </div>
- </div>
- <div class="container footer">
- Wizguin ©
- <div style="float:right;">Some rights reserved to Disney, Club Penguin™</div>
- </div>
- </div>
- </body>
- </html>');
- }
- }
- mysql_close();
- else echo '<meta http-equiv="refresh" content="0; url=http://wizguin.byethost3.com/register.html" />';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement