SQL Statement: $statement"); $count_res = SQL_query($statement, $db_link); $count_rows = SQL_get_aff_rows($db_link, $count_res); if ($count_rows > 0) { $row = SQL_fetch_array($count_res, 0); $lstatus = $row["status"]; } $db_result = SQL_query($statement2, $db_link); $aff_rows = SQL_get_aff_rows($db_link, $db_result); $cur_pos = $cur_limit + $aff_rows; //print("
Currently showing $cur_limit to $cur_pos of $count_rows posts in $category.

\n"); if ($aff_rows == 0) { print("No posts found in this category yet.\n"); } if (!isset_bit($lstatus, $FLAG_LOCKED_THREAD)) { print("
"); print("
\n"); } else { print("
"); print("
\n"); } if ($count_rows > $aff_rows) { print("

Page "); $pages = ($count_rows / $site_max_posts); if ($count_rows % $site_max_posts) { $pages++; } $pages--; for ($page = 0; $page < $pages; $page++) { $page_disp = $page + 1; $start = $page * $site_max_posts; $page_url = $site_url . "browse_thread" . $ext . "?category=" . urlencode($category) . "&query=$query&thread_name=". urlencode($thread_name) . "&cur_limit=$start"; if ($start == $cur_limit) { print(" $page_disp "); } else { print(" $page_disp "); } } print("

"); } print("\n"); print("\n"); // get each row for($db_rows = 0; $db_rows < $aff_rows; $db_rows++) { $row = SQL_fetch_array($db_result, $db_rows); $post_id = $row["id"]; if ($db_rows == 0) { if (isset_bit($lstatus, $FLAG_LOCKED_THREAD)) { print("\n"); } } if (($db_rows % 2) == 1) { print("\n"); } else { print("\n"); } $realname = get_user_info_field($row["username"], $user_name_field); $imgurl = get_user_info_field($row["username"], $image_field); $admin = get_user_info_field($row["username"], $admin_field); $email = get_user_info_field($row["username"], $email_field); print("\n"); $text = make_clickable($row["text"]); $text = nl2br($text); $title2 = make_clickable($row["title"]); $title2 = nl2br($title2); $title2 = stripslashes($title2); print(""); $last_title = $row["title"]; } print("
AuthorTopic
This thread is locked.
"); parse_user($realname, $row["username"], $admin, $imgurl, $row["posted"], $email); if ($user_mod) { print("
" . $row["remote_addr"]); if ($row["remote_host"] != "") { print("
(" . $row["remote_host"] . ")"); } print("

"); if ($moderated && $row["approved"] != $moderated) { $approve_ref = $site_url . "moderate" . $ext . "?query=$post_id&action=approve_confirm&category=" . urlencode($category); print("Approve "); } if ($row["thread_id"] == 0) { $del_thread_ref = $site_url . "moderate" . $ext . "?query=$query&action=del_t_confirm&category=" . urlencode($category); $lock_thread_ref = $site_url . "moderate" . $ext . "?query=$query&action=lock_confirm&category=" . urlencode($category); $unlock_thread_ref = $site_url . "moderate" . $ext . "?query=$query&action=unlock_confirm&category=" . urlencode($category); $move_thread_ref = $site_url . "moderate" . $ext . "?query=$query&action=move_confirm&category=" . urlencode($category); print("Delete Thread "); print("Lock Thread
"); print("Unlock Thread
"); print("Move Thread
"); } else { $del_post_ref = $site_url . "moderate" . $ext . "?query=$post_id&action=del_p_confirm&category=" . urlencode($category); print("Delete Post"); } } print("
$title2"); if ($moderated && $user_mod && $row["approved"] != $moderated) { print("  (Unapproved Post)"); } print("
$text
\n"); if (!isset_bit($lstatus, $FLAG_LOCKED_THREAD)) { print("
"); print("
\n"); } else { print("
"); print("
\n"); } bottom_bar(); SQL_close($db_link); // thats all for the moment, folks... include $inc_dir . "footer.php3"; ?>