
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|| # All images, scripts, and layouts
|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.
|+==================================================================
|| # PHPRetro is provided "as is" and comes without
|| # warrenty of any kind. PHPRetro is free software!
|| # License: GNU Public License 3.0
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/

require_once('./includes/core.php');

if($settings->find("site_new_landing_page") == "1"){ require_once("./landing.php"); exit; }
$lang->addLocale("landing.login");

$data = new index_sql;

$page['name'] = $lang->loc['pagename.home'];
$page['bodyid'] = "landing";

if($user->id > 0){ header("Location:".PATH."/me"); }

if(!empty($_GET['error'])){
	$error = $input->HoloText($_GET['error']);
	if(!is_numeric($error)){ $error = 2; }
	$error = $lang->loc['error.'.$error];
}elseif(!empty($_SESSION['error'])){
	$error = $_SESSION['error'];
	unset($_SESSION['error']);
}

$username = $input->HoloText($_GET['username']);
$rememberme = $input->HoloText($_GET['rememberme']);
$pageto = $input->HoloText($_GET['page']);

if(!isset($_SESSION['login'])){
	$_SESSION['login']['enabled'] = true;
	$_SESSION['login']['tries'] = 0;
}

require_once('./templates/login_header.php');

?>



<?php
	if(isset($error)){
		echo "\n<div class=\"action-error flash-message\">\n <div class=\"rounded\">\n  <ul>\n   <li>".$error."</li>\n  </ul>\n </div>\n</div>\n";
	}
?>

	<div class="cbb loginbox clearfix" id="column1">
    <h2 class="title"><span style="float: left;">Account Login</h2></span>

    

    <div class="box-content clearfix" id="login-habblet">
<center>
<a href="register" target="blank"><img src="web-gallery/v2/images/habbo.png" border=0></a> 
</center>
	<form action="<?php echo PATH; ?>/account/submit" method="post" class="login-habblet">
			<?php if(isset($_GET['page'])){ ?><input type="hidden" name="page" value="<?php echo $pageto; ?>" /><?php } ?>


            <ul>
                <li>
                    <label for="login-username" class="login-text"><?php echo $lang->loc['username']; ?></label>
                    <input tabindex="1" type="text" class="login-field" name="username" id="login-username" value="<?php echo $username; ?>"/>
                </li>
                <li>
                    <label for="login-password" class="login-text"><?php echo $lang->loc['password']; ?></label>
                    <input tabindex="2" type="password" class="login-field" name="password" id="login-password" />
<?php if($_SESSION['login']['tries'] > 4 && $settings->find("site_capcha") == "1"){ ?>
                </li>


                <li>

<h3>

<label for="bean_captcha" class="registration-text"><?php echo $lang->loc['type.security.code']; ?></label>
</h3>

<div id="captcha-code-error"></div>

<p></p>

<div class="register-label" id="captcha-reload">
    <p>
        <img src="<?php echo PATH; ?>/web-gallery/v2/images/shared_icons/reload_icon.gif" width="15" height="15" alt=""/>
        <a id="captcha-reload-link" href="#"><?php echo $lang->loc['cannot.read.code']; ?></a>
    </p>

</div>

<script type="text/javascript">
document.observe("dom:loaded", function() {
    Event.observe($("captcha-reload"), "click", function(e) {Utils.reloadCaptcha()});
});
</script>



<p id="captcha-container">
    <img id="captcha" src="<?php echo PATH; ?>/captcha.jpg?t=<?php echo time(); ?>" alt="" width="150" height="50" />
</p>

<p>
<input type="text" name="captcha" id="captcha-code" value="" class="registration-text required-captcha" />
</p>
<?php } ?>
	                <input type="submit" value="<?php echo $lang->loc['sign.in']; ?>" class="submit" id="login-submit-button"/>
	                <a href="#" id="login-submit-new-button" class="new-button" style="float: left; margin-left: 0;display:none"><b style="padding-left: 10px; padding-right: 7px; width: 80px"><?php echo $lang->loc['sign.in']; ?></b><i></i></a>
              <li class="no-label">
                    <input tabindex="3" type="checkbox" value="true" name="_login_remember_me" id="login-remember-me"<?php if(isset($_GET['rememberme']) && $rememberme = "true"){ echo " checked=\"checked\""; }elseif($rememberme = "false"){ echo " checked=\"unchecked\""; } ?>/>
                    <label for="login-remember-me"><?php echo $lang->loc['remember.me']; ?></label>
                </li>
<a href="register.php">Register for free</a>
            
            </ul>


        </form>

</div>


</div>
<div id="column1" class="column">
				<div class="habblet-container ">
						<div class="cbb clearfix white ">
<div class="box-content clearfix">
<b>UKRP Hotel</b> is a role-play environment provided by <b>UK-Studios</b> for teens. Our goal is to reach out to teens to provide them with the best online fun entertainment on the globe. Our virtual network is safe and reliable and it's all <b>free!</b>
							</div>
</div>



    </div>
</div>
<div id="remember-me-notification" class="bottom-bubble" style="display:none;">
	<div class="bottom-bubble-t"><div></div></div>
	<div class="bottom-bubble-c">
	<?php echo $lang->loc['remember.warning']; ?>
	</div>
	<div class="bottom-bubble-b"><div></div></div>
</div>
<script type="text/javascript">
	HabboView.add(LoginFormUI.init);
	HabboView.add(RememberMeUI.init);
</script>



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

				<div class="habblet-container ">

						<div class="ad-container">
<div id="geoip-ad" style="display:none">
</div></div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
			 
</div>
<div id="column3" class="column">

<div id="column-footer">

		

</div>
</div>
</div>



							



				
<?php require_once('./templates/login_footer.php'); ?>
</div>
</div>