PHP help me

Gestart doorJesper177 reacties875 weergaven

178 berichten · pagina 6 van 12

Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Vriendje schreef:
Eerdere citaten tonen
Aarclay schreef:
Ik vraag me af of het niet beter is dat de TS er beter aan doet om dit in de ijskast te schuiven, en te beginnen met een Hello World oefening.
HAHA! *ehm ehm... * Hij leert nog maar, en dat probeert die hier te doen. Daar leert hij veel, maar fout los je niet op op een site maar op forum.
Hij leert dat wel, maar wel met teveel hooi op zijn vork. Als je niet weet hoe een else in elkaar steekt, en wel met MySQL aan het frotten bent... dan klopt er iets niet in de volgorde wink...
Jespar schreef:
vriendje ik kan met notepad++ ook geen foute dingen vinden
Ik weet dat Notepad++ goede highlighting heeft, en dat je goed je script onderdelen zou moeten kunnen onderscheiden.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Afbeelding
Afbeelding
Afbeelding
Afbeelding
Afbeelding
Afbeelding
Afbeelding

oke, handel dit via pb ofzo verder maar ik wil het even weten
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Jespar schreef:
vriendje ik kan met notepad++ ook geen foute dingen vinden
Jespar schreef:
Afbeelding
Afbeelding
Afbeelding
Afbeelding
Afbeelding
Afbeelding
Afbeelding
oke, handel dit via pb ofzo verder maar ik wil het even weten

Niet rottig bedoeld, maar denk zelf eens na of het niet beter en verstandiger is om dit te laten rusten, en bij hoofdstuk 1 te beginnen.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
In die regel is niets fout, het ligt aan andere regel die deze regel verpest Stuur ns heel je script en ik kijk met notepad++
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
kom op skype dan stuur ik heel bestand want regel bestaat uit ong 500 regels

toevoeging op 27 januari 2012, 18:20:07:
Afbeelding
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ben met iPod op skype. Stuur gewoon hier in spoiler?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
En dan het liefst relevante code. Niemand gaat even 500 regels doornemen.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
de hele admin.php
Spoiler tonen

