GetOne("SELECT COUNT(*) FROM `".KU_DBPREFIX."boards` WHERE `name` = '".mysql_real_escape_string($board)."' LIMIT 1"); if ($results == 0) { die('Invalid board.'); } $board_class = new Board($board); if ($board_class->board_type == 1) { $noboardlist = true; $hide_extra = true; $replies = $tc_db->GetOne("SELECT COUNT(*) FROM `" . KU_DBPREFIX . "posts_" . $board_class->board_dir . "` WHERE `parentid` = '" . mysql_real_escape_string($thread) . "'"); } else { $noboardlist = false; $hide_extra = false; $replies = false; $postidquery = ''; foreach ($postids as $postid) { if ($postid == $thread) { $postidquery .= "(`parentid` = 0 AND "; } else { $postidquery .= "(`parentid` = '" . mysql_real_escape_string($thread) . "' AND "; } $postidquery .= "`id` = '" . mysql_real_escape_string($postid) . "') OR "; } $postidquery = substr($postidquery, 0, -4); } $postids = getQuoteIds($posts, $replies); if (count($postids) == 0) { die('No valid posts specified.'); } $board_class->InitializeSmarty(); $board_class->CachePageHeaderData(); $page = $board_class->PageHeader($thread, 0, -1, -1, false, true); $page .= threadLinks('return', $thread, $board_class->board_dir, $board_class->board_type, false, false, true, true); if ($board_class->board_type == 1) { $page .= '
'; } else { $page .= '