[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: mod_login.php 7211 2007-04-29 02:26:51Z robs $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. 6 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // no direct access 15 defined( '_VALID_MOS' ) or die( 'Restricted access' ); 16 17 global $mosConfig_frontend_login; 18 19 if ( $mosConfig_frontend_login != NULL && ($mosConfig_frontend_login === 0 || $mosConfig_frontend_login === '0')) { 20 return; 21 } 22 23 // url of current page that user will be returned to after login 24 if ($query_string = mosGetParam( $_SERVER, 'QUERY_STRING', '' )) { 25 $return = 'index.php?' . $query_string; 26 } else { 27 $return = 'index.php'; 28 } 29 30 $registration_enabled = $mainframe->getCfg( 'allowUserRegistration' ); 31 $message_login = $params->def( 'login_message', 0 ); 32 $message_logout = $params->def( 'logout_message', 0 ); 33 $login = $params->def( 'login', $return ); 34 $logout = $params->def( 'logout', $return ); 35 $name = $params->def( 'name', 1 ); 36 $greeting = $params->def( 'greeting', 1 ); 37 $pretext = $params->get( 'pretext' ); 38 $posttext = $params->get( 'posttext' ); 39 40 if ( $my->id ) { 41 // Logout output 42 // ie HTML when already logged in and trying to logout 43 if ( $name ) { 44 $name = $my->name; 45 } else { 46 $name = $my->username; 47 } 48 ?> 49 <form action="<?php echo sefRelToAbs( 'index.php?option=logout' ); ?>" method="post" name="logout"> 50 <?php 51 if ( $greeting ) { 52 echo _HI; 53 echo $name; 54 } 55 ?> 56 <br /> 57 58 <div align="center"> 59 <input type="submit" name="Submit" class="button" value="<?php echo _BUTTON_LOGOUT; ?>" /> 60 </div> 61 62 <input type="hidden" name="option" value="logout" /> 63 <input type="hidden" name="op2" value="logout" /> 64 <input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" /> 65 <input type="hidden" name="return" value="<?php echo htmlspecialchars( sefRelToAbs( $logout ) ); ?>" /> 66 <input type="hidden" name="message" value="<?php echo htmlspecialchars( $message_logout ); ?>" /> 67 </form> 68 <?php 69 } else { 70 // Login output 71 // ie HTML when not logged in and trying to login 72 // used for spoof hardening 73 $validate = josSpoofValue(1); 74 ?> 75 <form action="<?php echo sefRelToAbs( 'index.php' ); ?>" method="post" name="login" > 76 <?php 77 echo $pretext; 78 ?> 79 80 <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> 81 <tr> 82 <td> 83 <label for="mod_login_username"> 84 <?php echo _USERNAME; ?> 85 </label> 86 <br /> 87 <input name="username" id="mod_login_username" type="text" class="inputbox" alt="username" size="10" /> 88 <br /> 89 <label for="mod_login_password"> 90 <?php echo _PASSWORD; ?> 91 </label> 92 <br /> 93 <input type="password" id="mod_login_password" name="passwd" class="inputbox" size="10" alt="password" /> 94 <br /> 95 <input type="checkbox" name="remember" id="mod_login_remember" class="inputbox" value="yes" alt="Remember Me" /> 96 <label for="mod_login_remember"> 97 <?php echo _REMEMBER_ME; ?> 98 </label> 99 <br /> 100 <input type="submit" name="Submit" class="button" value="<?php echo _BUTTON_LOGIN; ?>" /> 101 </td> 102 </tr> 103 <tr> 104 <td> 105 <a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&task=lostPassword' ); ?>"> 106 <?php echo _LOST_PASSWORD; ?></a> 107 </td> 108 </tr> 109 <?php 110 if ( $registration_enabled ) { 111 ?> 112 <tr> 113 <td> 114 <?php echo _NO_ACCOUNT; ?> 115 <a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&task=register' ); ?>"> 116 <?php echo _CREATE_ACCOUNT; ?></a> 117 </td> 118 </tr> 119 <?php 120 } 121 ?> 122 </table> 123 <?php 124 echo $posttext; 125 ?> 126 127 <input type="hidden" name="option" value="login" /> 128 <input type="hidden" name="op2" value="login" /> 129 <input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" /> 130 <input type="hidden" name="return" value="<?php echo htmlspecialchars( sefRelToAbs( $login ) ); ?>" /> 131 <input type="hidden" name="message" value="<?php echo htmlspecialchars( $message_login ); ?>" /> 132 <input type="hidden" name="force_session" value="1" /> 133 <input type="hidden" name="<?php echo $validate; ?>" value="1" /> 134 </form> 135 <?php 136 } 137 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |