<?php
ob_start();
if(!(is_readable(realpath(dirname(__FILE__).'/../').'/include/includesroutines.inc'))) {
	die('Error - Could not open or read file '.realpath(dirname(__FILE__).'/../').'/include/includesroutines.inc');
} else {
	include_once(realpath(dirname(__FILE__).'/../').'/include/includesroutines.inc');
}
session_write_close();
checkLanguage();

if ( GetSetting('portal','useRights',0) == 1 && !IsUserLogin()){
	ob_end_flush();
	exit;
}

$cn = db_connect();
$newmsg = db_getNewMesssageCountForMenu($cn, GetUserIDs()); 
echo ($newmsg > 0 ? ($newmsg > 99 ? '99+': $newmsg) : '');
unset($cn);
ob_end_flush();
?>