Thread obsoleto CMS - problema index

SqL 3rroR

Utente Medio
Autore del topic
27 Giugno 2013
206
29
Miglior risposta
0
Assistenza Tecnica Habbo Retroserver
Titolo
problema index
Tipologia del tuo problema/richiesta
CMS
CMS/Server/DB/Client Utilizzato
Privati
Qual è il tuo errore?
Come faccio a far funzionare il ban nel index? perchè come banno dal amministrazione e provo a loggare nel account bannato non mi fa entrare e dovrebbe uscire il ban invece non esce come risolvo?
Screenshot
-
Ulteriori informazioni
aiuto..
 
<?php

require_once('./data_classes/server-data.php_data_classes-core.php.php');

session_start();

if(!session_is_registered(username)){

if(isset($_POST['username']) && isset($_POST['password'])){
$username = FilterText($_POST['username']);
$password = FilterText(HoloHash($_POST['password'], $username));
$password2 = FilterText(HoloHashMD5($_POST['password'], $username));

if(empty($username) || empty($password)){
$login_error = "Por favor, introduce tu email y contrase&ntilde;a para conectarte.";
} 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 = "Tu contrase&ntilde;a y <?php echo $shortname; ?> Nombre no coinciden.";
} 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 = "&iexcl;Has sido baneado! La raz&oacute;n de su baneo ha sido \"" . $bandata['reason'] . "\" y durara hasta el " . 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 = "Crea il tuo avatar, decora le tue stanze, chatta e incontra nuovi amici";

include('./templates/login_subheader.php');
?>


<!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>Lubix: Crea il tuo avatar, decora le tue stanze, chatta e incontra nuovi amici</title>

<link rel="stylesheet" type="text/css" href="/index.css" />
<link rel="stylesheet" href="/pagina.css" type="text/css" />

<script type="text/javascript">
var andSoItBegins = (new Date()).getTime();
</script>
<link rel="shortcut icon" href="http://www.Word.org/web-gallery/v2/favicon.ico" type="image/vnd.microsoft.icon" />
<script src="/web-gallery/static/js/libs2.js" type="text/javascript"></script>
<script src="/web-gallery/static/js/landing.js" type="text/javascript"></script>
<link rel="stylesheet" href="/web-gallery/static/styles/frontpage.css" type="text/css" />




<script type="text/javascript">

var ad_keywords = "";

var ad_key_value = "";

</script>

<script type="text/javascript">
document.habboLoggedIn = false;
var habboName = null;
var habboId = null;
var habboReqPath = "http://127.0.0.1/";
var habboStaticFilePath = "/web-gallery";
var habboImagerUrl = "/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "client";
HabboClient.maximizeWindow = true;
}


</script>



<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>

<meta name="description" content="Lubix Hotel: Amici, divertimento, Celebrita'!" />
<meta name="keywords" content="Lubix hotel, virtuale, mondo, social network, gratis, community, avatar, personaggio, chat, online, giovane, ragazzi, gioco di ruolo, giochi di ruolo, iscriviti, social, gruppi, forum, sicurezza, giocare, giochi, online, amici, giovani, rari, Furni rari, collezione, creare, collezionare, connettersi, furni, mobili, cuccioli, animali, creazione stanze, condivisione, espressione, Distintivi, badge, uscire, musica, VIP, celebrit?, visite VIP, famosi, mmo, mmorpg, multiplayer" />




<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>

<style type="text/css">
body { behavior: url(/js/csshover.htc); }
</style>
<![endif]-->
<meta name="build" content="63-BUILD1425 - 12.06.2012 11:06 - it" />
</head>




<style>#clouds {position:fixed;top:5%;height:328px;left:0px;z-index:-2;}</style> <div id='clouds'><marquee scrollamount='3' direction='right'><img src='/clouds.png' alt='' /><img src='/clouds.png' alt='' style='margin-top:100px;' /></marquee></div>

