bbj.php/index.php

32 lines
727 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);
if (isset($_GET["thread_id"])) {
$thread = $bbj->thread_load($_GET["thread_id"]);
if ($thread["error"]!=null) {
$title = "Unknown Thread | ".BBJ_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 {
$title = $thread["data"]["title"]." by ".$thread["usermap"][$thread["data"]["author"]]["user_name"]." | ".BBJ_NAME;
2018-07-07 06:09:31 +00:00
}
} else {
$title = BBJ_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';
?>