Spade

Mini Shell

Directory:~$ /home/lmsyaran/www/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/www/joomla4/mod_login.tar

helper.php000064400000004047151160747650006555 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_login
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Helper for mod_login
 *
 * @since  1.6
 */
abstract class ModLoginHelper
{
	/**
	 * Get an HTML select list of the available languages.
	 *
	 * @return  string
	 */
	public static function getLanguageList()
	{
		$languages = JLanguageHelper::createLanguageList(null,
JPATH_ADMINISTRATOR, false, true);

		if (count($languages) <= 1)
		{
			return '';
		}

		usort(
			$languages,
			function ($a, $b)
			{
				return strcmp($a['value'], $b['value']);
			}
		);

		// Fix wrongly set parentheses in RTL languages
		if (JFactory::getLanguage()->isRtl())
		{
			foreach ($languages as &$language)
			{
				$language['text'] = $language['text'] .
'&#x200E;';
			}
		}

		array_unshift($languages, JHtml::_('select.option',
'', JText::_('JDEFAULTLANGUAGE')));

		return JHtml::_('select.genericlist', $languages,
'lang', 'class="advancedSelect"
tabindex="4"', 'value', 'text', null);
	}

	/**
	 * Get the redirect URI after login.
	 *
	 * @return  string
	 */
	public static function getReturnUri()
	{
		$uri    = JUri::getInstance();
		$return = 'index.php' .
$uri->toString(array('query'));

		if ($return != 'index.php?option=com_login')
		{
			return base64_encode($return);
		}
		else
		{
			return base64_encode('index.php');
		}
	}

	/**
	 * Creates a list of two factor authentication methods used in com_users
	 * on user view
	 *
	 * @return  array
	 *
	 * @deprecated  4.0  Use JAuthenticationHelper::getTwoFactorMethods()
instead.
	 */
	public static function getTwoFactorMethods()
	{
		try
		{
			JLog::add(
				sprintf('%s() is deprecated, use
JAuthenticationHelper::getTwoFactorMethods() instead.', __METHOD__),
				JLog::WARNING,
				'deprecated'
			);
		}
		catch (RuntimeException $exception)
		{
			// Informational log only
		}

		return JAuthenticationHelper::getTwoFactorMethods();
	}
}
mod_login.php000064400000001200151160747650007231 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_login
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Include the login functions only once
JLoader::register('ModLoginHelper', __DIR__ .
'/helper.php');

$langs            = ModLoginHelper::getLanguageList();
$twofactormethods = JAuthenticationHelper::getTwoFactorMethods();
$return           = ModLoginHelper::getReturnUri();

require JModuleHelper::getLayoutPath('mod_login',
$params->get('layout', 'default'));
mod_login.xml000064400000003254151160747650007255 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1"
client="administrator" method="upgrade">
	<name>mod_login</name>
	<author>Joomla! Project</author>
	<creationDate>March 2005</creationDate>
	<copyright>Copyright (C) 2005 - 2020 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_LOGIN_XML_DESCRIPTION</description>
	<files>
		<filename
module="mod_login">mod_login.php</filename>
		<folder>tmpl</folder>
		<filename>helper.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.mod_login.ini</language>
		<language
tag="en-GB">en-GB.mod_login.sys.ini</language>
	</languages>
	<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_LOGIN" />
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="usesecure"
					type="radio"
					label="MOD_LOGIN_FIELD_USESECURE_LABEL"
					description="MOD_LOGIN_FIELD_USESECURE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</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"
					label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
					description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
				 	rows="3"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
tmpl/default.php000064400000010055151160747650007672 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_login
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
JHtml::_('bootstrap.tooltip');

// Load chosen if we have language selector, ie, more than one
administrator language installed and enabled.
if ($langs)
{
	JHtml::_('formbehavior.chosen', '.advancedSelect');
}
?>
<form action="<?php echo JRoute::_('index.php', true,
$params->get('usesecure', 0)); ?>"
method="post" id="form-login"
class="form-inline">
	<fieldset class="loginform">
		<div class="control-group">
			<div class="controls">
				<div class="input-prepend input-append">
					<span class="add-on">
						<span class="icon-user hasTooltip" title="<?php
echo JText::_('JGLOBAL_USERNAME'); ?>"></span>
						<label for="mod-login-username"
class="element-invisible">
							<?php echo JText::_('JGLOBAL_USERNAME'); ?>
						</label>
					</span>
					<input name="username" tabindex="1"
id="mod-login-username" type="text"
class="input-medium" placeholder="<?php echo
JText::_('JGLOBAL_USERNAME'); ?>" size="15"
autofocus="true" />
					<a href="<?php echo JUri::root();
?>index.php?option=com_users&view=remind" class="btn
width-auto hasTooltip" title="<?php echo
JText::_('MOD_LOGIN_REMIND'); ?>">
						<span class="icon-help"></span>
					</a>
				</div>
			</div>
		</div>
		<div class="control-group">
			<div class="controls">
				<div class="input-prepend input-append">
					<span class="add-on">
						<span class="icon-lock hasTooltip" title="<?php
echo JText::_('JGLOBAL_PASSWORD'); ?>"></span>
						<label for="mod-login-password"
class="element-invisible">
							<?php echo JText::_('JGLOBAL_PASSWORD'); ?>
						</label>
					</span>
					<input name="passwd" tabindex="2"
id="mod-login-password" type="password"
class="input-medium" placeholder="<?php echo
JText::_('JGLOBAL_PASSWORD'); ?>"
size="15"/>
					<a href="<?php echo JUri::root();
?>index.php?option=com_users&view=reset" class="btn
width-auto hasTooltip" title="<?php echo
JText::_('MOD_LOGIN_RESET'); ?>">
						<span class="icon-help"></span>
					</a>
				</div>
			</div>
		</div>
		<?php if (count($twofactormethods) > 1): ?>
		<div class="control-group">
			<div class="controls">
				<div class="input-prepend input-append">
					<span class="add-on">
						<span class="icon-star hasTooltip" title="<?php
echo JText::_('JGLOBAL_SECRETKEY'); ?>"></span>
						<label for="mod-login-secretkey"
class="element-invisible">
							<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>
						</label>
					</span>
					<input name="secretkey"
autocomplete="one-time-code" tabindex="3"
id="mod-login-secretkey" type="text"
class="input-medium" placeholder="<?php echo
JText::_('JGLOBAL_SECRETKEY'); ?>"
size="15"/>
					<span class="btn width-auto hasTooltip"
title="<?php echo JText::_('JGLOBAL_SECRETKEY_HELP');
?>">
						<span class="icon-help"></span>
					</span>
				</div>
			</div>
		</div>
		<?php endif; ?>
		<?php if (!empty($langs)) : ?>
			<div class="control-group">
				<div class="controls">
					<div class="input-prepend">
						<span class="add-on">
							<span class="icon-comment hasTooltip"
title="<?php echo JHtml::_('tooltipText',
'MOD_LOGIN_LANGUAGE'); ?>"></span>
							<label for="lang"
