Per soluzione più semplice ecco il file authEA.php per la versione misterestate_102b_full
<?php
/**
* @version $Id: auth.php 4801 2006-08-28 16:10:28Z 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.
*
* 26.01.2007 modified by Darko Selesi (
www.misterestate.com) to fit the needs of the MisterEstate component
* File: authEA.php
* Version: 1.0.2 Stable
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
$basePath = dirname( __FILE__ );
require( $basePath . '/../../../../globals.php' );
# $basepath reintialization required as globals.php will kill initial when RGs Emulation `Off`
$basePath = dirname( __FILE__ );
require( $basePath . '/../../../../configuration.php' );
if (!defined( '_MOS_MAMBO_INCLUDED' )) {
if(file_exists($mosConfig_absolute_path . "/includes/joomla.php")){
$path = $basePath . '/../../../../includes/joomla.php';
require( $path );
$css = mosGetParam( $_REQUEST, 'css', 'joomla_admin' );
}
else{
$path = $basePath . '/../../../../includes/mambo.php';
require( $path );
$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
$css = mosGetParam( $_REQUEST, 'css', 'mambo_admin' );
}
}
# 1st security check: check referer host of this script
# if your server doesn´t provide -> $HTTP_REFERER
# please uncomment the following 5 lines.
# There´s a 2nd security check below.
# more $referer = parse_url($HTTP_REFERER);
# $site = parse_url($mosConfig_live_site);
# if( $referer['host'] != $site['host'] ){
# ( "<center>Sorry, no access to this source. Please log in!</center>" );
#}
$uid = mosGetParam( $_REQUEST, 'uid', 0 );
$action = mosGetParam( $_REQUEST, 'action', '');
# 2nd security check: check if there´s a valid session for this userid
$session = false;
$sql = "SELECT usertype, session_id as id FROM #__session WHERE userid='".$uid."'";
$database->setQuery($sql);
$database->loadObject($session);
#if ( $session == false ){
# ( "<center>Sorry, no access to this source. Please log in!</center>" );
# }
# else{
if(!isset($my)){
$my = new mosUser( $database );
}
$my->load($uid);
# 3rd security check: check usertype
# if($session->usertype != "Super Administrator"
# && $session->usertype != "Administrator"
# && $session->usertype != "Manager" ) {
# ( "<center>Sorry, you don´t have enough rights to access this source. !</center>" );
# }
# update session timestamp
$current_time = time();
$query = "UPDATE #__session"
. "\n SET time = '$current_time'"
. "\n WHERE session_id = '$session->id'";
$database->setQuery( $query );
$database->query();
# }
?>
Copiate questo file e lo chiamate authEA.php