2 require_once 'diogenes.common.inc.php';
3 require_once 'diogenes.toplevel.inc.php';
4 require_once 'diogenes/diogenes.logger-view.inc.php';
6 require_once 'System.php';
8 $page = new $globals->toplevel(true
);
10 $action = isset($_REQUEST['action']) ?
$_REQUEST['action'] : "";
12 $rw_str_opts = array ('menu_style', 'menu_theme', 'template_dir', 'template', 'html_editor', 'word_import', 'barrel_style_sheet');
13 $rw_bool_opts = array('debugdatabase', 'debugplugins', 'validatepages');
14 $ro_opts = array ('menu_styles', 'menu_themes', 'html_editors', 'word_imports', 'style_sheets');
18 foreach ($rw_str_opts as $opt_name)
20 if (isset($_REQUEST[$opt_name]))
21 $globals->updateOption($opt_name, $_REQUEST[$opt_name]);
23 foreach ($rw_bool_opts as $opt_name)
25 if (isset($_REQUEST[$opt_name]))
26 $globals->updateOption($opt_name, $_REQUEST[$opt_name] ?
1 : 0);
33 $all_opts = array_merge($ro_opts, $rw_str_opts, $ro_opts);
34 $all_opts = array_merge($all_opts, $rw_bool_opts);
35 foreach ($all_opts as $opt_name)
37 if (!isset($globals->$opt_name)) {
38 $page->info("warning : unknown option '$opt_name'");
40 $page->assign($opt_name, $globals->$opt_name);
44 if ($globals->menu_style == 1 || $globals->menu_style == 2) {
45 $page->assign('menu_themes', $globals->menu_themes);
46 $page->assign('menu_theme', $globals->menu_theme);
49 $page->assign('templates', $page->getTemplates());
52 $page->assign('greeting', __("Global options"));
53 $page->toolbar(__("Mode"), array( __("standard"), array(__("expert"), "options_expert.php")));
54 $page->assign('msg_display_options', __("display options"));
55 $page->assign('msg_menu_style', __("menu style"));
56 $page->assign('msg_menu_theme', __("menu theme"));
57 $page->assign('msg_site_template_dir', __("templates directory"));
58 $page->assign('msg_site_template', __("default template"));
59 $page->assign('msg_validate_pages', __("display W3C validator links for barrel pages"));
60 $page->assign('msg_system_options', __("system options"));
61 $page->assign('msg_html_editor', __("HTML editor"));
62 $page->assign('msg_word_import', __("Word document import"));
63 $page->assign('msg_debug_options', __("debugging options"));
64 $page->assign('msg_debug_database', __("debug database"));
65 $page->assign('msg_debug_plugins', __("debug plugins"));
66 $page->assign('msg_barrel_style_sheet', __("default style sheet for new barrels"));
67 $page->assign('msg_submit', __("Submit"));
69 $page->display('toplevel-options.tpl');