<?php
/*=======================================================+
|| # HoloCMS - Website and Content Management System
|+=======================================================+
|| # Copyright © 2014 PhoenixAlive
|| #
|+=======================================================+
|| # Index v1 - Created By PhoenixAlive
|| #
mail@phoenixalivesite.it
|+=======================================================*/
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"); 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"); 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, non puoi giocare qui.";
}
}
include("locale/".$language."/login.php");
?>
<?php
$do = Filtertext($_GET["do"]);
if($do == process_login)
{
print '<div id="process-content">
<div class="action-confirmation flash-message">
<div class="rounded">
<center><font color="red"><font size=3><b>--- Il Nome o la Password inseriti sono errati! ---</b></font></font></center>
</div>
</div>
';
}
?>
<html>
<head>
<title>Habbo Hotel - Make friends, join the fun, get noticed!</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
document.habboLoggedIn = true;
var habboName = null;
var habboId = null;
var habboReqPath = "";
var habboStaticFilePath = "http://diddohotel.homepc.it/app/tpl/skins/Habbo";
var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "http://diddohotel.homepc.it/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "client";
HabboClient.maximizeWindow = true;
}
</script>
<!-- Style import -->
<link rel="stylesheet" href="./css/common.css">
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700' rel='stylesheet' type='text/css'>
</head>
<body id="home">
<div class="wrapper">
<img src="img/habbologo_whiteR.out.png" style="margin-bottom: 10px; margin-top: 80px;">
<div class="form squared_effect-white">
<form method="POST" action="#">
<input type="text" name="log_username" class="loginForm" placeholder="Username"><br>
<input type="password" name="log_password" class="loginForm" placeholder="Password">
<input type="submit" class="button" value="Login" name="login" style="width: 256px;">
<script type="text/javascript">
HabboView.add(function() {
LandingPage.init();
if (!LandingPage.focusForced) {
LandingPage.fieldFocus('login-username');
}
});
</script>
</ul>
</form>
</div>
<a href="/register"><div class="register-button squared_effect-red" style="width: 256px; border-radius: 5px;">Registrati Ora!</div></a>
<a href="#"><div class="admin-button squared_effect-blue" style="width: 256px; border-radius: 5px;">11 Diddo Online!</div></a>
</div>
<!--<div class="wrapper">
<div class="form squared_effect-white">
This is a twitter widget
</div>
</div>-->
</body>
<footer style="margin-top:450px;">
<div class="form squared_effect-white">Index Rewritten By Shine based on a Ragezone Project adapted,rewritten and Translated By Shine. HABBO is a registered trademark of Sulake Corporation. All rights reserved to their respective owner(s). We are not endorsed, affiliated, or sponsered by Sulake Corporation Oy.</div>
</footer>
<?php } else {
header("location:me");
}
?>