Пример #1
0
            if ($cfg['USER_INITIAL_LANG'] == 'lang_' . $dat[1] || $usr_def_lng[1] == $dat[1]) {
                $tpl->assign(array('TR_UNINSTALL' => tr('uninstall'), 'LANG_DELETE_LINK' => ''));
                $tpl->parse('LANG_DELETE_SHOW', 'lang_delete_show');
            } else {
                $tpl->assign(array('TR_UNINSTALL' => tr('uninstall'), 'URL_DELETE' => 'delete_lang.php?delete_lang=lang_' . $dat[1], 'LANG_DELETE_SHOW' => ''));
                $tpl->parse('LANG_DELETE_LINK', 'lang_delete_link');
            }
            //'LANGUAGE' => $dat[1],
            //$res
            $tpl->assign(array('LANGUAGE' => $language_name, 'MESSAGES' => $rs->fields['cnt'] . tr(' Messages translated'), 'URL_EXPORT' => 'multilanguage_export.php?export_lang=lang_' . $dat[1]));
            $tpl->parse('LANG_ROW', '.lang_row');
        }
    }
}
/*
 *
 * static page messages.
 *
 */
update_def_lang();
gen_admin_menu($tpl);
install_lang();
show_lang($tpl, $sql);
$tpl->assign(array('TR_MULTILANGUAGE' => tr('Multilanguage'), 'TR_INSTALLED_LANGUAGES' => tr('Installed languages'), 'TR_LANGUAGE' => tr('Language'), 'TR_MESSAGES' => tr('Messages'), 'TR_DEFAULT' => tr('Default'), 'TR_ACTION' => tr('Action'), 'TR_SAVE' => tr('Save'), 'TR_INSTALL_NEW_LANGUAGE' => tr('Install new language'), 'TR_LANGUAGE_FILE' => tr('Language file'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'TR_INSTALL' => tr('Install'), 'TR_EXPORT' => tr('Export'), 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
Пример #2
0
     // failed initial tests
 }
 $params = array();
 $contents = scandir(DIR_FS_MODULES);
 // fake the install status of all modules found to 1, so all gets installed
 foreach ($contents as $entry) {
     define('MODULE_' . strtoupper($entry) . '_STATUS', '1');
 }
 require_once DIR_FS_MODULES . 'phreedom/config.php';
 // needed here to avoid breaking menu array
 foreach ($contents as $entry) {
     // load the configuration files to load version info
     if ($entry != 'phreedom' && $entry != '.' && $entry != '..' && is_dir(DIR_FS_MODULES . $entry)) {
         if (file_exists(DIR_FS_MODULES . $entry . '/config.php')) {
             install_lang($entry, $lang, 'menu');
             install_lang($entry, $lang, 'admin');
             require_once DIR_FS_MODULES . $entry . '/config.php';
         }
     }
 }
 // install core modules first
 $core_modules = array('phreedom', 'phreeform', 'phreebooks', 'contacts', 'inventory', 'shipping', 'phreehelp');
 foreach ($core_modules as $entry) {
     if (DEBUG) {
         $messageStack->debug("\n  installing core module = " . $entry);
     }
     if ($entry != '.' && $entry != '..' && is_dir(DIR_FS_MODULES . $entry)) {
         if (file_exists(DIR_FS_MODULES . $entry . '/config.php')) {
             $error = false;
             require_once DIR_FS_MODULES . $entry . '/classes/install.php';
             $classname = $entry . '_admin';