getId();
$output = array();
// Legacy Mode
if (defined('_JLEGACY')) {
$output[] = ''.JText::_('Legacy').': '._JLEGACY.'';
}
// Print the preview button
$output[] = "".JText::_('Preview')."";
// Get the number of unread messages in your inbox
$query = 'SELECT COUNT(*)'
. ' FROM #__messages'
. ' WHERE state = 0'
. ' AND user_id_to = '.(int) $user->get('id');
$db->setQuery( $query );
$unread = $db->loadResult();
if (JRequest::getInt('hidemainmenu')) {
$inboxLink = '';
} else {
$inboxLink = '';
}
// Print the inbox message
if ($unread) {
$output[] = $inboxLink.''.$unread.'';
} else {
$output[] = $inboxLink.''.$unread.'';
}
// Get the number of logged in users
$query = 'SELECT COUNT( session_id )'
. ' FROM #__session'
. ' WHERE guest <> 1'
;
$db->setQuery($query);
$online_num = intval( $db->loadResult() );
//Print the logged in users message
$output[] = "".$online_num."";
if ($task == 'edit' || $task == 'editA' || JRequest::getInt('hidemainmenu') ) {
// Print the logout message
$output[] = "".JText::_('Logout')."";
} else {
// Print the logout message
$output[] = "".JText::_('Logout')."";
}
// reverse rendering order for rtl display
if ( $lang->isRTL() ) {
$output = array_reverse( $output );
}
// output the module
foreach ($output as $item){
echo $item;
}