Riferimento: Electro emu non compatibile con haddo v2
Posta la index ti risolvo quel piccolo bug.
NON W AOLO QUELLO IL PROBLEMA MA VABBE ECCO:
<?php
include('core.php');
session_start();
include("locale/".$language."/login.php");
if(!session_is_registered(username)){
if(isset($_POST['username']) && isset($_POST['password'])){
$username = addslashes($_POST['username']);
$sql = mysql_query("SELECT * FROM users WHERE username = '".$username."' LIMIT 1") or die(mysql_error());
$row2s = mysql_fetch_array($sql);
$password = HoloHash($_POST['password'], $row2s[username]);
$remember_me = $_POST['_login_remember_me'];
if(empty($username) || empty($password)){
$login_error = "Perfavore, non lasciare spazi bianchi.";
} else {
$sql = mysql_query("SELECT id FROM users WHERE username = '".$username."' AND password = '".$password."' LIMIT 1") or die(mysql_error());
$rows = mysql_num_rows($sql);
if($rows < 1){
$login_error = "Nome utente o Password non validi";
} else {
$userdata = mysql_fetch_assoc($sql);
$userid = $userdata['id'];
$check = mysql_query("SELECT * FROM bans WHERE value = '".$username."' OR ipaddress = '".$remote_ip."' LIMIT 1") or die(mysql_error());
$is_banned = mysql_num_rows($check);
if($is_banned < 1){
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
if($remember_me == "true"){
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", sha1("zomq".$_SESSION['password']), time()+60*60*24*100, "/");
}
$sql3 = mysql_query("UPDATE users SET lastvisit = '".$date_full."' WHERE username = '".$username."'") or die(mysql_error());
header("location:security_check.php"); exit;
} else {
$bandata = mysql_fetch_assoc($check);
$reason = $bandata['reason'];
$expire = $bandata['expire'];
if($stamp_now < $stamp_expire){
$login_error = "Sei Stato Bannato! La Ragione Del Ban e \"".$reason."\". Scade Il ".$expire.".";
} else { // ban expired
//mysql_query("DELETE FROM users_bans WHERE userid = '".$userid."' OR ipaddress = '".$remote_ip."' LIMIT 1") or die(mysql_error());
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
if($remember_me == "true"){
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", sha1("zomq".$_SESSION['password']), time()+60*60*24*100, "/");
}
$sql3 = mysql_query("UPDATE users SET lastvisit = '".$date_full."' WHERE username = '".$username."'") or die(mysql_error());
header("location:security_check.php"); exit;
}
}
}
}
}
if(isset($_GET['error'])){
$errorno = $_GET['error'];
if($errorno == 1){
$login_error = "Password o nome utente invalidi.";
} elseif($errorno == 2){
$login_error = "Invalida Username o Password.";
} elseif(isset($_GET['ageLimit']) && $_GET['ageLimit'] == "true"){
$login_error = "Sei troppo giovane per Giocare Qui.";
}
}
include("locale/".$language."/login.php");
include('templates/frontpage/subheader.php');
?>
<?php
$do = Filtertext($_GET["do"]);
if($do == process_login)
{
print '<div id="process-content">
<div class="action-confirmation flash-message">
<div class="rounded">
<FONT size=3><b>Password o/e Nome Errati! Hai dimenticato la password ? clicca <a href="forgot.php">qui</a> per recuperarla.</b></font>
</div>
</div>
';
}
?>
<?php } else {
header("location:me.php");
}
?>
<link rel="stylesheet" type="text/css" href="/gallery/styles/index.css" media="all">
<body id="embedpage">
<div id="overlay"></div>
<div id="container" style="margin-top: 30px;">
<style type="text/css">#hotel-logo{width:200px;height:73px;background:url('/gallery/images/logo.png') no-repeat;float:left;margin-top:10px;margin-left:10px;}input[type="text"],input[type="password"]{padding:5px;width:200px;padding-right:23px;background-color:#F9F9F9;border:1px solid gray;margin:5px;text-align:left;border-radius:4px 4px 4px 4px;font-size:16px;}</style>
<div id="content">
<div id="hotel-logo"></div>
<div id="people-inside">
<b><span><span class="stats-fig"><?php echo $online_count; ?></span> Clane in Hotel</span></b>
<i></i>
</div>
<br><br><br><br><br><br>
<div id="landing-container">
<div class="cb error-message"><div class="bt"><div></div></div><div class="i1"><div class="i2">
<div style="text-align: center;" class="i3">
<form action="index.php?do=process_login" class="onboard_form" id="loginformitem" name="loginformitem" method="post"><div style="margin: 0pt; padding: 0pt;"></div>
<label for="login-username"><div class="field text_field" style="font-weight: bold; color: #D80000; font-size: 15px;">Username</div></label>
<div class="another_row">
<input tabindex="3" type="text" class="input" name="username" id="login-username" maxlength="50" style="background-image: url('/gallery/images/index/username.gif'); background-repeat: no-repeat; background-position: 178px;">
</div>
<label for="login-password"><div class="field text_field" style="font-weight: bold; color: #D80000; font-size: 15px;">Password</div></label>
<div class="one_more_row">
<input tabindex="4" type="password" class="input" name="password" id="login-password" maxlength="50" style="background-image: url('/gallery/images/index/password.gif'); background-repeat: no-repeat; background-position: 179px;">
</div>
<div class="actions">
<div class="right gistsubmit" onclick='document.getElementById("loading_spinner").style.display = "inline";'><br/>
<input style="margin-bottom:10px;" name="login-submit-button" class="submit" id="login-submit-button2" onmouseover="this.src='/gallery/images/index/entra2.png';" onmouseout="this.src='/gallery/images/index/entra1.png';" value="Entra" src="/gallery/images/index/entra1.png" type="image"/>
<input name="redirect_to" value="./register" type="hidden"/>
<input name="testcookie" value="1" type="hidden"/>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</form>
</div></div></div>
<div class="bb"><div></div></div></div>
<br><br><br>
<div id="join-now-button-container" style="filter: alpha(opacity=85); opacity: .85; -moz-opacity: .85; margin-left: 139px;"><div id="join-now-button-wrapper" style="display: block; ">
<div class="join-now-button">
<a class="join-now-link" id="register-link" href="/register" onclick="">
<span class="join-now-text-big">Registrati</span>
<span class="join-now-text-small">è Gratis</span>
</a>
<span class="close"></span>
</div></div>
</div>
</div>
<div id="landing-caption">Entra in Clane Hotel ~ Divertiti e Incontra nuovi Amici!</div>
</div>
[[/B]