ERRO EM: Registro e Painel de Controle 16.12.14 20:41
Print de meu erro: *
Qual é meu erro: ERRO EM: Registro e Painel de Controle
CMS Que estou utilizando: InRabo
SWF que estou utilizando: *
Versão de meu hotel: NewCrypto
Se escolheu outros, especifique: *
Comentários adicionais: Gente, eu estou com 2 problemas:
1. Quando vou cadastrar um usuário para testes eu vou redirecionado para a http://localhost1/#register, mas existe um número ali no link.
2. Painel de Controle, não consigo acessar nem como Administrador.
EDIT: PARA QUEM QUER A INDEX E A DATA_CLASSES TÁ AQUI:
Qual é meu erro: ERRO EM: Registro e Painel de Controle
CMS Que estou utilizando: InRabo
SWF que estou utilizando: *
Versão de meu hotel: NewCrypto
Se escolheu outros, especifique: *
Comentários adicionais: Gente, eu estou com 2 problemas:
1. Quando vou cadastrar um usuário para testes eu vou redirecionado para a http://localhost1/#register, mas existe um número ali no link.
2. Painel de Controle, não consigo acessar nem como Administrador.
EDIT: PARA QUEM QUER A INDEX E A DATA_CLASSES TÁ AQUI:
- Código:
INDEX:
<?php
include_once "./data_classes/server-data.php_data_classes-core.php.php";
ini_set('default_charset','utf-8');
session_start();
if(!session_is_registered(username)){
if(isset($_POST['submitreg'])){
$name = FilterText($_POST['registration_username']);
$email = FilterText($_POST['registration_email']);
$clean_pass = FilterText($_POST['registration_password']);
$password = HoloHashMD5($_POST['registration_password']);
$terms = FilterText($_POST['registration_tos']);
$gender = FilterText($_POST['registration_gender']);
$filter = preg_replace("/[^a-z\d\-=\?!@:\.]/i", "", $name);
if(empty($name) || empty($password) || empty($terms) || empty($gender) || empty($email)) {
$error = "ERRO! Insira os dados corretamente.";
}
$usernameCheck = mysql_num_rows(mysql_query("SELECT * FROM users WHERE username = '".$name."'"));
if($usernameCheck > 0){
$error = "Esse Usurio ja esta sendo ultilizado";
}
if($filter != $name){
$error = "Erro com o seu nome de usuario";
}
if(strlen($name) < 1){
$error = "Nome de usuário curto!";
}
if(strlen($name) > 20){
$error = "Nome de usuário longo!";
}
$first = substr($name, 0, 4);
if(strnatcasecmp($first,"MOD-") == false) {
$error = "Erro com o seu nome de usuario";
}
$email_check = preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email);
if($email_check != 1){
$error = "Por favor, coloque um e-mail valido.";
}
if(strlen($email) < 6){
$error = "Por favor, coloque um e-mail valido.";
}
if($gender == "male"){
$gender = "M";
$look = "ea-3142-1281.ch-9700-92.hr-3278-1354-40.wa-3212-95-108.ca-3292-63.ha-8241-1235-81.hd-185-10.lg-3116-110-1408.sh-3115-92-88";
}
elseif($gender == "female"){
$gender = "F";
$look = "ea-3142-1281.ch-9700-92.hr-3278-1354-40.wa-3212-95-108.ca-3292-63.ha-8241-1235-81.hd-185-10.lg-3116-110-1408.sh-3115-92-88";
}
if(empty($error)){
mysql_query("INSERT INTO `users` (username,real_name,password,auth_ticket,motto,mail,rank,look,gender,account_created,last_online,online,ip_last,ip_reg) VALUES ('".$name."','".$name."','".$password."','-/-','#AMOMUITOTUDOISSO ','".$email."','1','".$look."','".$gender."','".time()."','".time()."','0','".$remote_ip."','".$remote_ip."')");
$userdata2 = mysql_query("SELECT * FROM users WHERE username = '".$name."'");
$userdata = mysql_fetch_assoc($userdata2);
mysql_query("INSERT INTO `user_info` (user_id,reg_timestamp) VALUES ('".$userdata['id']."','".time()."')");
mysql_query("INSERT INTO `user_stats` (id) VALUES ('".$userdata['id']."')");
$_SESSION['username'] = $userdata['username'];
$_SESSION['password'] = HoloHashMD5($clean_pass, $name);
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;
}
}
if(isset($_POST['credentials_username']) && isset($_POST['credentials_password'])){
$username = FilterText($_POST['credentials_username']);
$password = FilterText(HoloHash($_POST['credentials_password'], $username));
$password2 = FilterText(HoloHashMD5($_POST['credentials_password'], $username));
if(empty($username) || empty($password)){
$login_error = "Por favor, coloque sua senha e seu usuario para logar..";
} 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 = "Senha ou usuário errados!";
} 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");
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.php"); exit;
} else {
$bandata = mysql_fetch_assoc($ban);
$timestamp = time();
if($bandata['expire'] > $timestamp){
$login_error = "Você foi bloquedo por \"" . $bandata['reason'] . "\" até " . 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");
mysql_query("UPDATE users SET password = '".$password2."', last_online = '".time()."', 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.php"); exit;
}
}
}
}
}
?>
<!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="es" lang="es">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>InfoHabbo - Primeiro fã-site a utilizar CMS Habbo!</title>
<script type="text/javascript">
var andSoItBegins = (new Date()).getTime();
var ad_keywords = "";
document.habboLoggedIn = true;
var habboName = "<?php echo $name; ?>";
var habboReqPath = "<?php echo $path; ?>";
var habboStaticFilePath = "<?php echo $path; ?>/web-gallery";
var habboImagerUrl = "http://habbo.es/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "<?php echo $path; ?>/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") { HabboClient.windowName = "uberClientWnd"; }
</script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="shortcut icon" href="<?php echo $path; ?>/web-gallery/favicon.ico" type="image/vnd.microsoft.icon" />
<script src="<?php echo $path; ?>/web-gallery/tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
</head><link rel="stylesheet" href="<?php echo $path; ?>/web-gallery/styles/index.css" type="text/css" /><body class="login">
<?php if(isset($login_error) || isset($error)){ ?><div id="login-error"><?php echo $login_error; echo $error; ?></div><?php } ?> <div id="login-container">
<div class="top">
<a href="<?php echo $path; ?>" class="logo"></a>
<p>
<span class="one">Você sabia!?</span>
<span class="two">Somos o primeiro fã-site a usar CMS Habbo!</span>
</p>
</div>
<div id="image-container">
<div class="login">
<div style="padding:10px 10px 0px 10px;">
<form id="login-form" name="login-form" method="post">
<div class="username">
<input tabindex="3" type="text" class="login-field" name="credentials_username" id="login-username" value="Personagem cadastrado" onclick="this.value='';" maxlength="48"/>
</div>
<div class="password">
<input tabindex="4" type="password" class="login-field" name="credentials_password" id="login-password" onclick="this.value='';" value="Senha criada" maxlength="32"/>
<input type="submit" name="submit_login" value="Entra" class="login-top-button" id="login-submit-button">
</div>
<div class="remember-forgot"></div>
</form>
</div>
</div>
<div id="welcome">
<a class="button large" href="#register" id="join-now-button"><b></b><span>CRIE SUA CONTA</span><span class="sub">e fique por dentro!</span></a>
</div>
</div>
</div>
<div id="overlay">
<div id="registration-form">
<a class="boxclose" id="boxclose"> X</a>
<div id="registration-form-header">
<h2>Gostaria de se cadastrar?</h2>
<p>Insira corretamente as informações que se pede e lembre-se de não colocar sua senha original do Habbo BR/PT como senha do fã-site, hein!? ;)</p>
</div>
<div id="registration-form-main">
<form method="post" autocomplete="off">
<div id="registration-form-main-left">
<label>Homem ou mulher?</label>
<div id="registration-birthday">
<input type="radio" class="button" id="radio-button-boy" name="registration_gender" value="male" checked="checked"/><label for="radio-button-boy"><img src="<?php echo $path; ?>/web-gallery/v2/images/registration/male_sign.png"/></label>
<input type="radio" class="button" id="radio-button-girl" name="registration_gender" value="female"/><label for="radio-button-girl" style=""><img src="<?php echo $path; ?>/web-gallery/v2/images/registration/female_sign.png"/></label>
</div>
<label for="registration-email">E-mail</label>
<label for="registration-email" class="details">Insira um e-mail válido para a sua segurança.</label>
<input type="text" name="registration_email" id="registration-email" value="">
<label for="registration-username">Personagem Habbo</label>
<label for="registration-username" class="details">Insira o nome do seu Personagem Habbo.</label>
<input type="text" name="registration_username" id="registration-username" maxlength="32" value="">
</div>
<div id="registration-form-main-right">
<label for="registration-password">Senha</label>
<label for="registration-password" class="details">Insira uma senha diferente da sua original do Habbo BR/PT.</b></label>
<input type="password" name="registration_password" id="registration-password" maxlength="32" value="">
<p class="checkbox-container" id="registration-tos">
<input type="checkbox" id="tos" name="registration_tos" value="true">
<label for="tos" class="details checkbox">
Eu aceito me cadastrar no fã-site e seguir a T&C.
</label>
</p>
<div class="submit-button-wrapper">
<input type="submit" value="Registrar" name="submitreg" class="register-done" />
</div>
</div>
</form>
</div>
</div>
</div>
<script>
window.onload = function() {
var hash = window.location.hash;
if(hash == "#register") {
$('#overlay').fadeIn(500);
$('#registration-form').fadeIn(250);
}
};
$('#join-now-button').click(function(){
$('#overlay').fadeIn(250);
$('#registration-form').fadeIn(250);
});
$('#boxclose').click(function(){
$('#overlay').delay(500).fadeOut(500);
$('#registration-form').slideUp(500);
});
</script>
</body>
</html>
<?php
} else {
header("location:../me.php");
}
?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&appId=721892631186064&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
DATA_CLASSES:
<?php
/*======================================================================*\
| Habzin CMS - Content system manager. |
| #######################################################################|
| Copyright (c) 2013, by Je4n |
| http://www.pixelacao.zz.mu |
| #######################################################################|
| Essa CMS usa base Lavvos, e todo seu conteúdo foi re-programado e re- |
| feito por Je4n - Píxel Ação |
| Todos os direitos reservados à Píxel Ação. |
\=======================================================================*/
################## PREFERÊNCIAS ##################
$Hotelname = "InfoHabbo"; //*Nome do Hotel, por exemplo = Habzin*//
$hotel_url = "http://localhost"; //*URL do Hotel, sem o "www."*//
################## CONFIGURAÇÕES #################
$MySQLhostname = "localhost";
$MySQLusername = "naoteinteressa_username";
$MySQLpassword = "naoteinteressapassword"; //*Senha MySQL*//
$MySQLdb = "naoteinteressa_db"; //*Banco de dados*//
################## REDES SOCIAIS #################
$Facebook_id = "teste"; //* Nome de usuário Facebook *//
$Twitter_id = "#"; //*Nome de usuário Twitter*//
$Email_admin = "#"; //*Email do administrador*//
################## C_IMAGES CONFIG ############
$avatar = "http://www.habbo.fr/habbo-imaging/avatarimage?figure="; //*Configurações de Avatar*//
$cimages_url = "http://habbo.com.br/c_images/album1584/"; //*Configurações de Emblemas*//
################## CONFIGURAÇÕES DA CLIENTE ##################
$server_ip = "177.111.250.45"; //*IP do VPS/PC*//
$server_port = "30000"; //*Port para conexão Emulador*//
$external_var = "http://SEUHOTEL.com.br/swfs/external_variables.txt"; //*URL da External Variables*//
$external_text = "http://SEUHOTEL.com.br/swfs/external_flash_texts.txt"; //*URL da External Texts*//
$productdata = "http://25.169.117.51/phx/productdata.txt"; //*URL da Productdata*//
$furnidata = "http://25.169.117.51/phx/furnidata.txt"; //*URL da Furnidata*//
$swf_gordon = "http://25.169.117.51/phx/"; //*URL da gordon da SWF, geralmente igual a swf_path*//
$swf_path = "http://25.169.117.51/phx/"; //*URL da pasta onde está localizada a SWF*//
$swf_flash = "http://25.169.117.51/phx/Habbo.swf"; //*URL do arquivo .swf*//
?>