Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/system_includes/welcome.inc.php
<?php
	$userQuery = mysql_query("SELECT * FROM ".TABLE."_user");
	while($userArray = mysql_fetch_array($userQuery)) {
		$userName[$userArray['userid']]  = $userArray['name'];
		$userEmail[$userArray['userid']] = $userArray['email'];
		$userFull[$userArray['userid']]  = $userArray['fullname'];
	}
	
	$sysMsgQuery = mysql_query("SELECT * FROM ".TABLE."_messages ORDER BY created DESC, level ASC LIMIT 0,5");
	while($sysMsg = mysql_fetch_array($sysMsgQuery)) {
		$firstsub = substr($sysMsg['created'],0,10);
		$dt = explode("-",$firstsub);
		$dat1 = $dt[2].".".$dt[1].".".$dt[0];
	
		switch($sysMsg['level']) {
			case "3":
				$bgcolor = "#448CCB";
				$tcolor  = "#000000";
				break;
			case "2":
				$bgcolor = "#FF8400";
				$tcolor  = "#000000";
				break;
			case "1":
				$bgcolor = "#FF3C00";
				$tcolor  = "#FFFFFF";
				break;
			default:
				$bgcolor = "#FFFFFF";
				$tcolor  = "#000000";
		}
		
		$tpl->assign("system_messages_set", "1");
		$sBgColor[]  = $bgcolor;
		$sTColor[]   = $tcolor;
		$sMessage[]  = $sysMsg['message'];
		$sDate[]     = $dat1;
		$sLevel[]    = $sysMsg['level'];
		$sUserName[] = $userName[$sysMsg['userid']];
		$sUserEmail[]= $userEmail[$sysMsg['userid']];
		$sUserFull[] = $userFull[$sysMsg['userid']];
	}
	
	$tpl->assign("system_messages",
		array("NAME"    => $sUserFull,
			"EMAIL"   => $sUserEmail,
			"FULL"    => $sUserFull,
			"MESSAGE" => $sMessage,
			"DATE"    => $sDate,
			"LEVEL"   => $sLevel,
			"BGCOLOR" => $sBgColor,
			"TCOLOR"  => $sTColor
		)
	);

	$tpl->assign("USER_NAME", $HTTP_SESSION_VARS[user]);
	$tpl->display("welcome.template");

?>
Return current item: Content*Builder