Hallo,
Ik zit met het probleem dat het forum dat ik aan het maken ben maar 1 "subforum" ouput, hoe los ik dit op dat die er meerdere output?
Hier mijn script:
PHP
<?php
require("include/init.php");
left();
?>
<div id="right">
<?php
$catlist = mysql_query("SELECT * FROM b_categories ORDER BY catsort ASC");
if($catlist)
{
while($cat = mysql_fetch_object($catlist))
{
$catid=$cat->categoryid;
print "<div class='title'>".$cat->categoryname."</div>";
print "<div class='box'><table width='100%'>
<tr>
<td colspan='2'>Forum Naam&Beschrijving</td>
<td>Topics</td>
<td>Berichten</td>
<td>Laatste Bericht</td>
</tr>
";
$forumlist = mysql_query("SELECT * FROM b_forums f, b_permissions p WHERE f.parentid='".$catid."' AND p.groupid='".$user->groupid."' AND p.view=1 AND f.forumid=p.forumid AND f.pforum='0' ORDER BY f.sort ASC");
if($forumlist)
{
while($forum = mysql_fetch_object($forumlist))
{
print "<tr valign='middle'>";
if($forum->lastposttime > $user->oldtime){
print "<td width='30'><center><img src='forum/images/postforum.jpg' border='0'></center></td>";
}else{
print "<td width='30'><center><img src='forum/images/postforum.gif' border='0'></center></td>";
}
print "<td><a href='?page=forum/showforum&fid=".$forum->forumid."'><b>".$forum->name."</b></a>";
print "<br/>".$forum->description."</td>";
print "<td>".$forum->numtopics."</td>";
print "<td>".$forum->numposts."</td>";
if($forum->lastposttime=="" || $forum->lastposttime=="0")
{ $us="<center>Nooit</center>"; }
else
{
$timepostforum=$forum->lastposttime;
$timepostforum=date("D M d, Y H:i:s", $timepostforum);
$us=$timepostforum."<br/>Laatste bericht door: <b><font color='#FF00FF'>".getusernamebyid($forum->lastpostuser)."</font></b>";
}
print "<td>".$us."</td>";
print "</tr>";
}
}
echo "</table></div>";
}
}
?>
<div class="title">Legenda</div>
<div class="box">
<img src="forum/images/postforum.jpg"/> Forum heeft nieuwe berichten<br />
<img src="forum/images/postforum.gif"/> Forum heeft geen nieuwe berichten
</div>
<?php reclame(); ?>
</div>
Toon Meer
Mvg,
Werty9021