Jump to content

Project Overview Page (Panel)


UnknownDev

Recommended Posts

a509477892484d718a3abeabdc30b6c5.png

Coded in html + css3

Download : http://www68.zippyshare.com/v/C1tJaFkx/file.html

 

Version 2 Overview : Not avaible yet.

In version 2 i use mysqli extension and some secured requests to the database. Here you can get a codeexample :

<?php
require_once 'inc/config.php';
require_once 'inc/functions.php';

if(isset($_POST['submit'])) {

	$sin_espacios = count_chars($_POST['username'], 1);

	if (!empty($sin_espacios[32])) {
		echo "The Field <em>username</em> shoud not be blank.. <a href='javascript:history.back();'>Back</a>";
	}
	
	elseif (empty($_POST['username'])) {
		echo "You have not entered your username. <a href='javascript:history.back();'>Back</a>";
	}
	
	elseif (empty($_POST['sha_pass_hash'])) {
		echo "You have not entered a password. <a href='javascript:history.back();'>Back</a>";
	}
	
	elseif (empty($_POST['expansion'])) {
		echo "You have not selected the expansion. <a href='javascript:history.back();'>Back</a>";
	}
	
	elseif ($_POST['sha_pass_hash'] != $_POST['sha_pass_hash_conf']) {
		echo "The passwords entered do not match. <a href='javascript:history.back();'>Back</a>";
	}
	
	elseif(!validate_email($_POST['email'])) {
		echo "The email you entered is not valid. <a href='javascript:history.back();'>Back</a>";
	}

	else {
		
		$username = real_escape_string($_POST['username']);
		$sha_pass_hash = sha_password($username,$_POST['sha_pass_hash']);
		$email = real_escape_string($_POST['email']);
		$expansion = real_escape_string($_POST['expansion']);
		
		$sql = "SELECT username FROM $logon.account WHERE username = '".$conn->real_escape_string($username)."')"; 
    	$db_erg = mysqli_query($conn, $sql);

    	if (!$db_erg) {
        	die('Invalid request : ' . mysqli_error($conn));
    	}

		if ($db_erg->num_rows == 1) {
			echo "The chosen user name has already been registered previously. <a href='javascript:history.back();'>Back</a>";
		}

		else {
		
			$sha_pass_hash = md5($sha_pass_hash);
			$reg = "INSERT INTO $logon.account (username, sha_pass_hash, email, expansion) VALUES 
				('".$conn->real_escape_string($username)."', '".$sha_pass_hash."', '".$conn->real_escape_string($email)."', '".$expansion."')";
			$db_erg = mysqli_query($conn, $reg);

			if (!$reg) {
				echo "Data entered correctly.";
			}
			else {
				echo "An error occurred and the data was not recorded.";
			}
		}
	}
}

?>

<!DOCTYPE html>
<html>
<head>
	<title>Skyfire Account Register</title>
</head>
<body>
	<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
		<label>Username :</label><br />
		<input type="text" name="username" size="21" class="inputbox" maxlength="15" /><br /> (Select the username, with which you can login.)<br><br>
		<label>Password :</label><br />
		<input type="password" name="sha_pass_hash" size="25" class="inputbox" maxlength="15" /><br /> (Choose a password you do not use for other accounts for more security) <br><br>
		<label>Confirm Password :</label><br />
		<input type="password" name="sha_pass_hash_conf" size="25" class="inputbox" maxlength="15" /><br />  (Confirm the password you entered earlier)<br><br>
		<label>E-Mail :</label><br />
		<input type="text" name="email" class="inputbox" size="23" maxlength="50" /><br />  (Write a valid email to have more security in your account)<br><br>
		<label>Expansion :</label><br>
			<select class="inputbox" name="expansion">
			<option disabled value ="6">Legion (Not Avaible)</option>
			<option disabled value ="5">Warlords of Draenor (Not Avaible)</option>
			<option selected value="4">Mists of Pandaria</option>
			<option value="3">Cataclysm</option>
			<option value="2">Wrath of the Lich King</option>
			<option value="1">The Burning Crusade</option>
			<option value ="0">Classic</option>

			</select><br>(Select the expansion you want to have in your account. <b>Cataclismo</b>)<br><br>
		<input type="submit" name="submit" value="Registrar" />
		<input type="reset" value="Reset Fields" />
	</form>
</body>
</html>

 

Including a Register Page & Password Change

 

497bbd8b1af64c1b99d30e3034baf839.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.