queued()) throw new thread_not_found(); if (isset($_POST["submit"])) { $t = safe_post("t"); if ($t != "") $thread->set_title($t); header("Location: thread.html?id=$id"); exit; } if (isset($_GET["s"])) { if ($user->can_subscribe()) { $s = $_GET["s"]; if ($s === "0") $user->unsubscribe($thread); else $user->subscribe($thread); } header("Location: thread.html?id=$id"); exit; } if (isset($_GET["pc"])) $page = (int)$_GET["pc"]; unnotify_subscription($user, $thread); $thread->mark(); $title .= " " . $thread->forum()->name(); set_this_link("thread", array("id" => $id)); $feed = $thread->make_feed_head_links(); } catch(bad_parameters $e) { $error = "bad parameters"; } catch(forum_not_found $e) { $error = "forum not found"; } catch(thread_not_found $e) { $error = "thread not found"; } catch(db_exception $e) { $error = $e->html(); } output_head("forum", $title, $feed); ?>