| 93 |
$database =& mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 94 |
$database->debug(mamboCore::get('mosConfig_debug')); |
$database->debug(mamboCore::get('mosConfig_debug')); |
| 95 |
|
|
|
// |
|
|
$gettext =& phpgettext(); |
|
|
$gettext->bindtextdomain('common', $configuration->rootPath().'/language'); |
|
|
$gettext->textdomain('common'); |
|
|
//dump($gettext->textdomain(substr($option, 3))); |
|
|
//$gettext->bindtextdomain('frontend', $lang_path); |
|
|
//$gettext->textdomain('frontend'); |
|
| 96 |
|
|
| 97 |
if (!$adminside) { |
if (!$adminside) { |
| 98 |
$sefcode = $configuration->rootPath().'/components/com_sef/sef.php'; |
$sefcode = $configuration->rootPath().'/components/com_sef/sef.php'; |
| 122 |
ini_set('session.use_only_cookies', 1); |
ini_set('session.use_only_cookies', 1); |
| 123 |
|
|
| 124 |
|
|
| 125 |
|
/* initialize i18n */ |
| 126 |
|
$lang = $configuration->current_language->name; |
| 127 |
|
$charset = $configuration->current_language->charset; |
| 128 |
|
$gettext =& phpgettext(); |
| 129 |
|
$gettext->debug = $configuration->mosConfig_locale_debug; |
| 130 |
|
$gettext->has_gettext = $configuration->mosConfig_locale_use_gettext; |
| 131 |
|
$gettext->setlocale($lang); |
| 132 |
|
$gettext->bindtextdomain($lang, $configuration->rootPath().'/language'); |
| 133 |
|
$gettext->textdomain($lang); |
| 134 |
|
#$gettext =& phpgettext(); dump($gettext); |
| 135 |
|
|
| 136 |
if ($adminside) { |
if ($adminside) { |
| 137 |
// Start ACL |
// Start ACL |
| 138 |
require_once($configuration->rootPath().'/includes/gacl.class.php' ); |
require_once($configuration->rootPath().'/includes/gacl.class.php' ); |
| 142 |
$option = strtolower(mosGetParam($_REQUEST,'option','com_admin')); |
$option = strtolower(mosGetParam($_REQUEST,'option','com_admin')); |
| 143 |
|
|
| 144 |
$domain = substr($option, 4); |
$domain = substr($option, 4); |
|
$gettext->bindtextdomain('administrator', $lang_path); |
|
|
$gettext->bindtextdomain($domain, $lang_path); |
|
|
$admindomain = $gettext->textdomain(); |
|
|
$gettext->textdomain('administrator'); |
|
| 145 |
session_name(md5(mamboCore::get('mosConfig_live_site'))); |
session_name(md5(mamboCore::get('mosConfig_live_site'))); |
| 146 |
session_start(); |
session_start(); |
| 147 |
// restore some session variables |
// restore some session variables |
| 218 |
$configuration->handleGlobals(); |
$configuration->handleGlobals(); |
| 219 |
$Itemid = $configuration->get('Itemid'); |
$Itemid = $configuration->get('Itemid'); |
| 220 |
|
|
|
// load frontend language file |
|
|
$gettext->bindtextdomain(substr($option, 4), $configuration->rootPath().'/language'); |
|
|
$gettext->bindtextdomain('frontend', $configuration->rootPath().'/language'); |
|
|
$frontdomain = $gettext->textdomain(); |
|
|
$gettext->textdomain('frontend'); |
|
|
|
|
|
|
|
| 221 |
$mainframe =& new mosMainFrame($database, $option, '.'); |
$mainframe =& new mosMainFrame($database, $option, '.'); |
| 222 |
if ($option == 'login') $configuration->handleLogin(); |
if ($option == 'login') $configuration->handleLogin(); |
| 223 |
elseif ($option == 'logout') $configuration->handleLogout(); |
elseif ($option == 'logout') $configuration->handleLogout(); |
| 262 |
$ret = $menuhandler->menuCheck($Itemid, $option, $task, $gid); |
$ret = $menuhandler->menuCheck($Itemid, $option, $task, $gid); |
| 263 |
$menuhandler->setPathway($Itemid); |
$menuhandler->setPathway($Itemid); |
| 264 |
if ($ret) { |
if ($ret) { |
|
$gettext->textdomain(substr($option, 4)); // get the component lang file |
|
| 265 |
require ($path); |
require ($path); |
|
$gettext->textdomain($frontdomain); |
|
| 266 |
} |
} |
| 267 |
else mosNotAuth(); |
else mosNotAuth(); |
| 268 |
} |
} |