Hilfe! Was ist hier der Fehler, der Bildschirm ist nur weiss wenn ich das als Index benutze
Chubba.net/hb_index.php
--------------------------------------------------------------------------------------------
<?php
require_once('../data_classes/server-data.php_data_classes-core.php.php');
session_start();
if(isset($_GET['registerCancel']) && $_GET['registerCancel'] == "true"){
session_unset();
}
if(!session_is_registered(username)){
if(isset($_POST['username']) && isset($_POST['password'])){
$username = FilterText($_POST['username']);
$password = HoloHash($_POST['password'], $username);
$password2 = HoloHashMD5($_POST['password'], $username);
if(empty($username) empty($_POST['password'])){
$login_error = "Bitte gib dein Username und dein Passwort ein, um dich einzuloggen.";
} else {
$sql = mysql_query("SELECT id FROM users WHERE username = '".$username."' AND password = '".$password."' OR username = '".$username."' AND password = '".$password2."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($sql) < 1){
$login_error = "Username oder Passwort falsch";
} else {
$userdata = mysql_fetch_assoc($sql);
$userid = $userdata['id'];
$ban = mysql_query("SELECT * FROM bans WHERE value = '".$username."' AND bantype = 'user' or value = '".$remote_ip."' AND bantype = 'ip' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($ban) < 1){
mysql_query("UPDATE users SET password = '".$password2."', ip_last = '".$remote_ip."' WHERE username = '".$username."'");
$_SESSION['username'] = $username;
$_SESSION['password'] = $password2;
if($_POST['_login_remember_me'] == "true"){
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", $_SESSION['password'], time()+60*60*24*100, "/");
}
header("location: $path/me"); exit;
} else {
$bandata = mysql_fetch_assoc($ban);
$timestamp = time();
if($bandata['expire'] > $timestamp){
$login_error = "Du bist gebannt! Der Grund für deinen Bann lautet \"" . $bandata['reason'] . "\" und dauert bis " . date('d.m.Y - H:i:s', $bandata['expire']) . ".";
} else {
mysql_query("DELETE FROM bans WHERE value = '".$username."' AND bantype = 'user' OR value = '".$remote_ip."' AND bantype = 'ip' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE users SET password = '".$password2."', ip_last = '".$remote_ip."' WHERE username = '".$username."'");
$_SESSION['username'] = $username;
$_SESSION['password'] = $password2;
if($_POST['_login_remember_me'] == "true"){
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", $_SESSION['password'], time()+60*60*24*100, "/");
}
header("location: $path/me"); exit;
}
}
}
}
}
$body_id = "index";
$pagename = "Erstelle deinen ".$shortname.", designe deinen Raum, chatte und triff neue Freunde";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title><?php echo $shortname; ?> » <?php echo HoloText($pagename); ?> </title>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII" />
<link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<center> <?php if(isset($login_error)){ ?><br>
<div id="subnavi_top"></div>
<div id="subnavi_mid">
<div style="padding-top:5px;padding-bottom:5px;">
<?php echo $login_error; ?>
</div>
</div>
<div id="subnavi_bot"></div><br>
<?php } ?>
<div id="page">
<div id="top"></div>
<div id="userbar">
<div style="text-align:left; padding-left:30px;padding-top:15px;">
<form action="<?php echo $path; ?>/" method="post" class="login-habblet">
<img src="nr17_img/new_09.gif" border="" height="" width="" alt=""/>
<input type="text" name="username" size="20">
<img src="nr17_img/nav_2.gif" border="" height="" width="" alt=""/>
<input type="password" name="password" size="20">
<input type="submit" value="Login"/>
</div>
</div>
<div id="header"></div>
<div id="navibar" style="text-align:left;">
<div id="navilink">
<a href="/quickregister/start" class="login-register-link" onclick="HabboClient.closeHabboAndOpenMainWindow(this); return false;">Neu hier? Registriere dich hier kostenlos! </a> <?php echo $online_count; ?> Online
</div>
</div>
<br> <br>
<?php require_once('../templates/login_footer.php');?>
</div>
</center>
</body>
</html>
<?php
} else {
header("location:../me");
}