";
if($fid) {
echo "Legend: Forums";
if($tid) {
include_once("forums.php");
$forums = new Forums($FORUMS_DIR . "/forums.xml");
$forum = $forums->getForum($fid);
echo " :: ".$forum->name."";
include_once("posts.php");
$posts = new Posts($FORUMS_DIR . "/" . $fid . "/" . $tid . ".xml");
echo " :: ".$posts->thread->name;
$posts->show();
} else {
include_once("forums.php");
$forums = new Forums($FORUMS_DIR . "/forums.xml");
$forum = $forums->getForum($fid);
echo " :: ".$forum->name;
echo "
Threads in '".$forum->name."'
\n";
echo " New thread\n";
include_once("threads.php");
$threads = new Threads($FORUMS_DIR . "/" . $fid);
$threads->show();
}
} else {
echo "Legend: Forums";
echo " Forums
\n";
include_once("forums.php");
$forums = new Forums($FORUMS_DIR . "/forums.xml");
if($action == "addforum") {
$newfid = 1;
while($forums->getForum($newfid)) $newfid++;
$forums->add(new Forum($newfid, $title));
$forums->write();
}
$forums->show();
if($current_user->uid == 0) {
?>
\n";
?>