prepare("SELECT COUNT(*) FROM forum_threads WHERE subforumid = :id AND NOT deleted AND (subject LIKE :query OR body LIKE :query)");
$threadcount->bindParam(":id", $subforumInfo->id, PDO::PARAM_INT);
$threadcount->bindParam(":query", $searchquery, PDO::PARAM_STR);
$threadcount->execute();
$pages = ceil($threadcount->fetchColumn()/20);
$offset = ($page - 1)*20;
$threads = $pdo->prepare("SELECT * FROM forum_threads WHERE subforumid = :id AND NOT deleted AND (subject LIKE :query OR body LIKE :query) ORDER BY pinned, bumpIndex DESC LIMIT 20 OFFSET :offset");
$threads->bindParam(":id", $subforumInfo->id, PDO::PARAM_INT);
$threads->bindParam(":query", $searchquery, PDO::PARAM_STR);
$threads->bindParam(":offset", $offset, PDO::PARAM_INT);
$threads->execute();
$isSubforum = true;
if(!$subforumInfo){ pageBuilder::errorCode(404); }
}
else
{
$forums = $pdo->query("SELECT * FROM forum_forums");
$isSubforum = false;
}
if($isSubforum)
{
pageBuilder::$pageConfig["title"] = general::replaceVars($subforumInfo->name)." - ".SITE_CONFIG["site"]["name_secondary"]." Forum";
pageBuilder::$pageConfig["og:description"] = $subforumInfo->description;
}
else
{
pageBuilder::$pageConfig["title"] = SITE_CONFIG["site"]["name_secondary"]." Forum";
pageBuilder::$pageConfig["og:description"] = "Discourse with the community here!";
}
pageBuilder::buildHeader();
?>
=SITE_CONFIG["site"]["name"]?> Forums
=general::replaceVars($subforumInfo->name)?>
Search results for "=general::filterText($_GET['searchq'])?>"
=general::replaceVars($subforumInfo->name)?>
=SITE_CONFIG["site"]["name"]?> Forums
minadminlevel || $subforumInfo->minadminlevel && SESSION && SESSION["adminLevel"] >= $subforumInfo->minadminlevel){ ?>
New Thread
1) { ?>
Subject
Author
Replies
Last Active
fetch(PDO::FETCH_OBJ)) { ?>
=general::filterText($thread->subject)?>
=users::getUserNameFromUid($thread->author)?>
=forum::getThreadReplies($thread->id)?>
=(time()-$thread->bumpIndex) < 604800 ? general::time_elapsed('@'.$thread->bumpIndex) : date('d/m/Y', $thread->bumpIndex)?>
Looks like there's no threads here =isset($_GET['searchq'])?'that matched your query':''?>
minadminlevel || $subforumInfo->minadminlevel && SESSION && SESSION["adminLevel"] >= $subforumInfo->minadminlevel){ ?>
New Thread
1) { ?>
fetch(PDO::FETCH_OBJ)){ ?>
Forum
Description
Threads
Posts
Last Active
prepare("SELECT * FROM forum_subforums WHERE forumid = :id ORDER BY displayposition ASC");
$subforums->bindParam(":id", $forum->id, PDO::PARAM_INT);
$subforums->execute();
while($subforum = $subforums->fetch(PDO::FETCH_OBJ))
{
$lastactive = $pdo->prepare("SELECT bumpIndex FROM forum_threads WHERE subforumid = :id AND NOT deleted ORDER BY bumpIndex DESC LIMIT 1");
$lastactive->bindParam(":id", $subforum->id, PDO::PARAM_INT);
$lastactive->execute();
?>
=general::replaceVars($subforum->name)?>
=general::replaceVars($subforum->description)?>
=forum::getSubforumThreadCount($subforum->id)?>
=forum::getSubforumThreadCount($subforum->id, true)?>
=general::time_elapsed('@'.$lastactive->fetchColumn())?>
=SITE_CONFIG["site"]["name"]?> Forums
=general::replaceVars($subforumInfo->name)?>
Search results for "=general::filterText($_GET['searchq'])?>"
=general::replaceVars($subforumInfo->name)?>
=SITE_CONFIG["site"]["name"]?> Forums