Kan iemand me helpen , me floodcontrol doet het niet.
En ik heb het echt nodig aangezien iemand de heletijd spamt.
Code:
En ik heb het echt nodig aangezien iemand de heletijd spamt.
Code:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]toevoegen[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]<div class="rederror"><br /><strong>Je hebt niet alle velden
ingevuld.</strong></div>[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO berichtenbalk ( bericht, userid) VALUES (
"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]", "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]" ) "[/COLOR][COLOR= #007700])[/COLOR] or
[URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="greenerror"><br /><strong>Je bericht is succesvol
toevoegd.</strong></div><meta http-equiv="refresh" content="3; URL=index.php" />[/COLOR][COLOR= #007700];
}
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]last_session_request[/COLOR][COLOR= #007700]] >[/COLOR] [URL="http://www.php.net/time"]time[/URL][COLOR= #007700]() -[/COLOR] [COLOR= #0000BB]$config[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]floodcontrol[/COLOR][COLOR= #007700]]) &&
([/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]] <=[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U dient [/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$config[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]floodcontrol[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000] seconden te
wachten voordat u weer een bericht kan plaatsen[/COLOR][COLOR= #007700];
}
}[/COLOR]
?>
<div class="top">Voeg een bericht toe!</div><div class="mid">
<form action="" method="post">
<table width="100%">
<tr>
<td>Bericht:</td>
<td><textarea name="bericht" cols="50"
rows="10"></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit"
name="toevoegen" value="Voeg toe!" /></td>
</tr>
</table>
</form>
</div>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="rederror"><br /><strong>U moet ingelogd zijn om deze pagina te
bekijken.</strong><br> <a href="index.php?p=login">Log hier in</a> of <a
href="index.php?p=registreer">maak een account aan.</a></div>[/COLOR][COLOR= #007700];
}[/COLOR]
?> 




