Esempio n. 1
0
$page = rex_request('page', 'string');
$subpage = rex_request('subpage', 'string');
$func = rex_request('func', 'string');
$msg = rex_request('_msg', 'string');
$clang = rex_request('clang', 'int', $REX['START_CLANG_ID']);
$urlParams = '&subpage=' . $subpage;
if ($func) {
    $urlParams .= '&func=' . $func;
}
// msg
if ($msg != '') {
    echo rex_info($msg);
}
//output languages
rex_global_settings_language::buildLanguageNavigation($clang, $urlParams);
?>

<div class="rex-addon-output">

    <?php 
$form = new rex_global_settings_form($REX['TABLE_PREFIX'] . 'global_settings', $I18N->msg('global_settings_settings'), 'clang = ' . $clang);
$form->divId = 'global_settings-addon-editmode';
if (OOAddon::isAvailable('metainfo')) {
    $form->addRawField($form->getMetainfoExtension());
}
$form->addHiddenField('clang', (int) $clang);
$form->addParam('clang', (int) $clang);
$form->show();
?>
Esempio n. 2
0
$REX['PERM'][] = 'global_settings[]';
// add lang file
if ($REX['REDAXO']) {
    $I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/global_settings/lang/');
}
// includes
require $REX['INCLUDE_PATH'] . '/addons/global_settings/classes/class.rex_global_settings.inc.php';
require $REX['INCLUDE_PATH'] . '/addons/global_settings/classes/class.rex_global_settings_utils.inc.php';
require $REX['INCLUDE_PATH'] . '/addons/global_settings/classes/class.rex_global_settings_language.php';
require $REX['INCLUDE_PATH'] . '/addons/global_settings/classes/class.rex_global_settings_form.php';
// default settings (user settings are saved in data dir!)
$REX['ADDON']['global_settings']['settings'] = array();
// overwrite default settings with user settings
rex_global_settings_utils::includeSettingsFile();
// check the clang in our database table
rex_global_settings_language::checkLangsInDatabase();
// init global settings
if (!$REX['SETUP']) {
    rex_register_extension('ADDONS_INCLUDED', 'rex_global_settings::init');
}
if ($REX['REDAXO']) {
    // add subpages
    $REX['ADDON']['global_settings']['SUBPAGES'] = array(array('', $I18N->msg('global_settings_settings')));
    if (OOAddon::isAvailable('metainfo')) {
        require $REX['INCLUDE_PATH'] . '/addons/global_settings/classes/metainfo/global_settings_metainfo.php';
        // add global_settings to metaTables and metaPrefix
        rex_register_extension('PAGE_CHECKED', 'global_settings_metainfo::setProperty');
        // load page into navigation
        if (isset($REX['USER']) && $REX['USER']->isAdmin()) {
            $REX['ADDON']['global_settings']['SUBPAGES'][] = array('metainfo', $I18N->msg('global_settings_metainfo'));
        }