<br>
<br>
<br>
<br>
<br>
<center><div id="login_box">
<br>
<center><img src="http://www.sciax2.it/forum/web-gallery/v2/images/habbo.png"></center><br>
<center><?php if(isset($template->form->error)) { echo '<div id="message">'.$template->form->error.'</div>'; } ?>
<form id="loginformitem" name="loginformitem" action="/index.php?do=process_login&novote" method="post">
<table width="" border="0">
<td>
<center><b style="font-size:20px;"><font color="#FFFFFF"><?php echo $online_count; ?> Lubix Online</font></b></center>
<br>
</tr>
<td>
<input type="text" name="username" id="username" class="login-field" style="padding: 5px !important;border-radius: 9px;margin-left:-78px;" placeholder="Username..." autofocus=""><input type="password" name="password" id="password" class="login-field" style="padding: 5px !important;margin-right: -78px;border-radius: 9px;" placeholder="Password"></td>
</tr>
<td>
<br>
<button type="submit" class="button small green" name="login" style="width:120px;margin-top:6px;margin-left: 28px"><span>Entra</span></button>
<br>
<a href="/quickregister/start" style="text-decoration:none;"><button type="button" class="button small green" name="Registrati" style="width:120px;margin-top: 6px;margin-left: 28px;"><span>Registrati</span></button></a>
</td>
</tr>
</table>
</form>
</center>
</div>
</div>
<center><div id="pd_box">
<br>
<b><font color="#FFFFFF">Lubix Hotel © 2014</font></b><br><br><lel><a href="http://www.mozilla.org/it/firefox/new/" target="_blank"><img src="http://fc06.deviantart.net/images2/i/2004/07/e/7/Firefox_dock_icon.png" width="35px" height="35px" onmouseover="cerchio(this, 40);"></a>
<a href="http://www.apple.com/it/safari/" target="_blank"><img src="http://habbotravel.altervista.org/forum/images/travel/safari_icon.png" width="35px" height="35px" onmouseover="cerchio(this, 40);"></a>
<a href="https://www.google.com/chrome?hl=it" target="_blank"><img src="http://habbotravel.altervista.org/forum/images/travel/chrome_icon.png" width="35px" height="35px" onmouseover="cerchio(this, 40);"></a></lel>
</div>

</body>
</html>






<?php



} else {
header("location:../me");
}

?>
 
<?php

if(isset($login_error) && $ban_check > 0){
session_start();
} else {
require_once('./data_classes/server-data.php_data_classes-core.php.php');
require_once('./data_classes/server-data.php_data_classes-session.php.php');
session_start();
}
setcookie("remember", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
setcookie("rusername", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
setcookie("rpassword", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
error_reporting(0);

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

if(isset($login_error) && $ban > 0){

?>

<div id="process-content">

<div class="action-error flash-message">
<div class="rounded">

<b><?php echo $login_error; ?></b>

</div>
</div>

<div style="text-align: center">

<div style="width:100px; margin: 10px auto"><a href="<?php echo $path; ?>" id="logout-ok" class="new-button fill"><b>OK</b><i></i></a></div>

<div id="column1" class="column"></div>
<div id="column2" class="column"></div>

</div>

<?php }elseif(session_is_registered(username)){

session_destroy();

if($_COOKIE['remember'] == "remember"){
setcookie("remember", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
setcookie("rusername", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
setcookie("rpassword", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
}

?>

<div id="process-content">
<div class="action-confirmation flash-message">
<div class="rounded">

<b>Sei stato disconnesso da Lubix. Torna a trovarci,ti aspettiamo!</b>

</div>
</div>

<div style="text-align: center">

<div style="width:100px; margin: 10px auto"><a href="<?php echo $path; ?>" id="logout-ok" class="new-button fill"><b>OK</b><i></i></a></div>

<div id="column1" class="column"></div>
<div id="column2" class="column"></div>
<?php require_once('./templates/community_footer.php'); ?>
</div>
<?php } ?>