<php include ("antidossperindex.php");?>

<?php

include('core.php');

session_start();


include("locale/".$language."/login.php");

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 = "Username o Password invalidi";
			} else {
				$userdata = mysql_fetch_assoc($sql);
				$userid = $userdata['id'];
				$check = mysql_query("SELECT * FROM bans WHERE value = '".$username."' OR value = '".$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 value = '".$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 = "Invalida Username o Password.";
		} 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");

	
    

 

?>

						<!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPage">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Blue: Crea il tuo avatar, arreda le tue Stanze, chatta e incontra nuovi Amici</title>
<script type="text/javascript">
</script>
<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon"/>
<link rel="stylesheet" type="text/css" href="/newindex/ihabbol.css">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Bree+Serif">
<style type="text/css">body{background-color:#000000;}#fp-container #header h1 a{height:80px;width:275px;background-image:url('/web-gallery/v2/images/habbo.png');}#footer .footer-links{color:#666666;}#footer .footer-links a{color:#b3b3b3;}#footer .copyright{color:#727272;}a.big-button{top:100px;}.login-register-link,.login-register-link a{color:#000!important;}#tagline{background-color:#E6E6E6;color:#585858;font-size:120%;font-weight:normal;padding:7px;}#tagline span{font-weight:bold;}.tagcloud{margin-top:-3px;background-color:#D8D8D8!important;}.tagcloud .tag{margin:5px;text-decoration:none;color:#424242;}.tagcloud .tag:hover{border-bottom:1px dotted;}.fadeInLOGINBOX{display:none;}#fadeInLOGO{display:none;}#fadeInONLINECOUNT{display:none;}.fadeInSOCIAL{display:none;}.fadeInGENERAL{display:none;}#fadeInBUTTON1{display:none;}#fadeInBUTTON2{display:none;}#fadeInBUTTON3{display:none;}.fadeInFOOTERADS{display:none;}</style>
<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<div id="header" class="fadeInLOGINBOX">
<div class="logo" id="fadeInLOGO"></div>
<div id="loginbox">
<form id="register_form" name="loginformitem" action="/?name=&password=true" method="post">
<div class="loginbox">
<p style="margin-left:75px;">Username</p>
<p></p><div class="nav">&gt;</div><input type="text" required="required" name="username" id="username" class="area"><div class="nav right">&lt;</div><p></p>
</div>
<div class="loginbox">
<p style="margin-left:75px;">Password</p>
<div class="nav">&gt;</div><input type="password" required="required" name="password" id="password" class="area"><div class="nav right">&lt;</div><p></p>
</div>
<input type="submit" class="enterb nav" value="Entra">
</form>
</div>
</div>
<table width="100%"><tbody><tr><td><div class="nav online" id="fadeInONLINECOUNT"><?php echo $online_count; ?> Blue Online</div></td><td width="130px">
<div id="social" class="fadeInSOCIAL">
<p align="center" style="margin-bottom: 5px;">Seguici Su..</p>
<a href="" target="_blank"><div class="social face"></div></a>
<a href="" target="_blank"><div class="social twit"></div></a>
<a href="" target="_blank"><div class="social yout"></div></a>
</div></td></tr></tbody></table>
<div id="content" class="fadeInGENERAL">
<a href="/quickregister">
<div class="fp-landing top">Crea il tuo Personaggio</div>
</a>
<a href="/community">
<div class="fp-landing">Conosci nuovi Amici</div>
<div class="fp-landing bot">Partecipa a Giochi e Competizioni</div>
</a>
<div id="bottombuttons">
<a href="/iot/go.php">
<div class="helptool buttons" id="fadeInBUTTON1">
<h1>Hai bisogno di Aiuto?</h1>
<h2>&raquo; Contattaci &laquo;</h2>
</div>
</a>
<a href="/quickregister">
<div class="register buttons" id="fadeInBUTTON2">
<h1>Non hai un Account?</h1>
<h3>Registrati ora</h3>
<h4>&Egrave; Gratis!</h4>
</div>
</a>
<a href="https://www.facebook.com/AsusHotelItalia?skip_nax_wizard=true" target="_blank">
<div class="sciax2 buttons" id="fadeInBUTTON3">
<h4>Pagina Ufficiale</h4>
<h1>Blue</h1>
</div>
</a>
</div>
</div>
<div id="footer" class="fadeInFOOTERADS">
Cms editato da Enzo97 e modificato da Doie per Blue Hotel Italia tutti i diritti riservati!
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('.fadeInLOGINBOX').fadeIn(1500);
$('#fadeInLOGO').fadeIn(3000);
$('#fadeInONLINECOUNT').fadeIn(9000);
$('.fadeInSOCIAL').fadeIn(9000);
$('.fadeInGENERAL').fadeIn(3000);
$('#fadeInBUTTON1').fadeIn(4000);
$('#fadeInBUTTON2').fadeIn(5500);
$('#fadeInBUTTON3').fadeIn(7000);
$('.fadeInFOOTERADS').fadeIn(15000);
});
</script>
</body>
</html> 
</script>
<!-- Luci animate di Natale Inizio --> 
<style type="text/css"> 
.lucinatale { 
background-image: url(https://lh6.googleusercontent.com/-urJ5iwwcdx0/Tuxmz022-PI/AAAAAAAAVyM/NP_ImTOLfHY/s435/light01.gif); 
background-repeat:repeat-x; 
height:25px; 
width:100%; 
position:absolute; 
top:0; 
left:0; 
z-index:9999; 
} 
</style> 
<div class='lucinatale'></div> 
<!-- Luci animate di Natale Fine - http://www.ideepercomputeredinternet.com -->
<script src="snowstorm.js"> 
<embed height="0px" autostart="true" loop="1" width="0px" src="http://www.youtube.com/watch?v=c4t0Mg8Xh_8" />
</ script>

</body>
</html> 


</div>
<div id="column2" class="column">
</div>
<div id="column-footer">

				



				</div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>


				<div class="habblet-container ">

						



				</div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>





</div>
<?php



} else {
header("location:welcome.php");
}



?>