Log in

View Full Version : Sorry, you have been banned.



Jam-ez
14-12-2008, 09:15 PM
Hi,

When using my script, after logging in, I keep getting rejected with a ban, however "banned" isn't set to true in the mysql table. It's probably some stupid mistake, but any ideas?

Oh, and could it be because my mysql fields for "banned" are empty?

core.php

$check_ban = mysql_query( "SELECT * FROM `user` WHERE `username` = '$username'");
$check_ban_number = mysql_fetch_object( $check_ban );

if ( $_SESSION['username'] != '' )
{
if ( $check_ban_number->banned == 'true' );
{
echo("Sorry, you have been banned for: " . $check_ban_number->banned_reason);

session_destroy();
exit();
}

Edit: Oh, and this is the login page where it seems to be happening:

<?php

include 'includes/core.php';

if ( !$_SESSION['username'] )
{
$user = $_POST['user'];
$pass = $_POST['pass'];
$pass = md5($pass);
$ip = $_SERVER['REMOTE_ADDR'];

$find_user_pass = mysql_query( "SELECT * FROM `user` WHERE `username` = '$user' AND `password` = '$pass'" );
$find_user_pass_object = mysql_fetch_object( $find_user_pass );
$find_user_pass_rows = mysql_num_rows( $find_user_pass );

if ( $find_user_pass_rows == 1 )
{
$_SESSION['username'] = $user;
$_SESSION['password'] = $pass;

$level = $find_user_pass_object->level;
$_SESSION['level'] = $level;

$_SESSION['ip'] = $ip;

echo ("<meta http-equiv=\"Refresh\" content=\"2\"; URL=\"login.php\"/><center><img src='images/loading.gif'></center>");
}
else
{
die("<p>The entered username/password did not match the username/password in our database.
<br />
Please go back and ensure your login details are correct.</p>");
}

}
else
{
if ( $_SESSION['level'] == 'normal_user' )
{
echo("<p>Welcome <b>$_SESSION[username]</b><br />
- <a href=\"changepass.php\" target=\"middle\">Change Password</a><br />
- <a href=\"messages.php\" target=\"middle\">Message Center</a>");
$new = mysql_query( "SELECT * FROM `pmessages` WHERE `unread` = 'unread' AND `touser` = '$_SESSION[username]'" );
$new = mysql_num_rows($new);
echo(" (<b>$new</b>)");
echo("<br />
- <a href=\"gchat.php\" target=\"middle\">Add to General Chat</a><br />
- <a href=\"genchat.php\" target=\"middle\">View General Chat</a><br />
- <a href=\"acontact.php\" target=\"middle\">Contact an Admin</a><br />
- <a href=\"logout.php\" target=\"login\">Logout</a>");
}

if( $_SESSION['level'] == 'moderator_user' )
{
echo ("<br /><br /><b>Moderator Options</b><br />
- <a href=\"salert.php\" target=\"middle\">Alert User</a><br />
- <a href=\"ban.php\" target=\"middle\">Ban User</a><br />
- <a href=\"unban.php\" target=\"middle\">Unban User</a><br />
- <a href=\"gchatdel.php?switch\" target=\"middle\">Delete General Chat</a>");
}

if( $_SESSION['level'] == 'admin_user' )
{
echo ("<br /><br />
<b><u>Admin Options</u></b><br />
- <b>Message Options</b><br />
- <a href=\"masspm.php\" target=\"middle\">Mass Message</a><br/>
- <a href=\"pmspyer.php\" target=\"middle\">View Messages</a><br/>
<br />
- <b>Alert Options</b><br />
- <a href=\"alert.php\" target=\"middle\">Mass Alert</a><br/>
- <a href=\"salert.php\" target=\"middle\">Alert User</a><br />
<br />
- <b>User Account Options</b><br />
- <a href=\"createuser.php\" target=\"middle\">Create User</a><br />
- <a href=\"removeu.php\" target=\"middle\">Remove User</a><br />
- <a href=\"ban.php\" target=\"middle\">Ban User</a><br />
- <a href=\"unban.php\" target=\"middle\">Unban User</a><br />
<br />
- <b>Admin Contact Options</b><br />
- <a href=\"adminread.php\" target=\"middle\">Check Contact Page</a><br />
- <a href=\"acontactdel.php\" target=\"middle\">Delete Contact Page</a><br />
<br />
- <b>Miscellaneous Options</b><br />
- <a href=\"gchatdel.php?switch\" target=\"middle\">Delete General Chat</a><br />");
}
}


?>


Thread closed by Yoshimitsui (Forum Super Moderator): To prevent further spam and arguments.

Protege
14-12-2008, 09:28 PM
if ( $check_ban_number->banned == 'true' );

syntax error so far

Heinous
14-12-2008, 09:34 PM
remove the semi-colon like ^ pointed out and it should be fine.

Protege
14-12-2008, 09:46 PM
Yes, well done you can repeat and btw AJAX isn't a language lul

Heinous
14-12-2008, 09:54 PM
Yes, well done you can repeat and btw AJAX isn't a language lul
Sort of. I was also adding that it should be all that needs fixing. ;)

No, however it's a set of technologies which essentially makes up it's own. I never said they were LANGUAGES I knew.

Agnostic Bear
15-12-2008, 03:47 AM
Sort of. I was also adding that it should be all that needs fixing. ;)

