Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Acmlmboard support?.
Acmlm's Board - I2 Archive - Acmlmboard support? - Need Help With Another Page | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
TheGreatWhiteDope

Koopa
Banned
Level: 16

Posts: 29/108
EXP: 19462
For next: 794

Since: 01-05-05

Since last post: 8 days
Last activity: 4 days
Posted on 06-27-05 09:30 AM Link | Quote
I've decided to copy Acmlm and make a User Ban page, but when I try to ban someone, it just takes you back to the user ban page and doesnt ban them. I think it is a problem with the if($id=="$user[id]"). Here is the file.
dan

Snap Dragon
Level: 43

Posts: 626/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 06-27-05 04:08 PM Link | Quote
The code you have there is extremely insecure. There aren't even any checks to determine whether you should be allowed to run that script.
TheGreatWhiteDope

Koopa
Banned
Level: 16

Posts: 30/108
EXP: 19462
For next: 794

Since: 01-05-05

Since last post: 8 days
Last activity: 4 days
Posted on 06-27-05 08:21 PM Link | Quote
Thats because its not done yet, just tell me whats wrong with the action.
CRZ
Newcomer
Level: 6

Posts: 9/9
EXP: 658
For next: 249

Since: 03-17-04
From: Twin Cities

Since last post: 127 days
Last activity: 6 days
Posted on 06-28-05 04:00 AM Link | Quote
There IS no action. You have a conditional and no conditions. Why use if($id=="$user[id]") - and you shouldn't need those quotes anyway - when you have no $user by the time you've gone through the Userlist thing.


I recommend something like...

#-- Userlist --#
+ if (!$action) {
// or you can even be really anal-retentive and use if ($action!="ban") {
while($user=mysql_fetch_array($userquery)){
...
+ }
}
#-- End --#
...
- $ban="<FORM ACTION='admin\userban.php?id=$user[id]' METHOD='POST'><INPUT TYPE=submit VALUE='Ban User'></FORM>";
+ $ban="<FORM ACTION='admin/userban.php?action=ban&id=".$user[id]."' METHOD='POST'><INPUT TYPE=submit VALUE='Ban User'></FORM>";
...
- if($id=="$user[id]") {
- mysql_query("UPDATE users SET powerlevel=-1 WHERE id=$user[id]");
+ if($action=="ban") {
+ mysql_query("UPDATE users SET powerlevel=-1 WHERE id=$id");
}

Now, will this actually work? I dunno, I'm too lazy to go test it myself and it seems to me like you're just reinventing the wheel anyway. Hey, but more power to ya. Get it, MORE POWER, and you're setting the powerlevel to -1, ha ha ha, oh well. PS Don't AIM me later, thanks bye

EDIT: Oops, forgot that the HTML would actually look like HTML - hopefully that's fixed - sorry about that


(edited by CRZ on 06-27-05 07:01 PM)
TheGreatWhiteDope

Koopa
Banned
Level: 16

Posts: 31/108
EXP: 19462
For next: 794

Since: 01-05-05

Since last post: 8 days
Last activity: 4 days
Posted on 06-28-05 09:17 AM Link | Quote
That works, thanks.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Acmlmboard support? - Need Help With Another Page | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.005 seconds.