<h6><span>F</span>orum</h6>
<div id="forum">
<?php
//forum overzicht
if(isLogged()){//controlleren of gebruiker is ingelogd
$query = mysql_query("SELECT * FROM categories WHERE cat_rights <='".$user->rights()."'");//Alleen leden
while($res = mysql_fetch_object($query)){
echo "<h6>".$res->cat_naam."</h6>";
$forums = mysql_query("SELECT * FROM forums WHERE categorie ='".$res->cat_id."'");
echo "<table border=\"0\" cellpadding=\"5\" style=\"border: none;\" width=\"100%\">";
echo "<tr class=\"title\"><td>Titel</td><td width=\"5%\">Onderwerpen</td></tr>";
while($fetch = mysql_fetch_object($forums)){
$topics = mysql_num_rows(mysql_query("SELECT * FROM topics WHERE forum =".$fetch->forum_id.""));
echo "<tr><td><h4 onClick=\"gaNaar('/forum/".$fetch->forum_id."/forums');\">» ".$fetch->forum_naam."</h4></td><td>".$topics."</td></tr>";
}
echo "</table><br>";
}
}else{//gebruiker is niet ingelogd
echo "Je moet ingelogd zijn om het forum te bekijken!";
}
?>
</div>
<h6><span>F</span>orum</h6>
<div id="forum">
<?php
//forum overzicht
if(isLogged()){//controlleren of gebruiker is ingelogd
$query=mysql_query("SELECT * FROM categories WHERE cat_rights <='".$user->rights()."'");//Alleen leden