Ajuda index 14.09.12 22:26
CÓDIGO DA INDEX:
- Código:
<?php
require_once('./data_classes/server-data.php_data_classes-core.php.php');
session_start();
if(isset($_GET['registerCancel']) && $_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 = "Digite seu nome de usuário e senha para login.";
} 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 = "Nome de usuário ou senha incorreta";
} 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 = "Du bist gebannt! Der Grund für deinen Bann lautet \"" . $bandata['reason'] . "\" und dauert bis " . 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";
$pagename = "Erstelle deinen ".$shortname.", designe deinen Raum, chatte und triff neue Freunde";
?>
<!-- Habbo Index by Crookie | MADE FOR FANS -->
<!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; charset=utf-8" />
<title><?php echo $sitename; ?> Diverção aqui é o que não falta! </title>
<link rel="shortcut icon" href="data/images/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="stylesheet" href="data/css/frontpage.css" type="text/css" />
<script src="data/js/libs2.js" type="text/javascript"></script>
<script src="data/js/landing.js" type="text/javascript"></script>
<script src="data/js/visual.js" type="text/javascript"></script>
<script src="data/js/libs.js" type="text/javascript"></script>
<script src="data/js/common.js" type="text/javascript"></script>
<script src="data/js/fullcontent.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" href="data/css/style.css" type="text/css" />
<script type="text/javascript" src="data/js/modernizr.custom.28468.js"></script>
<link href='http://fonts.googleapis.com/css?family=Economica:700,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="data/css/box.css" />
<style type="text/css">
body {
background-color: #000000;
}
#footer .footer-links { color: #666666; }
#footer .footer-links a { color: #ffffff; }
#footer .copyright { color: #666666; }
#footer #compact-tags-container span, #footer #compact-tags-container a { color: #333333; }
</style>
</head>
<body id="frontpage">
<div id="overlay"></div>
<div id="site-header">
<form id="register_form" name="loginformitem" action="<?php echo $path; ?>?name=<?php echo FilterText($_POST['username']); ?>&password=true" method="post">
<?php if(isset($login_error)){ ?>
<div id="loginerrorfieldwrapper">
<div id="loginerrorfield">
<div><?php echo $login_error; ?></div>
</div> </div>
<?php } ?>
<div style="clear: both;"></div>
<div id="site-header-content">
<div id="habbo-logo"></div>
<div id="login-form">
<div id="login-form-email">
<label for="login-username"
class="login-text">Usuário</label>
<input tabindex="3" type="text" class="login-field" 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">Mantenha-me Conectado</label>
<div id="landing-remember-me-notification" class="bottom-bubble" style="display:none;">
<div class="bottom-bubble-t"><div></div></div>
<div class="bottom-bubble-c">
By selecting this you will stay logged in to <?php echo $sitename; ?>, until you "Log out".
</div>
<div class="bottom-bubble-b"><div></div></div>
</div>
</div>
<div id="login-form-password">
<label for="login-password" class="login-text">Senha</label>
<input tabindex="4" type="password" class="login-field" name="password"
id="login-password" maxlength="32"/>
<div id="login-forgot-password">
<a href="#" id="forgot-password"><span>Esqueceu a senha?</span></a>
</div>
</div>
<div id="login-form-submit">
<input type="submit" value="Entrar" name="login">
</div>
</div>
<div id="rpx-login">
<div>
<div id="fb-root"></div>
<div class=" fb_reset" id="fb-root"><script src="data/js/all.js" async=""></script><div style="position: absolute; top: -10000px; height: 0px; width: 0px;"><div><iframe src="data/xd_arbiter.htm" name="fb_xdm_frame_http" id="fb_xdm_frame_http"></iframe><iframe src="data/xd_arbiter_002.htm" name="fb_xdm_frame_https" id="fb_xdm_frame_https"></iframe></div><div></div></div></div>
<a class="fb_button fb_button_large" onclick="assistedLogin(FB); return false;">
<span class="fb_button_text">Login via Facebook</span>
</a>
</div>
<div>
<div id="rpx-signin">
<a class="rpxnow" onclick="return false;" href="#">Outras formar de login</a>
</div> </div>
</div>
<noscript>
<div id="alert-javascript-container">
<div id="alert-javascript-title">
Missing JavaScript support
</div>
<div id="alert-javascript-text">
Javascript is disabled on your browser. Please enable JavaScript or upgrade to a Javascript-capable browser to use <?php echo $sitename; ?> :)
</div>
</div>
</noscript>
<div id="alert-cookies-container" style="display:none">
<div id="alert-cookies-title">
Missing cookie support
</div>
<div id="alert-cookies-text">
Cookies are disabled on your browser. Please enable cookies to use <?php echo $sitename; ?>.
</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" style="padding: 4px 60px 15px;"><?php echo $sitename; ?> Hotel... Você não imagina o que acontece Aqui!<a href="./quickregister/start"><img style="margin-left:35px;cursor: pointer;position:absolute;" src="data/images/enbutton.png" onmouseover="this.src='data/images/enbutton2.png'" onmouseout="this.src='data/images/enbutton.png'"></a></div>
</div>
<div id="frontpage-image-container">
<div id="people-inside">
<b><span><span class="stats-fig"><?php echo $online_count; ?></span>Ruffles's Onlines</span></b>
<i></i>
</div>
<table width="486"align=left cellspacing="0" cellpadding="0">
<tbody><tr><td><div id="oberteil">Quartos Populares</div>
<div id="da-slider" class="da-slider">
<div class="da-slide">
<div class="da-img" ><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/library.png" /></div>
<div class="titel"><?php echo $sitename; ?> Guias
<div class="owner">Diversão</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/piknik.png" /></div>
<div class="titel">Parque
<div class="owner">Ar Livre</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/lido.png"/></div>
<div class="titel"><?php echo $sitename; ?> Praia
<div class="owner">Amigos</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/niko.png"/></div>
<div class="titel">Floresta
<div class="owner">Lazer</div></div>
</div>
</div>
</div>
</td>
<td><div id="oberteil">Quartos Lazer</div>
<div id="da-slider2" class="da-slider">
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/beach.png"/></div>
<div class="titel">Lazer
<div class="owner">Relax</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/bar.png"/></div>
<div class="titel"><?php echo $sitename; ?> Bar
<div class="owner">Amizade</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/pet.png"/></div>
<div class="titel">Parque dos Pets
<div class="owner">Eventos</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/rare.png"/></div>
<div class="titel"><?php echo $sitename; ?> Museu
<div class="owner">Amor</div></div>
</div>
</div>
</div>
</td>
<td><div id="oberteil">Salas de Eventos</div>
<div id="da-slider3" class="da-slider">
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/banzai.png"/></div>
<div class="titel">Battle Banzai
<div class="owner">Jogos</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/tic.png"/></div>
<div class="titel">Relaxe
<div class="owner">Descanse</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/knacker.png"/></div>
<div class="titel">Corridão
<div class="owner">Eventos</div></div>
</div>
<div class="da-slide">
<div class="da-img"><img style="border-radius:14px 14px 14px 14px;cursor: pointer;" onclick="window.location='./quickregister/start'" src="data/images/extra/freeze.png"/></div>
<div class="titel">Arena Freezer
<div class="owner">Jogos</div></div>
</div>
</div>
</div>
</td>
</tr></div>
</tbody></table>
<table width="400" cellspacing="0" cellpadding="0">
<tr>
<td id="box1">
<img style="border-radius:14px 14px 14px 14px;" src="data/images/game.png" height="30" width="50" align="left" hspace=10 vspace=10><div style="font-size:18px;"><b>JOGOS</b></div>
<p style="width:250px;">Nosso hotel já possui todos os jogos, como SnowStorm. <font color="#FFBF00"><u></font></u>.</p>
</td>
<td id="box2">
<img style="border-radius:14px 14px 14px 14px;" src="data/images/design.png" height="40" width="60" align="left" hspace=5 vspace=15><div style="font-size:18px;"><b>Estilo</b></div>
<p style="width:320px;">Nosso hotel possui um design único!</p>
</td>
<td id="box3"><div style="position: absolute;left:70px;top:10px;width:220px;"><b><div style="font-size:18px;">CHAT</b></div>Conheça pessoas com o mesmo interesse que você.</div>
<img style="position:absolute;float:left; margin:0px 5px 30px 0px;background:left center;boder::-1;" src="data/images/right.png">
</td>
<td id="box3"><div style="position: absolute;left:100px;top:112px;width:270px;"><img src="data/images/people.png"></td>
</tr>
</tbody></table>
<script type="text/javascript" src="data/js/jquery.min.js"></script>
<script type="text/javascript" src="data/js/slider.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#da-slider').cslider();
});
$(function() {
$('#da-slider2').cslider();
});
$(function() {
$('#da-slider3').cslider();
});
</script>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<div id="footer" class="new_and_improved">
<p class="footer-links"><a href="http://help.habbo.com">Ajuda & Suporte</a> | <a href="http://www.habbo.com/groups/officialparentsguide">Pais</a> | <a href="https://help.habbo.com/entries/20106178-privacy-policies-terms-of-use" target="_new">Termos de Serviço</a> | <a href="https://help.habbo.com/entries/278050-infringements-policy" target="_new">Informações</a> | <a href="http://www.habbo.com/groups/officialhabboway" target="_new"><?php echo $sitename; ?> Etiqueta</a> | <a href="http://www.habbo.com/groups/safetytips">Equipe</a> | <a href="mailto:advertising.com@sulake.com" target="_new">Parcerias</a></p>
<div id="age-recommendation"></div>
<div id="sulake"><a href="http://www.sulake.com"></a></div>
<p class="copyright"> 2012 <?php echo $sitename; ?> Hotel. Todos os Direitos Reservados.<br>CMS Criada por: <font color=red><b>Equipe Ruffles</font></b></p>
</div>
</div>
</div>
<?php
} else {
header("location:me.php");
}
?>
</body></html>