first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,65 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_status
*
* @copyright Copyright (C) 2005 - 2013 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 = '<span class="badge">' . (int) $db->loadResult() . '</span>';
// 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 = '<span class="badge">' . (int) $db->loadResult() . '</span>';
require JModuleHelper::getLayoutPath('mod_status', $params->get('layout', 'default'));

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<extension
type="module"
version="3.1"
client="administrator">
<name>mod_status</name>
<author>Joomla! Project</author>
<creationDate>Feb 2006</creationDate>
<copyright>(C) 2005 - 2013 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>MOD_STATUS_XML_DESCRIPTION</description>
<files>
<filename module="mod_status">mod_status.php</filename>
<filename>index.html</filename>
<folder>tmpl</folder>
</files>
<languages>
<language tag="en-GB">en-GB.mod_status.ini</language>
<language tag="en-GB">en-GB.mod_status.sys.ini</language>
</languages>
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_STATUS" />
<config>
<fields name="params">
<fieldset name="basic">
<field
name="show_loggedin_users"
type="radio"
class="btn-group"
default="1"
label="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_LABEL"
description="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_DESC">
<option
value="0">JNO</option>
<option
value="1">JYES</option>
</field>
<field
name="show_loggedin_users_admin"
type="radio"
class="btn-group"
default="1"
label="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_ADMIN_LABEL"
description="MOD_STATUS_FIELD_SHOW_LOGGEDIN_USERS_ADMIN_DESC">
<option
value="0">JNO</option>
<option
value="1">JYES</option>
</field>
<field
name="show_messages"
type="radio"
class="btn-group"
default="1"
label="MOD_STATUS_FIELD_SHOW_MESSAGES_LABEL"
description="MOD_STATUS_FIELD_SHOW_MESSAGES_DESC">
<option
value="0">JNO</option>
<option
value="1">JYES</option>
</field>
</fieldset>
<fieldset name="advanced">
<field
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC" />
<field
name="moduleclass_sfx"
type="textarea" rows="3"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
<field
name="cache"
type="list"
default="0"
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC">
<option
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
</field>
</fieldset>
</fields>
</config>
</extension>

View File

@ -0,0 +1,60 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_status
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$hideLinks = $input->getBool('hidemainmenu');
$task = $input->getCmd('task');
$output = array();
// Print the Preview link to Main site.
if ($params->get('show_viewsite', 1)) :
$output[] = '<div class="btn-group viewsite"><a href="' . JUri::root() . '" target="_blank"><i class="icon-share-alt"></i> ' . JText::_('JGLOBAL_VIEW_SITE') . '</a></div><div class="btn-group divider">
</div>';
endif;
// Print the logged in users.
if ($params->get('show_loggedin_users', 1)) :
$output[] = '<div class="btn-group loggedin-users">' . JText::plural('MOD_STATUS_USERS', $online_num) . '</div><div class="btn-group divider">
</div>';
endif;
// Print the back-end logged in users.
if ($params->get('show_loggedin_users_admin', 1)) :
$output[] = '<div class="btn-group backloggedin-users">' . JText::plural('MOD_STATUS_BACKEND_USERS', $count) . '</div><div class="btn-group divider">
</div>';
endif;
// Print the inbox message.
if ($params->get('show_messages', 1)) :
$output[] = '<div class="btn-group ' . $inboxClass . '">' .
($hideLinks ? '' : '<a href="' . $inboxLink . '">') .
'<i class="icon-envelope"></i> ' .
JText::plural('MOD_STATUS_MESSAGES', $unread) .
($hideLinks ? '' : '</a>') .
'<div class="btn-group divider"></div>' .
'</div>';
endif;
// Print the logout link.
if ($task == 'edit' || $task == 'editA' || $input->getInt('hidemainmenu'))
{
$logoutLink = '';
} else {
$logoutLink = JRoute::_('index.php?option=com_login&task=logout&' . JSession::getFormToken() . '=1');
}
if ($params->get('show_logout', 1)) :
$output[] = '<div class="btn-group logout">' . ($hideLinks ? '' : '<a href="' . $logoutLink.'"><i class="icon-minus-2"></i> ') . JText::_('JLOGOUT') . ($hideLinks ? '' : '</a>') . '</div>';
endif;
// Output the items.
foreach ($output as $item) :
echo $item;
endforeach;

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>