No, however it's a set of technologies which essentially makes up it's own. I never said they were LANGUAGES I knew.

Ignore him, he's an idiot.

inVe
15-12-2008, 09:29 AM
Yes, well done you can repeat and btw AJAX isn't a language lul

Congratulations sir!
In his signature he isn't even saying it's a language...
He is simply stating he knows the "technique" of it.

So please, remove the stick from your ass and shove it down your throat.
As none of us want to hear your raving bull **** about how you're better than us all.

Protege
15-12-2008, 09:57 AM
Congratulations sir!
In his signature he isn't even saying it's a language...
He is simply stating he knows the "technique" of it.

So please, remove the stick from your ass and shove it down your throat.
As none of us want to hear your raving bull **** about how you're better than us all.

Wow
"As none of us want to hear your raving bull **** about how you're better than us all."

"In his signature he isn't even saying it's a language..."
I haven't even stated I was better than anyone else and are you the next PA for everyone here? "None of us" you make it sound like you're better than everyone else as you have the right to say to me what I should do and what I shouldn't - sorry to break your dreams but sorry I don't do DS.

inVe
15-12-2008, 10:01 AM
Wow
"As none of us want to hear your raving bull **** about how you're better than us all."

"In his signature he isn't even saying it's a language..."
I haven't even stated I was better than anyone else and are you the next PA for everyone here? "None of us" you make it sound like you're better than everyone else as you have the right to say to me what I should do and what I shouldn't - sorry to break your dreams but sorry I don't do DS.

I think a simple search would bring up why I said that.
I cannot say I'm better or worse as I haven't seen anyones work yet, as only signing up last night.

No, I'm not the PA System. But I can guess from other peoples responses you are a jackass. What are you on about DS? Sorry if I don't keep with these teenage acronyms.

Protege
15-12-2008, 10:04 AM
So you take on other peoples judgements before figuring me out for yourself? You are thicker than I thought.
*REMOVED*


Im off to college, I don't have time to argue and pity of you.

Edited by Yoshimitsui (Forum Super Moderator): Please do not make inappropriate posts.

inVe
15-12-2008, 10:05 AM
So you take on other peoples judgements before figuring me out for yourself? You are thicker than I thought.
http://en.wikipedia.org/wiki/BDSM

Im off to college, I don't have time to argue and pity of you.

Oh yes, I'm really going to immediately know that you took DS from BDSM. DS is much more recognized acronym via Nintendos handheld console. When you say DS I'm not going to immediately think "Oh yes! BONDAGE!"
You're posting about how you're not into bondage, yet you brought it up?

Oh dear.

Protege
15-12-2008, 10:09 AM
Who said I wasnt into bondage, BDSM isn't just all bondage and seriously if you're trying to show me up cause I am or not into bondage try again, you have till 40 past till I catch my bus, amuse me.

inVe
15-12-2008, 10:43 AM
Who said I wasnt into bondage, BDSM isn't just all bondage and seriously if you're trying to show me up cause I am or not into bondage try again, you have till 40 past till I catch my bus, amuse me.



You said yourself, "Sorry I don't do DS" and used it in an insulting context.
Idiot.

Blinger1
15-12-2008, 10:54 AM
Who said I wasnt into bondage, BDSM isn't just all bondage and seriously if you're trying to show me up cause I am or not into bondage try again, you have till 40 past till I catch my bus, amuse me.
I thought you said you were off to college and didn't want to continue arguing??

inVe
15-12-2008, 10:56 AM
I thought you said you were off to college and didn't want to continue arguing??

Exactly.

Thank you Blinger.

Jam-ez
15-12-2008, 02:10 PM
remove the semi-colon like ^ pointed out and it should be fine.

Thanks for the help, can't believe I missed such a stupid mistake.

Calon
15-12-2008, 02:44 PM
Meh, why are you using code that I removed from the core.

Protege
15-12-2008, 04:51 PM
I thought you said you were off to college and didn't want to continue arguing??


Exactly.

Thank you Blinger.

"I got 40 minutes", I thought that was a sign to say "Id be staying for 30minutes"


You said yourself, "Sorry I don't do DS" and used it in an insulting context.
Idiot.

lul what? "Sorry I dont do DS" is now insulting... 8-)

It/you keeps getting better

inVe
15-12-2008, 05:15 PM
I'm sorry, don't you understand the word 'context'? :rolleyes:

Jxhn
15-12-2008, 05:21 PM
Ignore him, he's an idiot.


I'm sorry, don't you understand the word 'context'? :rolleyes:

Follow Jew's advice, arguing with him just pleases him.

Calon
15-12-2008, 05:22 PM
*REMOVED*.


Edited by Yoshimitsui (Forum Super Moderator): Pleae do not make pointless comments.

inVe
15-12-2008, 05:23 PM
Follow Jew's advice, arguing with him just pleases him.

Fair enough. :P

Want to hide these adverts? Register an account for free!