more plugin fixups
[diogenes.git] / htdocs / toplevel / options.php
CommitLineData
6855525e
JL
1<?php
2require_once 'diogenes.common.inc.php';
3require_once 'diogenes.toplevel.inc.php';
4require_once 'diogenes/diogenes.logger-view.inc.php';
5// dependency on PEAR
6require_once 'System.php';
7
8$page = new $globals->toplevel(true);
9
10$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
11
12switch ($action) {
13case "options":
14 $globals->updateOption("menu_style", $_REQUEST['menu_style']);
15 if (isset($_REQUEST['menu_theme']))
16 $globals->updateOption("menu_theme", $_REQUEST['menu_theme']);
17 $globals->updateOption("template_dir", $_REQUEST['template_dir']);
18 $globals->updateOption("template", $_REQUEST['template']);
19 $globals->updateOption("html_editor", $_REQUEST['html_editor']);
20 $globals->updateOption("word_import", $_REQUEST['word_import']);
21 $globals->updateOption("debugdatabase", $_REQUEST['debugdatabase'] ? 1 : 0);
22 $globals->updateOption("debugplugins", $_REQUEST['debugplugins'] ? 1 : 0);
23 $globals->updateOption("validatepages", $_REQUEST['validatepages'] ? 1 : 0);
24 break;
25}
26
27
28// fill out values
29$page->assign('menu_styles', $globals->menu_styles);
30$page->assign('menu_style', $globals->menu_style);
31if ($globals->menu_style == 1 || $globals->menu_style == 2) {
32 $page->assign('menu_themes', $globals->menu_themes);
33 $page->assign('menu_theme', $globals->menu_theme);
34}
35$page->assign('template_dir', $globals->template_dir);
36$page->assign('template', $globals->template);
37$page->assign('templates', $page->getTemplates());
38
39$page->assign('validatepages', $globals->validatepages);
40
41$page->assign('html_editors', $globals->html_editors);
42$page->assign('html_editor', $globals->html_editor);
43
44$page->assign('word_imports', $globals->word_imports);
45$page->assign('word_import', $globals->word_import);
46
47$page->assign('debugdatabase', $globals->debugdatabase);
48$page->assign('debugplugins', $globals->debugplugins);
49
50// translations
51$page->assign('greeting', __("Global options"));
52$page->toolbar(__("Mode"), array( __("standard"), array(__("expert"), "options_expert.php")));
53$page->assign('msg_display_options', __("display options"));
54$page->assign('msg_menu_style', __("menu style"));
55$page->assign('msg_menu_theme', __("menu theme"));
56$page->assign('msg_site_template_dir', __("templates directory"));
57$page->assign('msg_site_template', __("default template"));
58$page->assign('msg_validate_pages', __("display W3C validator links for barrel pages"));
59$page->assign('msg_system_options', __("system options"));
60$page->assign('msg_html_editor', __("HTML editor"));
61$page->assign('msg_word_import', __("Word document import"));
62$page->assign('msg_debug_options', __("debugging options"));
63$page->assign('msg_debug_database', __("debug database"));
64$page->assign('msg_debug_plugins', __("debug plugins"));
65$page->assign('msg_submit', __("Submit"));
66
67$page->display('toplevel-options.tpl');
68
69?>