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