<?php
/*===================================================+ 
|| # HoloCMS - Website and Content Management System
|+===================================================+ 
|| # Copyright © 2012 DnT [Tutti i diritti riservati]
|| # http://dnt.webnet32.com/
|+===================================================+ 
|| # DnT HoloCMS v2.1 - Created By Donatello (DnT)
|| # http://code.google.com/p/dnt-project/downloads/list
|+===================================================*/ 

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 = "Username o Password errati";
			} 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 = "<center>Sei stato bannato per il seguente motivo: \"".$reason."\".<br>Il tuo BAN scade il: ".$expire.".</center>";
					} 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 = "Username o Password errati";
		} elseif($errorno == 2){
			$login_error = "Username o Password errati";
		} elseif(isset($_GET['ageLimit']) && $_GET['ageLimit'] == "true"){
			$login_error = "Sei troppo giovane per Giocare Qui.";
		}
	}


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


		<!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="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"> 

<head> 

	<meta http-equiv="content-type" content="text/html" /> 

	<title><?php echo $sitename; ?>: Benvenuto!</title> 



 



<link rel="alternate" type="application/rss+xml" title="Habbo: RSS" href="http://www.habbo.fr/articles/rss.xml" /> 



<meta name="csrf-token" content="41552b15ca"/> 





<link rel="stylesheet" href="http://bobbalive.fr/index1/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/739/web-gallery/static/styles/frontpage.css" type="text/css" />



<script src="http://bobbalive.fr/index1/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/739/web-gallery/static/js/libs2.js" type="text/javascript"></script>

<script src="web-gallery/static/js/common.js" type="text/javascript"></script>

<script src="http://bobbalive.fr/index1/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/739/web-gallery/static/js/landing.js" type="text/javascript"></script>


<center>				</center>

 

<meta property="fb:app_id" content="141638795959921" /> 



<style type="text/css">





        body {



             background-color: #000000;



            



        }



        #footer .footer-links   { color: #666666; }



            #footer .footer-links a { color: #b3b3b3; }



            #footer .copyright      { color: #727272; }



#bobba-logo {

width:201px;

height:100px;

background:url(./web-gallery/v2/images/habbo.png) 

no-repeat;

float:left;

margin-top:20px;

margin-left:10px;

display:inline



}

#people-inside {

    display: block;

    float: right;

    height: 65px;

    overflow: hidden;

    position: relative;

    right: 100px;

    top: 30px;

    white-space: nowrap;

    z-index: 100;

}

#people-inside2{

display:block;

float:right;

height:65px;

position:relative;

overflow:hidden;

white-space:nowrap;

z-index:90;

top:100px;

right:420px;

}

#people-inside2 .stats-fig{font-size:18px;font-weight:bold}

#people-inside2 b{

float:left;

padding:5px 10px 4px 16px;

font-size:11px;height:56px

;min-width:45px;

max-width:145px;

margin-right:8px;

background:transparent url(http://bobbalive.fr/index1/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/739/web-gallery/v2/images/frontpage/users_online_bubble.png) no-repeat -8px 0;

color:#000;

font-weight:normal;

text-align:center;

display:inline;

}

#people-inside2 i{

position:absolute;

right:0;

top:0;

width:8px;

height:65px;

background:transparent url(http://bobbalive.fr/index1/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/739/web-gallery/v2/images/frontpage/users_online_bubble.png) no-repeat 0 0

}#people-inside span{

display:block

people-inside .stats-fig{

font-size:18px;

font-weight:bold

}

#change-password-form{

position:absolute;

width:383px;

z-index:9001;

color:#fff;

}

#people-inside3{

display:block;

float:right;

height:65px;

position:relative;

overflow:hidden;

white-space:nowrap;

z-index:90;

top:190px;

right:420px;

}

    </style> 

<meta name="description" content="DnT HoloCMS v2 - Created By Donatello (DnT)" />



<meta name="keywords" content="dnt cms retros" />

 



