Hallo Towner ich hab ein Problem ich kann mich nicht einloggen hier die index
PHP
<?php
require_once('./data_classes/server-data.php_data_classes-core.php.php');
if(isset($_SESSION['username'])){
header("Location: ".$path."/me");
exit();
}
if(empty($_SESSION['username']))
{
if(isset($_POST['username']) && isset($_POST['password']))
{
$username = FilterText($_POST['username']);
$password = FilterText(HoloHash($_POST['password'], $username));
$password2 = FilterText(HoloHashMD5($_POST['password'], $username));
if(empty($username))
{
$login_error = "Please enter your username to log in.";
$loginerror = array("username");
}
else if(empty($password))
{
$login_error = "Please enter your password to log in.";
$loginerror = array("password");
}
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 = "Incorrect username or password.";
$loginerror = array("username", "password");
}
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 wurdest gebannt der grund dafür ist:" . $bandata['reason'] . "\" y durara hasta el " . 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;
}
}
}
}
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Habbo: Join us</title>
<link rel="stylesheet" type="text/css" href="http://localhost/css/index.css">
<link rel="stylesheet" type="text/css" href="http://localhost/fuente/index.css">
<link href="favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
<div id="general">
<div id="header">
<a href="http://www.inhabbo.com"><div class="logo"></div></a>
<div id="redes">
<a href=""><div class="red rss"></div></a>
<a href="http://www.youtube.com/flinkgfx"><div class="red yt"></div></a>
<a href="http://www.facebook.com/pages/inHabbo-Dise%C3%B1os-para-todo/241871632560219"><div class="red face"></div></a>
<a href="http://www.twitter.com/inHabbocom"><div class="red twit"></div></a>
</div>
<div class="usuarios">
<h1><?php echo $online_count; ?> users online</h1>
</div>
</div>
<?php if(isset($login_error)) { echo '<div id="mal"> ' . $login_error . ' </div>';} ?>
<div id="contenido">
<div id="entrada">
<form action="http://localhost/" method="post">
<p><div class="icono somb"><span class="us"></span></div>
<?php $input = ($loginerror["username"] != null) ? "area mal somb" : "area somb"; ?>
<input type="username" class="<?php echo $username; ?>" placeholder="Username" required autofocus></p>
<?php $password = ($loginerror["password"] != null) ? "area mal somb" : "area somb"; ?>
<p><div class="icono somb"><span class="cl"></span></div><input type="password" class="<?php echo $password; ?>" placeholder="Password" required></p>
<p><input type="submit" class="entrar" value="Login"></p>
</form>
</div>
<div id="hotel"></div>
<a href="<?php echo $path; ?>/quickregister/start">
<div id="registro">
<h2>jetzt gratis</h2>
<h2>Anmelden</h2>
</div>
</a>
</div>
<div id="hotelg">
<div class="noticias"></div>
<div id="twitter">
<div class="titulo">Habbo</div>
<div class="texto">Erlebe viel spaß & lerne neue Freunde kennen.</div>
</div>
</div>
<div id="footer">
<a href="http://www.youtube.com/flinkgfx"><div class="flink"></div></a>
<div class="footer">
<a href="http://retrotown.ws">Retrotown</a>| 2012
</div>
</div>
</div>
</body></html>
Alles anzeigen
Hoffe das jemand mir hilft der "PHP" Kann