<?php
  if(isset($ForumParent)){
    $level="num=$ForumParent";
    $nav="<a href=\"$myname?page=manage&$level\">Up A Level</a> | <a href=\"$myname?page=manage\">Up To Top</a>";
  }    
  else{
    $ForumParent=0;
    $ForumName="List des Forums";
    $nav='&nbsp;';
    $num=0;
  }
?>
<center><?PHP echo $nav; ?></center>
<table cellspacing="0" cellpadding="3" border="1">
<tr>
    <td colspan="2" align="center" bgcolor="<?PHP echo $color1 ?>"><font face="Arial,Helvetica" color="<?PHP echo $color2 ?>"><?PHP echo $ForumName; ?></font></td>
</tr>
<?PHP
  $sSQL="Select * from ".$pho_main." where parent=$num order by name";
  $q->query($DB, $sSQL);
  $rec=(object)$q->getrow();
  if($q->numrows()==0){
?>
<tr>
    <td colspan="2" align="center" bgcolor="#FFFFFF"><font face="Arial,Helvetica">No Forums Defined.</font></td>
</tr>
<?PHP
  }
  While(isset($rec->id)){
    if($rec->folder){
      $text="Repertoire";
    }
    else{
      $text="Forum";
    }
?>
<tr>
    <td bgcolor="#FFFFFF"><a class="student" href="<?PHP echo $myname."?connexion=".$gconnexionid."&page=managemenu&num=".$rec->id; ?>"><?PHP echo $rec->name; ?></a><?PHP if($rec->folder) { ?> - <a href="<?PHP echo $myname."?connexion=".$gconnexionid."&page=manage&num=".$rec->id; ?>">Browse</a><?PHP } ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td bgcolor="#FFFFFF"><font face="Arial,Helvetica"><?PHP echo $text; ?></font></td>
</tr>
<?PHP    
    $rec=(object)$q->getrow();
  }
?></td>
</tr>
</table>
