$cols = db_simpleSelect(0, $Tt . ',' . $Tf, "{$Tt}.topic_id, {$Tt}.forum_id, {$Tt}.topic_title, {$Tt}.topic_time, {$Tf}.forum_name", '', '', '', "{$Tt}.topic_id DESC", $makeLim, $Tt . '.forum_id', '=', $Tf . '.forum_id', false); do { $i++; $forum = $cols[1]; $topic = $cols[2]; $searchResults .= '<b>' . $i . '. </b><span class=txtSm>' . $l_posted . ': ' . $cols[3] . '</span> - <a href="' . $indexphp . 'action=vtopic&forum=' . $forum . '&page=' . db_searchDeSlice(TRUE, $cols[0]) . '"><b>' . $cols[4] . '</b></a> <b>—›</b> <a href="' . $indexphp . 'action=vthread&forum=' . $forum . '&topic=' . $cols[0] . '">' . $topic . '</a><br><br>' . "\n"; } while ($cols = db_simpleSelect(1)); } elseif ($searchWhere == 2 && $numRows) { $xtr .= db_searchWithin($searchWhere, false); $cols = db_simpleSelect(0, $Tp . ',' . $Tt . ',' . $Tf, "{$Tp}.post_id, {$Tp}.forum_id, {$Tp}.topic_id, {$Tp}.post_text, {$Tp}.post_time, {$Tt}.topic_title, {$Tf}.forum_name", '', '', '', 'post_id DESC', $makeLim, $Tp . '.topic_id', '=', $Tt . '.topic_id', false); do { $i++; $forum = $cols[1]; $topic = $cols[2]; $pageAnchor = db_searchDeSlice(false, $cols[0]); $searchResults .= '<b>' . $i . '. </b><span class=txtSm>' . $l_posted . ': ' . $cols[4] . '</span> - <a href="' . $indexphp . 'action=vtopic&forum=' . $forum . '&page=' . db_searchDeSlice(TRUE, $topic) . '"><b>' . $cols[6] . '</b></a> <b>—›</b> <a href="' . $indexphp . 'action=vthread&forum=' . $forum . '&topic=' . $topic . '">' . $cols[5] . '</a><br>' . "\n" . ' <span class=txtSm><a href="' . $indexphp . 'action=vthread&forum=' . $forum . '&topic=' . $topic . '&page=' . $pageAnchor[0] . $pageAnchor[1] . '">' . substr(strip_tags($cols[3]), 0, 81) . '...</a></span><br><br>' . "\n"; } while ($cols = db_simpleSelect(1)); } } if ($days <= 0) { $days = $defDays; } $xtr = ''; $title = $title . $l_searchSite; if ($searchForum < 1) { $st = 1; $frm = ''; $SFchk = ' selected'; } else { $frm = $searchForum; }
} else { require $pathToFiles . 'bb_func_vtopic.php'; } } elseif ($action == 'ptopic') { $page = 0; if (!isset($errorMSG)) { if (isset($metaLocation)) { $meta_relocate = "{$main_url}/{$indexphp}action=vthread&forum={$forum}&topic={$topic}"; echo ParseTpl(makeUp($metaLocation)); exit; } else { header("Location: {$main_url}/{$indexphp}action=vthread&forum={$forum}&topic={$topic}"); } } } elseif ($action == 'vpost') { $pageAnchor = db_searchDeSlice(false, intval($_GET['post'])); header("Location: {$indexphp}action=vthread&forum={$forum}&topic={$topic}&page={$pageAnchor[0]}{$pageAnchor[1]}"); exit; } elseif ($action == 'search') { if ($reqTxt != 1) { require $pathToFiles . 'bb_func_txt.php'; } require $pathToFiles . 'bb_func_search.php'; } elseif ($action == 'wait') { if ($user_sort == 1) { $orderBy = 'topic_id DESC'; } else { $orderBy = 'topic_last_post_id DESC'; } $showIds = $USER->getForumOption('show', '', false); $filterCrit = " NOT IN ";