sql_query( "SELECT * FROM ".$prefix."_bbtopics" ); $Amount_Of_Topics = $db->sql_numrows( $result ); /* Total Amount of Posts */ $result = $db->sql_query( "SELECT * FROM ".$prefix."_bbposts" ); $Amount_Of_Posts = $db->sql_numrows( $result ); /* Total Amount of Topic Views */ $Amount_Of_Topic_Views = 0; $result = $db->sql_query( "SELECT topic_views FROM ".$prefix."_bbtopics" ); while( list( $topic_views ) = $db->sql_fetchrow( $result ) ) { $Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views; } /* Total Amount of Topic Replies */ $Amount_Of_Topic_Replies = 0; $result = $db->sql_query( "SELECT topic_replies FROM ".$prefix."_bbtopics" ); while( list( $topic_replies ) = $db->sql_fetchrow( $result ) ) { $Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies; } /* Total Amount of Members */ $result = $db->sql_query( "SELECT * FROM ".$user_prefix."_users" ); $Amount_Of_Members = $db->sql_numrows( $result ); $count = 1; $content = "
"._BBFORUM_TOTTOPICS." $Amount_Of_Topics
"._BBFORUM_TOTPOSTS." $Amount_Of_Posts
"._BBFORUM_TOTVIEWS." $Amount_Of_Topic_Views
"._BBFORUM_TOTREPLIES." $Amount_Of_Topic_Replies
"._BBFORUM_TOTMEMBERS." $Amount_Of_Members
"; $content .= "
"; $content .= ""; $content .="
Last 20 Forum Messages
"; $content .= "
"; $result1 = $db->sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id, u.username, u.user_id, p.poster_id, FROM_UNIXTIME(p.post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f LEFT JOIN ".$prefix."_bbposts p ON (p.post_id = t.topic_last_post_id) LEFT JOIN ".$prefix."_users u ON (u.user_id = p.poster_id) WHERE t.forum_id=f.forum_id AND f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT 20"); while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id, $username, $user_id, $poster_id, $post_time) = $db->sql_fetchrow($result1)) { $topic_title=parseEmoticons($topic_title); $content .= "\"\" $topic_title
Last post by $username in $forum_name on $post_time

"; $count = $count + 1; } $content .= "
"; $content .= "
"._BBFORUM_FORUM." "._BBFORUM_SEARCH."
"; $a = 1; global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $admin, $module_name; $result=sql_query("SELECT user_id, username, user_posts, user_avatar FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,5", $dbi); while(list($user_id, $username, $user_posts, $user_avatar) = sql_fetch_row($result, $dbi)) { $content .= "
"; $content .= ""; $content .= ""; } else if (eregi("http://", $user_avatar)) { $content .= "  "; } else $content .= "  "; $content .= ""; $content .= ""; $content .= "
"; if ($user_avatar=="") { $content .= "   $username 
 Posts: 
"; $content .= " $user_posts 

"; } ?>