".$settings['sitename']." | $caption\n"; if (iMEMBER && $can_post) { echo " ".$locale[ \n"; } echo " \n"; $rows = dbrows(dbquery("SELECT * FROM ".$db_prefix."threads WHERE forum_id='$forum_id' AND thread_sticky='0'")); if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; if ($rows > $threads_per_page) { echo "
".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?forum_id=$forum_id&")."
\n"; } echo "
\n"; if ($rowstart == 0) { $result = dbquery( "SELECT t.*, COUNT(p.post_id) AS thread_replies, tu1.user_name AS user_author, tu2.user_name AS user_lastuser FROM ".$db_prefix."threads t LEFT JOIN ".$db_prefix."posts p USING(thread_id) LEFT JOIN ".$db_prefix."users tu1 ON t.thread_author = tu1.user_id LEFT JOIN ".$db_prefix."users tu2 ON t.thread_lastuser = tu2.user_id WHERE t.forum_id='$forum_id' AND thread_sticky='1' GROUP BY thread_id ORDER BY thread_lastpost DESC" ); if (dbrows($result) != 0) { while ($data = dbarray($result)) { if ($data['thread_locked']) { echo "\n"; } else { if ($data['thread_lastpost'] > $lastvisited) { $folder = "".$locale["; } else { $folder = "".$locale["; } echo "\n"; } $reps = ceil($data['thread_replies'] / $threads_per_page); $threadsubject = "".$data['thread_subject'].""; if ($reps > 1) { $ctr = 0; $ctr2 = 1; $pages = ""; while ($ctr2 <= $reps) { $pnum = "$ctr2 "; $pages = $pages.$pnum; $ctr = $ctr + $threads_per_page; $ctr2++; } $threadsubject .= " - (".$locale['412'].trim($pages).")"; } echo "\n"; } $threadcount = dbrows($result); } else { $threadcount = 0; } } if ($rows != 0) { $result = dbquery( "SELECT t.*, COUNT(p.post_id) AS thread_replies, tu1.user_name AS user_author, tu2.user_name AS user_lastuser FROM ".$db_prefix."threads t LEFT JOIN ".$db_prefix."posts p USING(thread_id) LEFT JOIN ".$db_prefix."users tu1 ON t.thread_author = tu1.user_id LEFT JOIN ".$db_prefix."users tu2 ON t.thread_lastuser = tu2.user_id WHERE t.forum_id='$forum_id' AND thread_sticky='0' GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT $rowstart,20" ); $numrows = dbrows($result); while ($data = dbarray($result)) { if ($data['thread_locked']) { echo "\n"; } else { if ($data['thread_lastpost'] > $lastvisited) { $folder = "".$locale["; } else { $folder = "".$locale["; } echo "\n"; } $reps = ceil($data['thread_replies'] / $threads_per_page); $threadsubject = "".$data['thread_subject'].""; if ($reps > 1) { $ctr = 0; $ctr2 = 1; $pages = ""; while ($ctr2 <= $reps) { $pnum = "$ctr2 "; $pages = $pages.$pnum; $ctr = $ctr + $threads_per_page; $ctr2++; } $threadsubject .= " - (".$locale['412'].trim($pages).")"; } echo "\n"; } } else { if ($threadcount == 0) { echo "\n\n\n"; } } echo "
  ".$locale['451']." ".$locale['452']." ".$locale['453']." ".$locale['454']." ".$locale['404']."
".$locale[
$folder".$locale[ $threadsubject ".$data['user_author']." ".$data['thread_views']." ".($data['thread_replies']-1)." ".showdate("forumdate", $data['thread_lastpost'])."
".$locale['406']."".$data['user_lastuser']."
".$locale[
$folder$threadsubject ".$data['user_author']." ".$data['thread_views']." ".($data['thread_replies']-1)." ".showdate("forumdate", $data['thread_lastpost'])."
".$locale['406']."".$data['user_lastuser']."
".$locale['455']."
\n"; if ($rows > $threads_per_page) { echo "
".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?forum_id=$forum_id&")."
\n"; } $forum_list = ""; $current_cat = ""; $result = dbquery( "SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name FROM ".$db_prefix."forums f INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC" ); while ($data2 = dbarray($result)) { if ($data2['forum_cat_name'] != $current_cat) { if ($current_cat != "") $forum_list .= "\n"; $current_cat = $data2['forum_cat_name']; $forum_list .= "\n"; } $sel = ($data2['forum_id'] == $data['forum_id'] ? " selected" : ""); $forum_list .= "\n"; } $forum_list .= "\n"; echo "\n"; if (iMEMBER && $can_post) { echo "\n"; } echo "
".$locale['540']."
".$locale[
\n"; echo "
".$locale[ - ".$locale['456']."( ".$locale[ - ".$locale['457']." )
".$locale[ - ".$locale['458']."
".$locale[ - ".$locale['459']."
".$locale[ - ".$locale['460']."
\n"; closetable(); echo "\n"; require_once BASEDIR."side_right.php"; require_once BASEDIR."footer.php"; ?>