blog->settings->addNameSpace('multitheme'); 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->multitheme->put('mt_cfg',serialize($mt_cfg)); $core->blog->settings->multitheme->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->multitheme->drop('mt_cfg'); $core->blog->settings->multitheme->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 '