wie kan ban script crime site maken?

Gestart doorJordymen5 reacties62 weergaven

6 berichten · pagina 1 van 1

Jordymen

Lid · Topicstarter

Berichten
1.447
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik moet nog een paar scripts hebben waar onder anderen een ban script
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Gewoon een query in de config proppen die checkt of de status van de gebruiker op 0 staat oid.
0
Berichten
1.631
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$sql     = mysql_query("SELECT ban FROM gebruikers WHERE id = " . $_SESSION[gebruiker] . "");
$row     = mysql_fetch_array($sql);
if($row[ban] == 1){header(Location: ./ban.php);};


dit?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je topic mag ook in het nederlands. Maargoed...

[COLOR= #0000BB]<?php
$ips[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]12.34.50[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]123.403.68[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ips[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Je hebt ban.[/COLOR][COLOR= #007700]);
}[/COLOR]
?>


Er zitten geloof ik nog wel wat foutjes in.
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lol, het is in het Nederlands en het is duidelijk. emoMaar hij wilt spelers bannen, geen IPs puh
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Wat wouter zegt, met een kleine aanpassing.

[COLOR= #0000BB]<?php
$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT ban FROM gebruikers WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) {[/COLOR]
   [COLOR= #0000BB]$row[/COLOR]   [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]);[/COLOR]
   [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ban[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
     [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: ./ban.php[/COLOR][COLOR= #007700]);[/COLOR]
     [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
   }
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Er is een fout opgetreden: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}[/COLOR]
?>
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren