Hoi,
Ik krijg deze error:
Parse error: syntax error, unexpected } in /home/***/justfm.nl/admin/uitloggen.php on line 95
Dit is de code:
Wat is er fout aan? Ik heb veel geprobeerd, verschuift de error alleen maar een line.
Ik krijg deze error:
Parse error: syntax error, unexpected } in /home/***/justfm.nl/admin/uitloggen.php on line 95
Dit is de code:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"functions.php"[/COLOR][COLOR= #007700];[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>JUST! DJ Paneel</title>
</head>
<body>
<div id="header">
<div id="logo"><b>JUST! FM DJ Paneel</b></div>
<div id="user">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]checklogin[COLOR= #007700]()) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Ingelogd als user: <span>[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]</span>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br /> Je bent een: <span>[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rang[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]</span>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br /><a href="uitloggen.php">Uitloggen</a>[/COLOR][COLOR= #007700];[/COLOR]
?>
<br /> </div>
</div>
<div id="menu">
<div id="menu-nav">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rang[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"DJ"[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rang[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"Hoofd-DJ"[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rang[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"Manager"[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rang[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"Admin"[/COLOR][COLOR= #007700]) {[/COLOR]
?>
<ul>
<li><a href="index">Home</a></li>
<li><a href="djsays">DJ Zegt</a></li>
<li><a href="radioconnection">Radio Info</a></li>
<li><a href="faq">Help!</a></li>
<li><a href="rules">Regels</a></li>
<li><a href="requests">Requests</a></li>
<li><a href="timetable">Timetable</a></li>
<li><a href="beheer">Beheer</a></li>
</ul>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
</div>
</div>
<div id="container">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR]checklogin[COLOR= #007700]()) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<center><div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je bent niet ingelogd, je moet eerst ingelogd zijn om uit te kunnen loggen.</div></center>[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logout[/COLOR][COLOR= #007700]]) {[/COLOR]
[COLOR= #0000BB]$count_sessions[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT COUNT(*) FROM sessions WHERE userid = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" "[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$sessionscounted[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$count_sessions[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$sessionscounted[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR] [COLOR= #0000BB]$browserstring[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"browser"[/COLOR][COLOR= #007700]; }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] [COLOR= #0000BB]$browserstring[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"browsers"[/COLOR][COLOR= #007700]; }[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<p>Je bent op dit moment ingelogd op <b>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sessionscounted[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</b> "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$browserstring[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]".<br />Maak een keuze uit een van de volgende opties:</p>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form method="POST" action="">"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<input name="logoutmode" type="radio" value="onlythissession">Alleen deze PC.<br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<input name="logoutmode" type="radio" value="allsessions">Alle PCs.<br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<input name="logoutmode" type="radio" value="choosesession" id="logout_by_session">Kies een sessie:<br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<table border="1">"[/COLOR][COLOR= #007700];[/COLOR]
?>
<tr>
<td> </td>
<td>SessID</td>
<td>Datum / tijd</td>
</tr>
[COLOR= #0000BB]<?php
$sessioninfo[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM sessions WHERE userid = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sessions[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sessioninfo[/COLOR][COLOR= #007700])){[/COLOR]
?>
<tr>
<td><input name="sessionid[]" type="checkbox" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$sessions[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]];[/COLOR]?>" onChange="document.getElementById(logout_by_session).checked = true" /></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$sessions[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]];[/COLOR]?></td>
<td>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$sessions[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logintime[/COLOR][COLOR= #007700]];[/COLOR]?></td>
</tr>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
</table>
<input type="submit" name="logout" value="Uitloggen">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</form>"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logoutmode[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"onlythissession"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM sessions WHERE hash = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" "[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je huidige sessies zijn uitgelogd.</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 style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je sessie is niet uitgelogd wegens een fout:<br />[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();[/COLOR][COLOR= #DD0000]</div>[/COLOR]
[COLOR= #007700]}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logoutmode[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"allsessions"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM sessions WHERE userid = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" "[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Al jouw sessies zijn uitgelogd.</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 style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je sessies zijn niet uitgelogd wegens een fout:<br />[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();[/COLOR][COLOR= #DD0000]</div>[/COLOR]
[COLOR= #007700]}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logoutmode[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"allothersession"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Deze functie werkt nog niet!</div>[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logoutmode[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"choosesession"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je sessies zijn uitgelogd!</div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sessionid[/COLOR][COLOR= #007700]] as[/COLOR] [COLOR= #0000BB]$index[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$sessid[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM sessions WHERE hash = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$sessid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" "[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je sessie is niet uitgelogd wegens een fout:<br />[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();[/COLOR][COLOR= #DD0000]</div>[/COLOR]
[COLOR= #007700]}
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]logoutmode[/COLOR][COLOR= #007700]]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>je bent vergeten een uitlog optie te kiezen.</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 style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Deze uitlogoptie is niet bekend!</div>[/COLOR][COLOR= #007700];
}
}
}[/COLOR]
?>
</div>
</body>
</html>
[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]<center><div style="font-family:calibri;width:600px; text-align:center; margin-left:auto; margin-right:auto;margin-top:50px; padding:8px; border:1px solid #9c0006; background:#ffc7ce; color:#9c0006;"><strong>Foutmelding</strong> <br><br>Je moet ingelogd zijn om deze pagina te bekijken!</div></center>[/COLOR][COLOR= #007700];
}[/COLOR]
?> Wat is er fout aan? Ik heb veel geprobeerd, verschuift de error alleen maar een line.
Beginnend phper.