<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBoard 1.0 Release Candidate 1 Updated Feb 13, 2005              # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright @2005 PHPHOST Enterprises Ltd. All Rights Reserved.    # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # http://www.phphost.cn                                            # ||
|| #################################################################### ||
\*======================================================================*/

if ($bbuserinfo['userid']) 
{
	if ($vba_options['portal_welcome_avatar'])
	{
		require_once('./includes/functions_user.php');
		$avatarurl = fetch_avatar_url($bbuserinfo['userid']);
		$avatarurl = iif($avatarurl, $vboptions['bburl'] . '/' . $avatarurl, $stylevar['imgdir_misc'] . '/noavatar.gif');
	}

	$lastvisitdate = vbdate($vba_options['portal_welcome_lastvisit_date'], $bbuserinfo['lastvisit']);
	$lastvisittime = vbdate($vba_options['portal_welcome_lastvisit_time'], $bbuserinfo['lastvisit']);

	if ($vba_options['portal_welcome_newposts'])
	{
		$getnewposts = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline >= '$bbuserinfo[lastvisit]'");
		$newposts = number_format($getnewposts['count']);
	}
}

eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_welcomeblock') . '";');

?>