<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
Cookie.erase("fbsr_309555212435126");
$(document).fire("fbevents:scriptLoaded");
};
window.assistedLogin = function(FBobject, optresponse) {
Cookie.erase("fbsr_1309555212435126");
FB.init({
appId: '<?php echo APP_ID; ?>', 
status: true, 
cookie: true, 
xfbml: true, 
oauth: true
});
permissions = 'user_birthday,email';
defaultAction = function(response) {
if (response.authResponse) {
fbConnectUrl = "/facebook/index.php?connect=true";
Cookie.erase("fbhb_val_309555212435126");
Cookie.set("fbhb_val_309555212435126", response.authResponse.accessToken);
Cookie.erase("fbhb_expr_309555212435126");
Cookie.set("fbhb_expr_309555212435126", response.authResponse.expiresIn);
window.location.replace(fbConnectUrl);
}
};
if (typeof optresponse == 'undefined')
FB.login(defaultAction, {scope:permissions});
else
FB.login(optresponse, {scope:permissions});
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/it_IT/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>

</head> 









<body id="frontpage">





<b></b>





<div id="overlay"></div>





        <div id="change-password-email-sent-notice" style="display: none;">



            



            



    <div id="change-password-form-container-bottom"></div>



</div>

<div id="site-header">


    <form id="loginformitem" name="loginformitem" action="./index.php?do=process_login" method="post">



    



        <div style="clear: both;"></div>

        <div id="site-header-content">

		<div id="bobba-logo"></div>





            <div id="login-form">









                <div id="login-form-email">



                    <label for="login-username"



                           class="login-text">Username</label>



                    <input tabindex="3" type="text" class="login-field" x-webkit-speech name="username" id="login-username"



                           value="" maxlength="48"/>



                    <input tabindex="6" type="checkbox" name="_login_remember_me" id="login-remember-me"



                           value="true"/>



                    <label for="login-remember-me">Ricordami</label>







<div id="landing-remember-me-notification" class="bottom-bubble" style="display:none;"> 

	

	



</div> 





                </div>







                <div id="login-form-password">
                    <label for="login-password" class="login-text">Password</label>
                    <input tabindex="4" type="password" class="login-field" name="password"
                           id="login-password" maxlength="32"/>
                    <div id="login-forgot-password">


                    </div>


                    <div id="login-forgot-password">
                        <a href="../quickregister/forgot" id="forgot-password"><span>Password dimenticata?</span></a>
                    </div>
                </div>







                <div id="login-form-submit">



                    <input type="submit" value="Entra" class="login-top-button"



                           id="login-submit-button"/>



                    <a href="#" tabindex="5"



                       id="login-submit-new-button"><span>Entra</span></a>



                </div>





            </div>







            <div id="rpx-login">



                <div>



<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
Cookie.erase("fbsr_309555212435126");
$(document).fire("fbevents:scriptLoaded");
};
window.assistedLogin = function(FBobject, optresponse) {
Cookie.erase("fbsr_1309555212435126");
FB.init({
appId: '<?php echo APP_ID; ?>', 
status: true, 
cookie: true, 
xfbml: true, 
oauth: true
});
permissions = 'user_birthday,email';
defaultAction = function(response) {
if (response.authResponse) {
fbConnectUrl = "/facebook/index.php?connect=true";
Cookie.erase("fbhb_val_309555212435126");
Cookie.set("fbhb_val_309555212435126", response.authResponse.accessToken);
Cookie.erase("fbhb_expr_309555212435126");
Cookie.set("fbhb_expr_309555212435126", response.authResponse.expiresIn);
window.location.replace(fbConnectUrl);
}
};
if (typeof optresponse == 'undefined')
FB.login(defaultAction, {scope:permissions});
else
FB.login(optresponse, {scope:permissions});
};
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/it_IT/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>

<a class="fb_button fb_button_large" href="http://dnt.webnet32.com/FacebookLogin/" return false;">

    <span class="fb_button_text">Entra con Facebook</span>

</a>

                </div>



                <div>

<div id="rpx-signin">



    <a class="rpxnow"><u>Ci sono <?php echo $online_count; ?> utenti connessi!</u></a>







</div>

                </div>







            </div>







<noscript>

</div>



</noscript>







