\n\n"; //echo " \n"; echo "".$locale['030']."\n"; echo "".$locale['031']." ".$locale['033']." ".$locale['034']." \n"; while($forum = dbarray($forums)){ $result = dbquery( "SELECT tf.*, tt.*, tu.user_id,user_name, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf INNER JOIN ".$db_prefix."threads tt USING(forum_id) INNER JOIN ".$db_prefix."posts tp USING(thread_id) INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id WHERE ".groupaccess('forum_access')." AND tf.forum_id='".$forum['forum_id']."' GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,1" ); while($data = dbarray($result)){ if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; } echo "\n"; //echo " //"; echo " ".$data['forum_name']." ".trimlink($data['thread_subject'], 30)."\n"; echo "".($data['count_posts']-1)." ".$data['user_name']." ".showdate("forumdate", $data['thread_lastpost'])." \n"; $i++; } } echo ""; ?>