// ################ Welcome Panel V1.1 - Made by SmasherMaster ################
// Require User Functions
require_once('./includes/functions_user.php');
// Cell 1 - Avatar
$bbuserinfo['user_avatar']=fetch_avatar_url($bbuserinfo['userid']);
if($bbuserinfo['user_avatar']==""){
$bbuserinfo['user_avatar']="  ";
$bbuserinfo['user_avatar']=" {$bbuserinfo['user_avatar']}";
$welcome_avatar=$bbuserinfo['user_avatar'];
} else {
$bbuserinfo['user_avatar']="  ";
$bbuserinfo['user_avatar']=" {$bbuserinfo['user_avatar']}";
$welcome_avatar=$bbuserinfo['user_avatar'];
}
// Cell 2 - Quick Forum Stats
$welcome_new_posts=$DB_site->query_first("select count(*) as new_posts from ".TABLE_PREFIX."post where dateline > '{$bbuserinfo['lastvisit']}'");
$welcome_new_topics=$DB_site->query_first("select count(*) as new_topics from ".TABLE_PREFIX."thread where lastpost > '{$bbuserinfo['lastvisit']}'");
$total_members=$DB_site->query_first("select count(*) as all_users from ".TABLE_PREFIX."user");
$total_posts=$DB_site->query_first("select count(*) as all_posts from ".TABLE_PREFIX."post");
$total_topics=$DB_site->query_first("select count(*) as all_topics from ".TABLE_PREFIX."thread");
$welcome_members="{$total_members['all_users']}";
$welcome_topics="{$total_topics['all_topics']}";
$welcome_posts="{$total_posts['all_posts']}";
$welcome_pms=" $vbphrase[private_messages_nav]";
$welcome_newposts=" New Posts: {$welcome_new_posts['new_posts']} New Threads: {$welcome_new_topics['new_topics']}";
$welcome_time=" ";
|