<?php
#############################################################################
#|-| |-| Index desenvolvida por L3o & Paradie |-| |-|#
# ------------------------------------------------------------------------- #
#|-| |-| Site: http://l3yout.tk |-| |-|#
#|-| |-| Skype: leo_martins_2@live.com |-| |-|#
#############################################################################
require_once('./data_classes/server-data.php_data_classes-core.php.php');
session_start();
if(isset($_GET['registerCancel']) && FilterText($_GET['registerCancel'] == "true")){
session_unset();
}
if(!session_is_registered(username)){
if(isset($_POST['username']) && isset($_POST['password'])){
$username = FilterText($_POST['username']);
$password = HoloHash($_POST['password'], $username);
$password2 = HoloHashMD5($_POST['password'], $username);
if(empty($username) || empty($_POST['password'])){
$login_error = "Usuário ou senha incorretos!";
} else {
$sql = mysql_query("SELECT id FROM users WHERE username = '".$username."' AND password = '".$password."' OR username = '".$username."' AND password = '".$password2."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($sql) < 1){
$login_error = "Usuário ou senha incorretos!";
} else {
$userdata = mysql_fetch_assoc($sql);
$userid = $userdata['id'];
$ban = mysql_query("SELECT * FROM bans WHERE value = '".$username."' AND bantype = 'user' or value = '".$remote_ip."' AND bantype = 'ip' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($ban) < 1){
mysql_query("UPDATE users SET password = '".$password2."', ip_last = '".$remote_ip."' WHERE username = '".$username."'");
$_SESSION['username'] = $username;
$_SESSION['password'] = $password2;
if ($_POST['_login_remember_me'] == "true"){
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", $_SESSION['password'], time()+60*60*24*100, "/");
}
header("location: $path/me"); exit;
} else {
$bandata = mysql_fetch_assoc($ban);
$timestamp = time();
if($bandata['expire'] > $timestamp){
$login_error = "Você foi banido por: \"" . $bandata['reason'] . "\" e acaba em: " . date('d.m.Y - H:i:s', $bandata['expire']) . ".";
} else {
mysql_query("DELETE FROM bans WHERE value = '".$username."' AND bantype = 'user' OR value = '".$remote_ip."' AND bantype = 'ip' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE users SET password = '".$password2."', ip_last = '".$remote_ip."' WHERE username = '".$username."'");
$_SESSION['username'] = $username;
$_SESSION['password'] = $password2;
if ($_POST['_login_remember_me'] == "true"){
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", $_SESSION['password'], time()+60*60*24*100, "/");
}
header("location: $path/me"); exit;
}
}
}
}
}
$body_id = "index";
?>
<!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="https://www.facebook.com/2008/fbml">
<head>
<script src="script.js"></script>
<?php header("Content-Type: text/html; charset=iso-8859-1",true); ?>
<meta name="description" content="Paradise is a place where you can build awesome rooms, meet and make cool friends and express yourself with your own avatar, for free!"/>
<meta name="keywords" content="habbo hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer"/>
<title><?php echo $shortname; ?> - Diversão aqui não falta!</title>
<link rel="shortcut icon" href="http://l3yout.tk/favicon.ico" type="image/vnd.microsoft.icon"/>
<link rel="stylesheet" type="text/css" href="css_index/global.css"/>
<script type="text/javascript" src="jquery.js"></script>
<script>
$(document).ready(function () {
$('[placeholder]').focus(function () {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function () {
var input = $(this);
if (input.val() == '' || input.val() == input.attr('placeholder')) {
input.addClass('placeholder');
input.val(input.attr('placeholder'));
}
}).blur();
});
</script>
<style>
.placeholder { color: #aaa; }
</style>
</head>
<body>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script>
$(function() {
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
OK: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-message" title="Bem vindo(a) ao COCA!">
<p>
<center> Sobre o <b>Coca Hotel</b> </center>
</p>
<p><center>
Aqui você se diverte, constrói quartos e faz amigos! O Coca Hotel funciona 24 horas por dia, logo, não perca um minutinho sem se divertir conosco!
Coca Hotel - fazendo o melhor por você e para você!
</p></center>
</div>
<?php if(isset($login_error)){ ?>
<?php } ?>
<center>
<div class="allContent">
<div class="logo"></div>
<div class="loginSection">
<form action="<?php echo $path; ?>" method="POST">
<input type="text" name="username" placeholder="Nome de Usuário" class="inputLogin" class="area mal" maxlength="20" autocomplete="off" required autofocus>
<input type="password" name="password" placeholder="Password" class="inputLogin" class="area mal" />
<input type="submit" class="loginButton" value="Entrar" style="color:#FFF;" />
</form>
<?php
} else {
header("location:me.php");
}
?>
</div>
<br clear="both" />
<div class="loginContent">
<div class="landingImage"></div>
<div class="registerSection">
<a href="/quickregister/start" style="text-decoration:none;">
<div id="registerButton">
<center>
<span>Registre-se</span>
é <b>GRÁTIS</b>!
</center>
</div>
</a>
</div>
<div class="loginImage">
<div class="avatarImage">
<img src="img_index/4.png" title="Oi, sou o Je4n." />
</div>
<div class="avatarImage">
<img src="img_index/3.png" />
</div>
<div class="avatarImage">
<img src="img_index/2.png" title="Oi, sou o L3o." />
</div>
<div class="avatarImage">
<img src="img_index/1.png" />
</div>
<div class="avatarMessage">Oque você está esperando? Registre-se agora!</div>
</div>
</div>
</div>
</center>
<div class="credits"><a href="#">Etiqueta</a> | <a href="/community/staff">Equipe</a> | <a href="http://pixelacao.zz.mu">Píxel Ação</a> | <a href="http://l3yout.tk">L3yout</a><p><br />
Todos os direitos reservados á Je4n & L3o.
</div>
</body>
</html>