| 14 |
/** ensure this file is being included by a parent file */ |
/** ensure this file is being included by a parent file */ |
| 15 |
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); |
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); |
| 16 |
|
|
|
$task = mosGetParam($_REQUEST, 'task', ''); |
|
|
|
|
| 17 |
// ensure user has access to this component |
// ensure user has access to this component |
| 18 |
if (!$acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_languages' ) ) { |
if (!$acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_languages' ) ) { |
| 19 |
mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') ); |
mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') ); |
| 20 |
} |
} |
| 21 |
|
|
| 22 |
require_once(mamboCore::get('rootPath').'/includes/phpgettext/error.php'); |
require_once(mamboCore::get('rootPath').'/includes/phpgettext/error.php'); |
| 23 |
|
require_once(mamboCore::get('rootPath').'/includes/phpgettext/phpgettext.catalog.php'); |
| 24 |
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'admin.languages.class.php'); |
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'admin.languages.class.php'); |
| 25 |
$include_path = ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.dirname(__FILE__)); |
$include_path = ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.dirname(__FILE__)); |
| 26 |
|
|
| 27 |
|
$request =& Request::getInstance('com_languages'); |
| 28 |
|
$session =& $request->session(); |
| 29 |
|
if (isset($session['mosmsg'])) { |
| 30 |
|
$request->set('mosmsg', $session['mosmsg']); |
| 31 |
|
unset($session['mosmsg']); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
$setLanguage = $session['setLanguage'] = mosGetParam($_POST, 'setLanguage', isset($session['setLanguage']) ? $session['setLanguage'] : mamboCore::get('mosConfig_lang')); |
| 35 |
|
$mamboLanguage =& mamboLanguage::getInstance($setLanguage); |
| 36 |
|
echo $mamboLanguage->getDate(); |
| 37 |
|
$languages = $mamboLanguage->getLanguages(); |
| 38 |
|
$task = mosGetParam($_REQUEST, 'task', 'index'); |
| 39 |
|
$act = mosGetParam($_REQUEST, 'act' , 'language'); |
| 40 |
|
|
| 41 |
|
$request->set('task', $task); |
| 42 |
|
$request->set('act', $act); |
| 43 |
|
$request->set('setLanguage', $setLanguage); |
| 44 |
|
$request->set('languages', $languages); |
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
$renderer =& Renderer::getInstance(); |
| 49 |
|
foreach ($request->get() as $key => $value) $renderer->addvar($key, $value); |
| 50 |
|
|
| 51 |
$controller = new Controller('com_languages'); |
$controller = new Controller('com_languages'); |
| 52 |
$controller->forward($task); |
$controller->forward($task); |
| 53 |
ini_set('include_path', $include_path); |
ini_set('include_path', $include_path); |
| 54 |
|
|
| 55 |
?> |
?> |