Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- /*
- * @author Maze
- * @files Spheron
- * @type Registration
- * @copyright 2009
- */
- -->
- <head>
- <title>..:: Spheron -> Register ::..</title>
- </head>
- <div align="center">
- <form action="register.php" method="post">
- <table border = "1"><tr>
- <td>Benutzername*</td><td><input type="text" name="user" lenght="16" /></td></tr>
- <tr><td>Passwort*</td><td><input type="password" name="pass" lenght="16" /></td></tr>
- <tr><td>Repeat Passwort*</td><td><input type ="password" name="pass2" lenght="16" /></td></tr>
- <?php if(isset($_GET['gm'])) {echo'<tr><td>GM Passwort</td><td><input type ="password" name="gmpass"/></td></tr>';} ?>
- <tr><td colspan="2"><b>*muss ausgefüllt werden</b></td></tr>
- <tr><td><input type="submit" value="Register" /></td><td><input type="reset" value="Reset"></td></tr>
- </form>
- </div>
- </html>
- <!--____________________Dont Change Below_______________________-->
- <?php
- /*
- * @author Maze
- * @files Spheron
- * @type Registration
- * @copyright 2009
- */
- include('config.php');
- selectlogin($host,$user,$pass,$login);
- if ($_POST['submit'] != '0')
- {
- if(!$_POST['user'] ||
- !$_POST['pass'] ||
- !$_POST['pass2'])
- {
- die('<b><center>Du musst alle Felder ausfüllen !</center></b>');
- }
- else {
- $user = htmlspecialchars(
- trim(
- mysql_real_escape_string($_POST['user'])
- )
- );
- $pass = md5(
- $customsalt.$_POST['pass']
- );
- $pass2 = md5(
- $customsalt.$_POST['pass2']
- );
- if (strlen($user) <4 ||
- strlen($user) >16)
- {
- die("<b>Dein Benutzername ist zu kurz/lang .</b>");
- }
- if (strlen($_POST['pass']) <4 ||
- strlen($_POST['pass']) >16)
- {
- die("<b>Dein Passwort ist zu kurz/lang .</b>");
- }
- $gmpass = htmlspecialchars(
- trim($_POST['gmpass'])
- );
- if (exist($user) != '0')
- {
- die ("<b>Der Benutzername ".$_POST['user']."wird schon benutzt</b>");
- }
- else {
- if($pass != $pass2)
- {
- die ("<b>Die Passwörter stimmen nicht überrein !</b>");
- }
- else{
- $accountal = $accesslevel;
- if ($gmpass != $gmpassword)
- {
- $accountal = $accesslevel;
- }
- else {
- echo '<b><font color="#ff0000">GM</font> Passwort ist richtig<br>Ein <font color="#ff0000">GM</font> Account wird erstellt.</b><br>';
- $accountal = $gmaccesslevel;
- }
- }
- if (mysql_query("INSERT INTO accounts (name,password,accesslevel) VALUES ('$user','$pass','$accountal')"))
- {
- echo '<b>Dein ';
- if ($gmpass == $gmpassword){ echo '<font color="#FF0000">GM </font>'; }
- echo 'Account wurde erstellt !</b>';
- }
- else
- {
- echo '<b>Datenbankfehler</b>';
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement