<?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
|+==================================================================
|| # iBobba Login Page by Ubercheese at RaGEZONE
\+================================================================*/
require_once('./includes/core.php');
if($user->id > 0){ header("Location:".PATH."/me"); }
$lang->addLocale("landing.login");
$data = new index_sql;
$page['name'] = $lang->loc['pagename.home'];
$page['bodyid'] = "landing";
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');
?>
<div id="column1" class="column">
<div class="habblet-container " id="create-habbo">
<div style="background-image: url(<?php echo PATH; ?>/web-gallery/v2/images/hotelview.png); width: 756px; height: 389px; margin-left: -21px;"></div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<div id="column2" class="column">
<div style="margin-top: 120px; -moz-opacity: 0.80;" class="habblet-container ">
<div class="cbb loginbox blue">
<?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="box-content clearfix">
<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="200" height="50" />
</p>
<p>
<input class="login-field" type="text" name="bean.captchaResponse" id="recaptcha_response_field" class="register-text error" value="" size="25" />
</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: 55px"><?php echo $lang->loc['sign.in']; ?></b><i></i></a>
</li>
<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>
<li class="no-label">
<a href="<?php echo PATH; ?>/register" class="login-register-link"><span><b>REGISTER NOW »</b></span></a><br />
<a href="<?php echo PATH; ?>/account/password/forgot" id="forgot-password"><span>Forgotten your password?</span></a>
</li>
</ul>
</form>
</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>
<div class="habblet-container ">
<div class="cbb clearfix red ">
<h2 class="title"><span style="float: left;">Plabbo Notices</span><span style="float: right; font-weight: normal; font-size: 75%;"></span>
</h2>
<div id="notfound-content" class="box-content">
<?php
echo "
Welcome to <b>Plabbo</b>!<br><br>
This section is currently under construction, so please bare with us!
";
?>
<div id="column3" class="column">
</div>
<div id="column-footer">
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<?php require_once('./templates/login_footer.php'); ?>