<div id="alert-cookies-container" style="display:none">



    <div id="alert-cookies-title">



        <center></center>



    </div>



    <div id="alert-cookies-text">



        <center></center>



    </div>



</div>

       </div>







    </form>







</div>







<div id="fp-container">



    <div id="content">



    <div id="column1" class="column"> 

			     		

				<div class="habblet-container ">		

	

						<div style="width: 890px; margin: 0 auto">



        <div id="tagline">Incontra nuovi Amici, divertiti e fatti conoscere!</div>



</div>







<div id="frontpage-image-container">



 <div id="join-now-button-container">

        <div id="join-now-button-wrapper-fb">

            <div class="join-now-alternative">&nbsp;</div>

            <div class="join-now-button">

                <a class="join-now-link" href="#" onclick="assistedLogin(FB); return false;"> 

                    <span class="join-now-text-big">Hotel</span>

                    <span class="join-now-text-small">con
					<span class="fbword">Facebook</span></span>

                </a>

                <span class="close"></span>

            </div>

            <div class="join-now-alternative">

                <a id="register-link-fb" href="./quickregister/start" onclick="startRegistration(this); return false;">

           

                </a>

            </div>

        </div>

        <div id="join-now-button-wrapper">

            <div class="join-now-alternative">

                <a href="./quickregister/start" class="newusers" onclick="startRegistration(this); return false;"><b>Sei nuovo?</b><span style="color: #8f8f8f;">Iscriviti ora!</span></a>

            </div>

            <div class="join-now-button">

                <a class="join-now-link" id="register-link" href="./quickregister/start" onclick="startRegistration(this); return false;"> 

                    <span class="join-now-text-big">Entra ora</span>

                    <span class="join-now-text-small">&egrave gratis !</span>

                </a>

                <span class="close"></span>

            </div>

            <div class="join-now-alternative">

                <a class="fbicon" href="http://www.facebook.com/groups/144401245615436/"; return false;">

                Seguici su Facebook

                </a>

            </div>

        </div>

    </div>






	   <div id="people-inside2">



        <b><span><span class="stats-fig">

		<?php echo $online_count; ?></br>

		

		</span>Connessi!</span></b>



        <i></i>



    </div>













    <a href="./quickregister/start" id="frontpage-image" style="background-image: url('http://dnt.webnet32.com/DCR/c_images/Frontpage_images/xmas.png')" onclick="startRegistration(this); return false;"></a>

	<script type="text/javascript">



    var sb = new SpeechBubble();



    var i = 0;

	

        sb.add("fp-bubble-" + i++, "frontpage-image", 210, 300, "I <b>Gruppi</b> funzionano in Hotel!");



        sb.add("fp-bubble-" + i++, "frontpage-image", 750, 224, "Registrati con Facebook in Hotel! ");



      sb.add("fp-bubble-" + i++, "frontpage-image", 600, 100, "Entra e conosci nuovi amici!");



    HabboView.add(function() {



        sb.render();



    });



</script>





</div>







<div id="footer" class="new_and_improved">
<p class="footer-links"><font color="white">
<a href="http://dnt.webnet32.com/">DnT WebSite</a> | <a href="http://code.google.com/p/dnt-project/downloads/list">DnT Project</a> | <a href="http://dnt-official.forumfree.it/">Forum</a> | <a href="http://www.facebook.com/groups/144401245615436/">FaceBook</a> | <a href="http://dnt.webnet32.com/PROMOZIONI/">Promozioni</a> | <a href="./rules">Regolamento</a> | <a href="./staff">Staff</a>
</p></font>



      <hr>  


    <div id="age-recommendation"></div>


<p class="copyright"><font color="gray"><b>DnT HoloCMS v2.1</b> &copy 2012 Created By <b>Donatello (DnT)</b><br>Non facciamo parte di HABBO o della Sulake Group.</p><br>



</div>

</div>

<center>



	

						

							

		

<!--[if lt IE 7]>

<script type="text/javascript">

Pngfix.doPngImageFix();

</script>

<![endif]-->

    </div>



</div>




    <!-- Start Quantcast tag -->






</body> 

</html>

<?php



} else {
header("location:../me");
}

?>