CoreFiles by mySites.guru
mod_status.php65 lines, 1,500 bytes, from Joomla_3.4.2-Stable-Full_Package.zip
Raw History Compare with 3.4.1
md5
01a50a8801f9fd4cb3376ef4f7fa912f
sha1
2c18d05135b4f791822c21a065f2a9dc400673e6
sha256
617ea540542937b3b21026fb8cae5310d407f9c0417fcd8d8d0feef3e3e4c746
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_status
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

$config	= JFactory::getConfig();
$user   = JFactory::getUser();
$db     = JFactory::getDbo();
$lang   = JFactory::getLanguage();
$input  = JFactory::getApplication()->input;

// Get the number of unread messages in your inbox.
$query	= $db->getQuery(true)
	->select('COUNT(*)')
	->from('#__messages')
	->where('state = 0 AND user_id_to = ' . (int) $user->get('id'));

$db->setQuery($query);
$unread = (int) $db->loadResult();

// Get the number of back-end logged in users.
$query->clear()
	->select('COUNT(session_id)')
	->from('#__session')
	->where('guest = 0 AND client_id = 1');

$db->setQuery($query);
$count = (int) $db->loadResult();

// Set the inbox link.
if ($input->getBool('hidemainmenu'))
{
	$inboxLink = '';
}
else
{
	$inboxLink = JRoute::_('index.php?option=com_messages');
}

// Set the inbox class.
if ($unread)
{
	$inboxClass = 'unread-messages';
}
else
{
	$inboxClass = 'no-unread-messages';
}

// Get the number of frontend logged in users.
$query->clear()
	->select('COUNT(session_id)')
	->from('#__session')
	->where('guest = 0 AND client_id = 0');

$db->setQuery($query);
$online_num = (int) $db->loadResult();

require JModuleHelper::getLayoutPath('mod_status', $params->get('layout', 'default'));

The same content is in 11 releases, Joomla 3.4.0-beta1 to 3.4.3. See them all, or every version of this file.