bbj.php/index.php

33 lines
745 B
PHP
Raw Normal View History

2018-07-07 06:09:31 +00:00
<?php
include 'client/config.php';
include 'bbj.php';
$bbj = new BBJ(BBJ_HOST,BBJ_PORT);
2019-10-08 15:25:31 +00:00
$name = "tildeverse BBJ";
2018-07-07 06:09:31 +00:00
if (isset($_GET["thread_id"])) {
$thread = $bbj->thread_load($_GET["thread_id"]);
if ($thread["error"]!=null) {
2019-10-08 15:25:31 +00:00
$title = "Unknown Thread | ".$name;
2018-07-07 06:09:31 +00:00
include 'client/header.php';
echo "\t\t<p>No such thread exists. <a href='/'>Go home.</a></p>";
2018-07-07 06:09:31 +00:00
include 'client/footer.php';
die();
} else {
2019-10-08 15:25:31 +00:00
$title = $thread["data"]["title"]." by ".$thread["usermap"][$thread["data"]["author"]]["user_name"]." | ".$name;
2018-07-07 06:09:31 +00:00
}
} else {
2019-10-08 15:25:31 +00:00
$title = $name;
2018-07-07 06:09:31 +00:00
}
include 'client/header.php';
if (isset($thread)) {
2018-07-08 13:29:24 +00:00
include 'client/thread.php';
2018-07-07 06:09:31 +00:00
} else {
2018-07-08 13:29:24 +00:00
include 'client/main.php';
2018-07-07 06:09:31 +00:00
}
include 'client/footer.php';
?>