class="element-invisible">
								<?php echo JText::_('MOD_LOGIN_LANGUAGE'); ?>
							</label>
						</span>
						<?php echo $langs; ?>
					</div>
				</div>
			</div>
		<?php endif; ?>
		<div class="control-group">
			<div class="controls">
				<div class="btn-group">
					<button tabindex="5" class="btn btn-primary
btn-block btn-large login-button">
						<span class="icon-lock icon-white"></span>
<?php echo JText::_('MOD_LOGIN_LOGIN'); ?>
					</button>
				</div>
			</div>
		</div>
		<input type="hidden" name="option"
value="com_login"/>
		<input type="hidden" name="task"
value="login"/>
		<input type="hidden" name="return"
value="<?php echo $return; ?>"/>
		<?php echo JHtml::_('form.token'); ?>
	</fieldset>
</form>
default.php000064400000004010151163610660006701 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  Template.hathor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
?>
<form action="<?php echo JRoute::_('index.php', true,
$params->get('usesecure')); ?>"
method="post" id="form-login">
	<fieldset class="loginform">

		<label id="mod-login-username-lbl"
for="mod-login-username"><?php echo
JText::_('JGLOBAL_USERNAME'); ?></label>
		<input name="username" id="mod-login-username"
type="text" size="15" autofocus="true" />

		<label id="mod-login-password-lbl"
for="mod-login-password"><?php echo
JText::_('JGLOBAL_PASSWORD'); ?></label>
		<input name="passwd" id="mod-login-password"
type="password" size="15" />
		<?php if (count($twofactormethods) > 1): ?>
			<div class="control-group">
				<div class="controls">
					<label for="mod-login-secretkey">
						<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>
					</label>
					<input name="secretkey"
autocomplete="one-time-code" tabindex="3"
id="mod-login-secretkey" type="text"
class="input-medium" size="15"/>
				</div>
			</div>
		<?php endif; ?>
		<?php if (!empty ($langs)) : ?>
			<label id="mod-login-language-lbl"
for="lang"><?php echo
JText::_('MOD_LOGIN_LANGUAGE'); ?></label>
			<?php echo $langs; ?>
		<?php endif; ?>

		<div class="clr"></div>

		<div class="button-holder">
			<div class="button1">
				<div class="next">
					<a href="#"
onclick="document.getElementById('form-login').submit();">
						<?php echo JText::_('MOD_LOGIN_LOGIN'); ?></a>
				</div>
			</div>
		</div>

		<div class="clr"></div>
		<input type="submit" class="hidebtn"
value="<?php echo JText::_('MOD_LOGIN_LOGIN');
?>" />
		<input type="hidden" name="option"
value="com_login" />
		<input type="hidden" name="task"
value="login" />
		<input type="hidden" name="return"
value="<?php echo $return; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</fieldset>
</form>
default_logout.php000064400000002637151163610660010307 0ustar00<?php
/**
 * @package     Joomla.Site
 * @subpackage  Templates.beez3
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
?>
<form action="<?php echo JRoute::_('index.php', true,
$params->get('usesecure')); ?>"
method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
	<div class="login-greeting">
	<?php if ($params->get('name') == 0) : ?>
		<?php echo JText::sprintf('MOD_LOGIN_HINAME',
htmlspecialchars($user->get('name'), ENT_COMPAT,
'UTF-8')); ?>
	<?php else : ?>
		<?php echo JText::sprintf('MOD_LOGIN_HINAME',
htmlspecialchars($user->get('username'), ENT_COMPAT,
'UTF-8')); ?>
	<?php endif; ?>
	</div>
<?php endif; ?>
<?php if ($params->get('profilelink')) : ?>
	<div class="login-profilelink">
		<a href="<?php echo
JRoute::_('index.php?option=com_users&view=profile');
?>">
		<?php echo JText::_('MOD_LOGIN_PROFILE'); ?></a>
	</div>
<?php endif; ?>
<div class="logout-button">
	<input type="submit" name="Submit"
class="button" value="<?php echo
JText::_('JLOGOUT'); ?>" />
	<input type="hidden" name="option"
value="com_users" />
	<input type="hidden" name="task"
value="user.logout" />
	<input type="hidden" name="return"
value="<?php echo $return; ?>" />
	<?php echo JHtml::_('form.token'); ?>
</div>
</form>