Edit]"; // Get userid of the person who created this thread $query = "select userid from users " . "where school_num = $base_school_num " . "and record_num = $posted_by"; $posted_id = db_getVal($query) . " $edit"; // Determine how many posts there are for this topic $query = "select count(*) from forum_threads " . "where school_num = $school_num " . "and top_thread_id = $record_num"; $posts = db_getVal($query); // Get last post info $last_posted_by = ""; $last_post = "No Posts"; // Get last post information $query = "select posted_by,posted_time from forum_threads " . "where school_num = $school_num " . "and (top_thread_id = $record_num or record_num = $record_num) " . "order by posted_time desc " . "limit 0,1"; $result = db_query($query); if (db_num_rows($result)) { $row = db_fetch_array($result); $last_post = date("D M jS @ g:ia",$row['posted_time']); $user_num = $row['posted_by']; $query = "select userid from users " . "where school_num = $base_school_num " . "and record_num = $user_num"; $last_posted_by = "posted by :: " . db_getVal($query); } if (strlen($message)) $message = nl2br($message) . "
\n
\n"; ?>
Topic Replies Views Last Post

Created By ::

- Topic :: $subject"; // Setup form values if ($forum_status == 'Open' && !isset($topic)) { $TitleText = "Create a New Forum Topic"; $ButtonText = "Create Topic"; $next_naction = "new-topic"; $topic = 0; $subject = ""; $message = ""; include "forums.topic-form.php"; } ?>