if($team == 1){

if(isset($_GET[deleteshout])){

$sQuery = mysql_query("SELECT * FROM shout WHERE id = " . mysql_real_escape_string($_GET[deleteshout]) . "") or die(mysql_error());

if(mysql_num_rows($sQuery) == 0){

echo
Die shout bestaat niet!
;

}else{

mysql_query("DELETE FROM shout WHERE id = " . mysql_real_escape_string($_GET[deleteshout]) . "") or die(mysql_error());

echo
De shout is verwijderd! Klik hier
;

}

}elseif(isset($_GET[deletemessage])){

$mQuery = mysql_query("SELECT * FROM forumreactions WHERE id = " . mysql_real_escape_string($_GET[deletemessage]) . "") or die(mysql_error());
$mFetch = mysql_fetch_assoc($mQuery);

if(mysql_num_rows($mQuery) == 0){

echo Bericht bestaat niet;

}else{

mysql_query("UPDATE forumreactions SET type = 0 WHERE id = " . mysql_real_escape_string($_GET[deletemessage]) . "") or die(mysql_error());

echo Reactie verwijderd;

}

}elseif(isset($_GET[sticky])){

$tQuery = mysql_query("SELECT * FROM topics WHERE id = " . mysql_real_escape_string($_GET[sticky]) . "") or die(mysql_error());
$tFetch = mysql_fetch_assoc($tQuery);

if(mysql_num_rows($tQuery) == 0){

echo
Dit topic bestaat niet!
;

}else{

mysql_query("UPDATE topics SET type = 3 WHERE id = " . mysql_real_escape_string($_GET[sticky]) . "") or die(mysql_error());

echo
Er staat nu een sticky op dit topic! Klik hier
;

}

}elseif(isset($_GET[ads_add])){

if(isset($_POST[submit])){

$redir = htmlspecialchars($_POST[redirect_url]);
$how = htmlspecialchars($_POST[how]);

if(strlen($redir) < 5){

echo
Doorstuur URL te kort. Klik hier
;
die();

}

if(!strstr($redir, .) or !strstr($redir, http://)){

echo
Doorstuur URL is verkeerd. Maak zeker dat er http:// in je url zit. Klik hier
;
die();

}

if($how == 0){

$horizontal = 1;
$vertical = 0;

}elseif($how == 1){

$horizontal = 0;
$vertical = 1;

}else{

die(Verticaal of horizontaal verkeerd ingevoerd.);

}

if($_FILES[banner][name] != ){

$filename = htmlspecialchars($_FILES[banner][name]);

$extension = getExtension($filename);
$extension = strtolower($extension);

if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) {

echo
Banner extentie mag enkel JPG, PNG of GIF zijn. Banner niet toegevoegd. Klik hier
;
die();

}else{

$size = filesize($_FILES[banner][tmp_name]);

if ($size > MAX_SIZE*1024)
{

echo
Je afbeelding is te groot. De banner is niet toegevoegd. Klik hier
;
die();

}

$bQuery = mysql_query("SELECT * FROM ads ORDER BY id DESC LIMIT 1");
$bFetch = mysql_fetch_assoc($bQuery);
$newid = $bFetch[id] + 1;

$image_name=$newid...$extension;

$newname="img/ads/".$image_name;

$copied = copy($_FILES[banner][tmp_name], $newname) or die("Error: banner couldnt upload... sadley");

if (!$copied)
{

echo
Er ging wat mis bij het uploaden. Als dit probleem blijft aanhouden, contacteer de beheerder. De banner is niet toegevoegd. Klik hier
;
die();

}

mysql_query("INSERT INTO ads VALUES (
NULL,
" . mysql_real_escape_string($redir) . ",
" . mysql_real_escape_string($extension) . ",
0,
" . mysql_real_escape_string($horizontal) . ",
" . mysql_real_escape_string($vertical) . "
);
")or die(mysql_error());

echo
De banner is toegevoegd.
;

}

}else{

echo
Je hebt geen banner plaatje ingegeven!
;

}

}else{

?>

Advertentie toevoegen





}

}elseif(isset($_GET[lock])){

$tQuery = mysql_query("SELECT * FROM topics WHERE id = " . mysql_real_escape_string($_GET[lock]) . "") or die(mysql_error());
$tFetch = mysql_fetch_assoc($tQuery);

if(mysql_num_rows($tQuery) == 0){

echo
Dit topic bestaat niet!
;

}else{

mysql_query("UPDATE topics SET type = 2 WHERE id = " . mysql_real_escape_string($_GET[lock]) . "") or die(mysql_error());

echo
Er staat nu een slotje op dit topic! Klik hier
;

}

}elseif(isset($_GET[normal])){

$tQuery = mysql_query("SELECT * FROM topics WHERE id = " . mysql_real_escape_string($_GET[normal]) . "") or die(mysql_error());
$tFetch = mysql_fetch_assoc($tQuery);

if(mysql_num_rows($tQuery) == 0){

echo
Dit topic bestaat niet!
;

}else{

mysql_query("UPDATE topics SET type = 1 WHERE id = " . mysql_real_escape_string($_GET[normal]) . "") or die(mysql_error());

echo
Dit topic is nu weer een gewoon topic. Klik hier
;

}

}elseif(isset($_GET[deletetopic])){

$tQuery = mysql_query("SELECT * FROM topics WHERE id = " . mysql_real_escape_string($_GET[deletetopic]) . "") or die(mysql_error());
$tFetch = mysql_fetch_assoc($tQuery);

if(mysql_num_rows($tQuery) == 0){

echo
Dit topic bestaat niet!
;

}else{

mysql_query("UPDATE topics SET type = 4 WHERE id = " . mysql_real_escape_string($_GET[deletetopic]) . "") or die(mysql_error());

echo
Dit topic is nu verwijderd. Klik hier
;

}

}elseif(isset($_GET[deleteuser])){

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo
Dit lid bestaat niet!
;

}else{

mysql_query("UPDATE users SET type = 4 WHERE id = " . mysql_real_escape_string($uFetch[id]) . "") or die(mysql_error());

echo
Dit lid is succesvol verwijderd! Klik hier
;

}

}else{

?>

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.




}

}elseif(isset($_GET[delete_ad])){

$aQuery = mysql_query("SELECT * FROM ads WHERE id = " . mysql_real_escape_string($_GET[delete_ad]) . "") or die(mysql_error());
$aFetch = mysql_fetch_assoc($aQuery);

if(mysql_num_rows($aQuery) == 0){

echo
Advertentie werd niet gevonden
;

}else{

/*
unlink(img/ads/ . mysql_real_escape_string($aFetch[id]) . . . mysql_real_escape_string($aFetch[filetype])) or die(Niet genoeg rechten of bestand niet gevonden.);

mysql_query("DELETE FROM ads WHERE id = " . mysql_real_escape_string($_GET[delete_ad]) . "") or die(mysql_error());
*/
echo
Advertenties verwijderen is even niet mogelijk. Klik hier
;

}

}elseif(isset($_GET[factuurdel])){

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo
Dit lid bestaat niet!
;

}else{

mysql_query("DELETE FROM factuur WHERE id = " . mysql_real_escape_string($_POST[fid]) . "") or die(mysql_error());

echo
Dit lid is succesvol verwijderd! Klik hier
;

}

}else{

?>

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.



}elseif(isset($_GET[factuur])){

ini_set(display_errors, On);
error_reporting(E_ALL);

if(isset($_POST[submit]))
{

{

mysql_query("INSERT INTO factuur (bericht, bedrag, waarom, member_id) VALUES (" . $_POST[bericht] . ", " . $_POST[bedrag] . ", " . $_POST[waarom] . ", " . $_POST[member_id] . ")");

echo
Factuur succesvol verstuurt Klik hier
;

}

}

?>

Geef hieronder de gebruikersnaam in van de gebruiker die je wilt ranken.




}elseif(isset($_GET[ban])){

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo
Dit lid bestaat niet!
;

}else{

mysql_query("UPDATE users SET banned_until = " . mysql_real_escape_string($_POST[ban_until]) . ", ban_reason = " . mysql_real_escape_string($_POST[reason]) . " WHERE id = " . mysql_real_escape_string($uFetch[id]) . "") or die(mysql_error());

echo
Dit lid is succesvol gebanned! Klik hier
;

}

}else{

?>

Geef hieronder de gebruikersnaam in van de gebruik die je wilt bannen.




}

}elseif(isset($_GET[unban])){

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo
Dit lid bestaat niet!
;

}else{

mysql_query("UPDATE users SET banned_until = WHERE id = " . mysql_real_escape_string($uFetch[id]) . "") or die(mysql_error());

echo
Dit lid is succesvol geunbanned! Klik hier
;

}

}else{

?>

Geef hieronder de gebruikersnaam in van de gebruik die je wilt unbannen.




}

}else{

?>

Beheer














Gebruikers

Factuur



}

}else{

echo
Je hebt geen rechten om deze pagina te bekijken
;

}

