| [ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: auth.php 6024 2006-12-18 22:30:07Z friesengeist $ 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 $basePath = dirname( __FILE__ ); 18 require ( $basePath . '/../../globals.php' ); 19 20 // $basepath reintialization required as globals.php will kill initial when RGs Emulation `Off` 21 $basePath = dirname( __FILE__ ); 22 require( $basePath . '/../../configuration.php' ); 23 24 // SSL check - $http_host returns <live site url>:<port number if it is 443> 25 $http_host = explode(':', $_SERVER['HTTP_HOST'] ); 26 if( (!empty( $_SERVER['HTTPS'] ) && strtolower( $_SERVER['HTTPS'] ) != 'off' || isset( $http_host[1] ) && $http_host[1] == 443) && substr( $mosConfig_live_site, 0, 8 ) != 'https://' ) { 27 $mosConfig_live_site = 'https://'.substr( $mosConfig_live_site, 7 ); 28 } 29 30 if (!defined( '_MOS_MAMBO_INCLUDED' )) { 31 $path = $basePath . '/../../includes/joomla.php'; 32 require( $path ); 33 } 34 35 session_name( md5( $mosConfig_live_site ) ); 36 session_start(); 37 // restore some session variables 38 if (!isset( $my )) { 39 $my = new mosUser( $database ); 40 } 41 42 $my->id = intval( mosGetParam( $_SESSION, 'session_user_id', '' ) ); 43 $my->username = strval( mosGetParam( $_SESSION, 'session_username', '' ) ); 44 $my->usertype = strval( mosGetParam( $_SESSION, 'session_usertype', '' ) ); 45 $my->gid = intval( mosGetParam( $_SESSION, 'session_gid', '' ) ); 46 $session_id = strval( mosGetParam( $_SESSION, 'session_id', '' ) ); 47 $logintime = strval( mosGetParam( $_SESSION, 'session_logintime', '' ) ); 48 49 if ( $session_id != md5( $my->id.$my->username.$my->usertype.$logintime ) ) { 50 mosRedirect( 'index.php' ); 51 die; 52 } 53 ?>
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 |
|