bx_import('BxTemplSearchResult'); $logged['admin'] = member_auth(1, true, true); bx_import('BxDolAdminSettings'); $oSettingsLanguage = new BxDolAdminSettings(21); //--- Process submit ---// $aResults = array(); //--- Change settings ---// if (isset($_POST['save']) && isset($_POST['cat'])) { $aResults['settings'] = $oSettingsLanguage->saveChanges($_POST); } //--- Create/Edit/Delete/Recompile/Export/Import Languages ---// if (isset($_POST['create_language'])) { $aResults[isset($_POST['id']) && (int) $_POST['id'] != 0 ? 'langs' : 'langs-add'] = createLanguage($_POST); } else { if (isset($_POST['import_language'])) { $aResults['langs-import'] = importLanguage($_POST, $_FILES); } else { if (isset($_POST['adm-lang-compile']) && !empty($_POST['langs'])) { foreach ($_POST['langs'] as $iLangId) { if (!compileLanguage((int) $iLangId)) { $aResults['langs'] = '_adm_txt_langs_cannot_compile'; break; } } if (empty($aResults['langs'])) { $aResults['langs'] = '_adm_txt_langs_success_compile'; } } else { if (isset($_POST['adm-lang-delete']) && !empty($_POST['langs'])) { $sNameDefault = getParam('lang_default'); foreach ($_POST['langs'] as $iLangId) {
//--- Process submit ---// $mixedResultSettings = ''; $mixedResultCreate = ''; $mixedResultAvailable = ''; $mixedResultKeys = ''; //--- Change settings ---// if (isset($_POST['save_settings'])) { setParam('lang_default', $_POST['lang_default']); $mixedResultSettings = '_adm_txt_settings_success'; } //--- Create/Edit/Delete/Recompile/Export/Import Languages ---// if (isset($_POST['create_language'])) { $mixedResultCreate = createLanguage($_POST); } else { if (isset($_POST['import_language'])) { $mixedResultCreate = importLanguage($_POST, $_FILES); } else { if (isset($_POST['adm-lang-compile']) && !empty($_POST['langs'])) { foreach ($_POST['langs'] as $iLangId) { if (!compileLanguage((int) $iLangId)) { $mixedResultAvailable = '_adm_txt_langs_cannot_compile'; break; } } if (empty($mixedResultAvailable)) { $mixedResultAvailable = '_adm_txt_langs_success_compile'; } } else { if (isset($_POST['adm-lang-delete']) && !empty($_POST['langs'])) { $sNameDefault = getParam('lang_default'); foreach ($_POST['langs'] as $iLangId) {