?>
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik doe snel ff met notepad dus mij boeit niet. Ik ga op elk { staan.

toevoeging op 27 januari 2012, 18:25:22:
Fuck, smileys.

Zo kan ik ff kopieeren.
Jespar schreef:
de hele admin.php
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$team[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/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]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deleteshout[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM shout WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deleteshout[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Die shout bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM shout WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deleteshout[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">De shout is verwijderd! <a href="?p=shout">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deletemessage[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$mQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM forumreactions WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deletemessage[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$mFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bericht bestaat niet[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE forumreactions SET type = 0 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deletemessage[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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]Reactie verwijderd[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sticky[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$tQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM topics WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sticky[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$tFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit topic bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE topics SET type = 3 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sticky[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Er staat nu een sticky op dit topic! <a href="?p=forum&showtopic=[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sticky[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ads_add[/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]submit[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$redir[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]redirect_url[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$how[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]how[/COLOR][COLOR= #007700]]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$redir[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Doorstuur URL te kort. <a href="index.php?p=admin&ads_add">Klik hier</a></div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();

}[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/strstr"]strstr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$redir[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000].[/COLOR][COLOR= #007700])[/COLOR] or [COLOR= #007700]![/COLOR][URL="http://www.php.net/strstr"]strstr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$redir[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://[/COLOR][COLOR= #007700])){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Doorstuur URL is verkeerd. Maak zeker dat er http:// in je url zit. <a href="index.php?p=admin&ads_add">Klik hier</a></div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();

}[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$how[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$horizontal[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$vertical[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$how[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$horizontal[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$vertical[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Verticaal of horizontaal verkeerd ingevoerd.[/COLOR][COLOR= #007700]);

}[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]banner[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #0000BB]$filename[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]banner[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]);[/COLOR]

[COLOR= #0000BB]$extension[/COLOR] [COLOR= #007700]=[/COLOR] getExtension[COLOR= #007700]([/COLOR][COLOR= #0000BB]$filename[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$extension[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$extension[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](([/COLOR][COLOR= #0000BB]$extension[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"jpg"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$extension[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"jpeg"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$extension[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"png"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$extension[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]"gif"[/COLOR][COLOR= #007700])) {[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Banner extentie mag enkel JPG, PNG of GIF zijn. Banner niet toegevoegd. <a href="index.php?p=admin&ads_add">Klik hier</a></div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[COLOR= #0000BB]$size[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/filesize"]filesize[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]banner[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$size[/COLOR] [COLOR= #007700]>[/COLOR] MAX_SIZE[COLOR= #007700]*[/COLOR][COLOR= #0000BB]1024[/COLOR][COLOR= #007700])
{[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Je afbeelding is te groot. De banner is niet toegevoegd. <a href="index.php?p=admin&ads_add">Klik hier</a></div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();

}[/COLOR]

[COLOR= #0000BB]$bQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM ads ORDER BY id DESC LIMIT 1"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bQuery[/COLOR][COLOR= #007700]);[/COLOR]


[COLOR= #0000BB]$newid[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$bFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] +[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$image_name[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$newid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000].[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$extension[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$newname[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"img/ads/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$image_name[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$copied[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/copy"]copy[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]banner[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$newname[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Error: banner couldnt upload... :("[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$copied[/COLOR][COLOR= #007700])
{[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Er ging wat mis bij het uploaden. Als dit probleem blijft aanhouden, contacteer de beheerder. De banner is niet toegevoegd. <a href="index.php?p=admin&ads_add">Klik hier</a></div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();

}[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO ads VALUES (
NULL,
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$redir[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]",
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$extension[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]",
0,
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$horizontal[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]",
"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$vertical[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]"
);
"[/COLOR][COLOR= #007700])[/COLOR]or [URL="http://www.php.net/die"]die[/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 id="succes">De banner is toegevoegd.</div>[/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 id="error">Je hebt geen banner plaatje ingegeven!</div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>

<h1>Advertentie toevoegen</h1>

<form method="post" action="?p=admin&ads_add" enctype="multipart/form-data">
<span style="color: red;">Als je een moderator bent, vraag dan eerst toestemming aan een beheerder!</span><br />
<table style="border: 0;">
<tr>
<td style="width: 210px;">
Doorstuur url:
</td>
<td>
<input type="text" name="redirect_url" /> <small>(http:// moet erbij)</small>
</td>
</tr>
<tr>
<td style="width: 210px;">
Horizontaal/verticaal?:
</td>
<td>
<select name="how">
<option value="0">Horizontaal</option>
<option value="1">Verticaal</option>
</select>
</td>
</tr>
<tr>
<td style="width: 210px;">
Banner plaatje:
</td>
<td>
<input type="file" name="banner" />
</td>
</tr>
</table>
<br />
<input type="submit" name="submit" value="Toevoegen" />
</form>

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lock[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$tQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM topics WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lock[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$tFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit topic bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE topics SET type = 2 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lock[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Er staat nu een slotje op dit topic! <a href="?p=forum&showtopic=[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lock[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]normal[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$tQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM topics WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]normal[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$tFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit topic bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE topics SET type = 1 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]normal[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Dit topic is nu weer een gewoon topic. <a href="?p=forum&showtopic=[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]normal[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deletetopic[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$tQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM topics WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deletetopic[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$tFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit topic bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE topics SET type = 4 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deletetopic[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Dit topic is nu verwijderd. <a href="index.php">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]deleteuser[/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]submit[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/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]username[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit lid bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET type = 4 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Dit lid is succesvol verwijderd! <a href="index.php">Klik hier</a></div>[/COLOR][COLOR= #007700]; 

}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.<br /><br />

<form method="post" action="?p=admin&deleteuser">
Gebruikersnaam: <input type="text" name="username" /><br /><br />
<input type="submit" name="submit" value="Verwijderen" />
</form>

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]delete_ad[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$aQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM ads WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]delete_ad[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$aFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Advertentie werd niet gevonden</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[COLOR= #FF8000]/*
unlink(img/ads/ . mysql_real_escape_string($aFetch[id]) . . . mysql_real_escape_string($aFetch[filetype])) or die(Niet genoeg rechten of bestand niet gevonden.);


mysql_query("DELETE FROM ads WHERE id = " . mysql_real_escape_string($_GET[delete_ad]) . "") or die(mysql_error());
*/[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="succes">Advertenties verwijderen is even niet mogelijk. <a href="index.php">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]factuurdel[/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]submit[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/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]username[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit lid bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM factuur WHERE id = "[/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]fid[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Dit lid is succesvol verwijderd! <a href="index.php">Klik hier</a></div>[/COLOR][COLOR= #007700]; 

}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.<br /><br />

<form method="post" action="?p=admin&deleteuser">
Factuur id: <input type="text" name="fid" /><br /><br />
<input type="submit" name="submit" value="Verwijderen" />
</form>



}elseif(isset($_GET[factuur])){

ini_set(display_errors, On);
error_reporting(E_ALL);

if(isset($_POST[submit]))
{

    {


mysql_query("INSERT INTO factuur (bericht, bedrag, waarom, member_id) VALUES (" . $_POST[bericht] . ", " . $_POST[bedrag] . ", " . $_POST[waarom] . ", " . $_POST[member_id] . ")");

        echo <div id="succes">Factuur succesvol verstuurt <a href="index.php">Klik hier</a></div>; 

        }
    
}

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruiker die je wilt ranken.<br /><br />

<form method="post" action="?p=admin&factuur">
Gebruikers id: <input type="text" name="member_id" /><br />
Waarover gaat het: <input type="text" name="waarom" /><br />
Bedrag: <input type="text" name="bedrag" /><br />
Reactie: <input type="text" name="bericht" /><br />
<input type="submit" name="submit" value="Geef" />
</form>


[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ban[/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]submit[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/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]username[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit lid bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET banned_until = "[/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]ban_until[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]", ban_reason = "[/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]reason[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Dit lid is succesvol gebanned! <a href="index.php">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt bannen.<br /><br />

<form method="post" action="?p=admin&ban">
<table style="border: 0;">
<tr>
<td style="width: 210px;">
Gebruikersnaam:
</td>
<td>
<input type="text" name="username" />
</td>
</tr>
<tr>
<td style="width: 210px;">
Reden van ban:
</td>
<td>
<input type="text" name="reason" />
</td>
</tr>
<tr>
<td style="width: 210px;">
Bannen tot:
</td>
<td>
<input type="text" id="ban_until" name="ban_until" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Y-m-d H:i:s[/COLOR][COLOR= #007700]);[/COLOR] ?>" />
<img src="img/cal.gif" onclick="javascript:NewCssCal(ban_until,yyyyMMdd,dropdown,true,24,true)" style="cursor:pointer"/>
</td></tr></table><br /><br />
<input type="submit" name="submit" value="Bannen" />
</form>

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}

}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]unban[/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]submit[/COLOR][COLOR= #007700]])){[/COLOR]

[COLOR= #0000BB]$uQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE username = "[/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]username[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$uFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="error">Dit lid bestaat niet!</div>[/COLOR][COLOR= #007700];

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET banned_until =  WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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 id="succes">Dit lid is succesvol geunbanned! <a href="index.php">Klik hier</a></div>[/COLOR][COLOR= #007700];

}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt unbannen.<br /><br />

<form method="post" action="?p=admin&unban">
Gebruikersnaam: <input type="text" name="username" /><br /><br />
<input type="submit" name="submit" value="Unbannen" />
</form>

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]

?>
<h1>Beheer</h1>


<table style="border: 0;">

<tr>

<td style="width: 300px;">

<center><strong>Gebruikers</strong></center>
<ul>
<li><a href="?p=admin&deleteuser">Gebruiker verwijderen</a></li>
<li><a href="?p=admin&ban">Gebruiker bannen</a></li>
<li><a href="?p=admin&unban">Gebruiker unbannen</a></li>
</ul>

</td>

<td style="width: 300px;">
<center><strong>Factuur</strong></center>
<ul>
<li><a href="?p=admin&factuuradd">Factuur toevoegen</a></li>
<li><a href="?p=admin&factuurdel">Factuur verwijderen</a></li>
</ul>
</td>

</tr>

</table>

[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 id="error">Je hebt geen rechten om deze pagina te bekijken</div>[/COLOR][COLOR= #007700];

}[/COLOR]

?>
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
wordt leuk tellen zo....
Lekker ongeordende accolades, of heeft Notepad++ een accolade inspring-functie?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is dat dan?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Inspringen, tabs gebruiken voor elke ingeneste statement.

Als jij dit ziet staan {{{{{

Weet jij nog waar de 4e bij hoort?
Ik weet dat Netbeans wel zon functie heeft.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja, die daar bij word als je daar op klikt word dan rood.

Aarclay, zeg jij me wat hier fout aan is?

if(isset($_POST[submit])){

$uQuery = mysql_query("SELECT * FROM users WHERE username = " . mysql_real_escape_string($_POST[username]) . "") or die(mysql_error());
$uFetch = mysql_fetch_assoc($uQuery);

if(mysql_num_rows($uQuery) == 0){

echo <div id="error">Dit lid bestaat niet!</div>;

}else{

mysql_query("DELETE FROM factuur WHERE id = " . mysql_real_escape_string($_POST[fid]) . "") or die(mysql_error());

echo <div id="succes">Dit lid is succesvol verwijderd! <a href="index.php">Klik hier</a></div>; 

}

}else{

?>

<br />

Geef hieronder de gebruikersnaam in van de gebruik die je wilt verwijderen.<br /><br />

<form method="post" action="?p=admin&deleteuser">
Factuur id: <input type="text" name="fid" /><br /><br />
<input type="submit" name="submit" value="Verwijderen" />
</form>



}elseif(isset($_GET[factuur])){


toevoeging op 27 januari 2012, 18:28:24:
2 zelfs redface
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Waar is je eerste if?

Dit is gewoon ongeordend. Neem gewoon eens de moeite om het beter leesbaar te maken.
ram eens wat tabs in je code....
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Op einde "
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