Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- require_once('./conf/core.php');
- if(isset($_SESSION["username"]))
- header("location: me");
- if(isset($_POST['submit']))
- {
- $username = mysql_real_escape_string($_POST['username']);
- $password = HoloHashMD5($_POST['password']);
- $password2 = HoloHashMD5($_POST['password']);
- $email = mysql_real_escape_string($_POST['email']);
- $last_online = strtotime(date("H:i"));
- $last_ip = $_SERVER['REMOTE_ADDR'];
- $ip_reg = $_SERVER['REMOTE_ADDR'];
- $online = 1;
- $agb_check = $_POST['agb_check'];
- $geschlecht = $_POST['geschlecht'];
- $gender = $_POST['geschlecht'];
- if($gender === 'm') {
- $look = 'ch-1201-110.hr-3163-45.cc-3007-76-1408.sh-3016-110.lg-3057-76.hd-185-1.ch-215-1408';
- } else {
- $look = 'ca-3175-62.fa-1201-110.cc-3008-63-63.lg-3216-110.hd-625-28.ch-630-110.he-1602-85.hr-3012-1090';
- }
- if (strlen($username) > 0 OR strlen($password) > 0 OR strlen($password2) > 0 OR strlen($email) > 0)
- {
- $checkusername = mysql_query("SELECT id FROM users WHERE username = '".$username."' LIMIT 1");
- if(mysql_num_rows($checkusername) == 0) {
- if(strlen($username) > 2)
- {
- if(strlen($password) > 5)
- {
- if($password == $password2)
- {
- if(strlen($email) > 0)
- {
- if ($agb_check!=0) {
- if ($geschlecht == "m" || $geschlecht == "f") {
- $motto = mysql_real_escape_string($_POST['motto']); //ggf noch laenge pruefen
- mysql_query("INSERT INTO users (username, password, mail, motto, last_online, ip_last, ip_reg, online, gender, look) VALUES (
- '".$username."',
- '".md5(md5($password2))."',
- '".$email."',
- '".$motto."',
- '".$last_online."',
- '".$last_ip."',
- '".$ip_reg."',
- '".$online."',
- '".$geschlecht."',
- '".$look."'
- )") or die(mysql_error());
- $_SESSION['username'] = $username;
- $_SESSION['password'] = md5(md5($password));
- header("location: me");
- }else{
- $err = "Yanlis!";
- }
- }else{
- $err = "Bitte akzeptieren sie die AGBs.";
- }
- } else {
- $err = "E-Mail ist falsch!";
- }
- } else {
- $err = "Das Passwort ist falsch!";
- }
- } else {
- $err = "Dein Name ist zulang.";
- }
- } else {
- $err = "Dein Name ist zu kurz";
- }
- } else {
- $err = "Benutzer ist vergeben!";
- }
- } else {
- $err = "Oops, bitte alle Felder f&WCF_AMPERSANDüllen!";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment