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(); ?>
minadminlevel || $subforumInfo->minadminlevel && SESSION && SESSION["adminLevel"] >= $subforumInfo->minadminlevel){ ?>New Thread
1) { ?>
name)?>
fetch(PDO::FETCH_OBJ)) { ?>
Subject Author Replies Last Active
subject)?> author)?> id)?> bumpIndex) < 604800 ? general::time_elapsed('@'.$thread->bumpIndex) : date('d/m/Y', $thread->bumpIndex)?>
Looks like there's no threads here
minadminlevel || $subforumInfo->minadminlevel && SESSION && SESSION["adminLevel"] >= $subforumInfo->minadminlevel){ ?>New Thread
1) { ?>
fetch(PDO::FETCH_OBJ)){ ?>
name)?>
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(); ?>
Forum Description Threads Posts Last Active
name)?> description)?> id)?> id, true)?> fetchColumn())?>