blog->settings->addNameSpace('arlequinMulti'); list($mt_cfg,$mt_exclude) = adminArlequin::loadSettings ($core->blog->settings,$initialized); /* Enregistrement des données depuis les formulaires --------------------------------------------------- */ if (isset($_POST['mt_action_config'])) { $mt_cfg['e_html'] = $_POST['e_html']; $mt_cfg['a_html'] = $_POST['a_html']; $mt_cfg['s_html'] = $_POST['s_html']; $mt_exclude = $_POST['mt_exclude']; } /* Traitement des requêtes --------------------------------------------------- */ if (isset($_POST['mt_action_config'])) { $core->blog->settings->arlequinMulti->put('mt_cfg',serialize($mt_cfg)); $core->blog->settings->arlequinMulti->put('mt_exclude',$mt_exclude); $messages[] = __('Settings have been successfully updated.'); $core->blog->triggerBlog(); http::redirect($p_url.'&config=1'); } if (isset($_POST['mt_action_restore'])) { $core->blog->settings->arlequinMulti->drop('mt_cfg'); $core->blog->settings->arlequinMulti->drop('mt_exclude'); $core->blog->triggerBlog(); http::redirect($p_url.'&restore=1'); } } catch (Exception $e) { $core->error->add($e->getMessage()); } /* DISPLAY --------------------------------------------------- */ if ($initialized) { $messages[] = __('Settings have been reinitialized.'); } // Headers $jsModels = ''; $cslashes = "\n\"\'"; foreach ($mt_models as $m) { $jsModels .= "\t". 'arlequin.addModel('. '"'.html::escapeJS($m['name']).'",'. '"'.addcslashes($m['s_html'],$cslashes).'",'. '"'.addcslashes($m['e_html'],$cslashes).'",'. '"'.addcslashes($m['a_html'],$cslashes).'"'. ");\n"; } echo ' '.$page_title.''. dcPage::jsLoad('index.php?pf=arlequin/js/models.js').' '. dcPage::breadcrumb( array( html::escapeHTML($core->blog->name) => '', ''.$page_title.'' => '' )); // Messages if (!empty($_GET['config'])) { dcPage::success(__('Settings have been successfully updated.')); } if (!empty($_GET['restore'])) { dcPage::success(__('Settings have been reinitialized.')); } echo '

'.__('Switcher display format').'

'. form::textArea('s_html',50,10,html::escapeHTML($mt_cfg['s_html'])).'


'.__('The names to be taken into account are those of the theme files.').'

'. (is_callable(array($core,'formNonce')) ? $core->formNonce() : '').'

'; dcPage::helpBlock('arlequin'); ?>