- md5
- 4c70046297cccc4b78e127349318c026
- sha1
- 33ad06756b2fd93f076f5f939e90a746b04a74b1
- sha256
- 90d602a29c6d415504118e4d09d9727d5cf1a492fc450625b3ad7cf344c6dfac
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
<?php
/**
* @version $Id: mod_login.php 471 2005-10-12 17:35:51Z stingrey $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
$return = mosGetParam( $_SERVER, 'REQUEST_URI', null );
// converts & to & for xtml compliance
$return = str_replace( '&', '&', $return );
$registration_enabled = $mainframe->getCfg( 'allowUserRegistration' );
$message_login = $params->def( 'login_message', 0 );
$message_logout = $params->def( 'logout_message', 0 );
$pretext = $params->get( 'pretext' );
$posttext = $params->get( 'posttext' );
$login = $params->def( 'login', $return );
$logout = $params->def( 'logout', $return );
$name = $params->def( 'name', 1 );
$greeting = $params->def( 'greeting', 1 );
if ( $name ) {
$query = "SELECT name"
. "\n FROM #__users"
. "\n WHERE id = $my->id"
;
$database->setQuery( $query );
$name = $database->loadResult();
} else {
$name = $my->username;
}
if ( $my->id ) {
?>
<form action="<?php echo sefRelToAbs( 'index.php?option=logout' ); ?>" method="post" name="login">
<?php
if ( $greeting ) {
echo _HI;
echo $name;
}
?>
<br />
<div align="center">
<input type="submit" name="Submit" class="button" value="<?php echo _BUTTON_LOGOUT; ?>" />
</div>
<input type="hidden" name="op2" value="logout" />
<input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
<input type="hidden" name="return" value="<?php echo sefRelToAbs( $logout ); ?>" />
<input type="hidden" name="message" value="<?php echo $message_logout; ?>" />
</form>
<?php
} else {
?>
<form action="<?php echo sefRelToAbs( 'index.php' ); ?>" method="post" name="login" >
<?php
echo $pretext;
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<label for="mod_login_username">
<?php echo _USERNAME; ?>
</label>
<br />
<input name="username" id="mod_login_username" type="text" class="inputbox" alt="username" size="10" />
<br />
<label for="mod_login_password">
<?php echo _PASSWORD; ?>
</label>
<br />
<input type="password" id="mod_login_password" name="passwd" class="inputbox" size="10" alt="password" />
<br />
<input type="checkbox" name="remember" id="mod_login_remember" class="inputbox" value="yes" alt="Remember Me" />
<label for="mod_login_remember">
<?php echo _REMEMBER_ME; ?>
</label>
<br />
<input type="hidden" name="option" value="login" />
<input type="submit" name="Submit" class="button" value="<?php echo _BUTTON_LOGIN; ?>" />
</td>
</tr>
<tr>
<td>
<a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&task=lostPassword' ); ?>">
<?php echo _LOST_PASSWORD; ?></a>
</td>
</tr>
<?php
if ( $registration_enabled ) {
?>
<tr>
<td>
<?php echo _NO_ACCOUNT; ?>
<a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&task=register' ); ?>">
<?php echo _CREATE_ACCOUNT; ?></a>
</td>
</tr>
<?php
}
?>
</table>
<?php
echo $posttext;
?>
<input type="hidden" name="op2" value="login" />
<input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
<input type="hidden" name="return" value="<?php echo sefRelToAbs( $login ); ?>" />
<input type="hidden" name="message" value="<?php echo $message_login; ?>" />
</form>
<?php
}
?>
No other release has this exact content. See every version of this file.