]>
src.bluestatic.org Git - bugdar.git/blob - admin/setting.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 require_once('./global.php');
23 require_once('./includes/settings.php');
24 require_once('./includes/functions_datastore.php');
26 NavLinks
::optionsPages();
27 $navigator->set_focus('tab', 'options', null);
28 $navigator->set_focus('link', 'options-pages-settings', 'options-pages');
30 if (!can_perform('canadmintools'))
35 // ###################################################################
37 if (empty($_REQUEST['do']))
39 $_REQUEST['do'] = 'modify';
42 // ###################################################################
44 if ($_POST['do'] == 'update')
46 foreach ($bugsys->in
['setting'] AS $varname => $value)
50 $value = implode(',', $value);
53 $db->query("REPLACE INTO " . TABLE_PREFIX
. "setting (varname, value) VALUES ('" . $bugsys->escape($varname) . "', '" . $bugsys->escape($value) . "')");
58 $admin->redirect('setting.php');
61 // ###################################################################
63 if ($_REQUEST['do'] == 'modify')
65 $admin->page_start(_('Settings'));
67 $admin->form_start('setting.php', 'update');
71 // Don't let them normal folk see what's going on ;-)
74 unset($settings['untouchables']);
78 foreach ($settings AS $group => $values)
80 foreach ($values AS $key => $options)
88 $admin->table_start();
89 $admin->table_head($options);
93 $admin->row_span('<span' . ((DEVDEBUG
) ? ' title="$bugsys->options[\'' . $key . '\']"' : '') . "><strong>" . $options[3] . "</strong></span>", 'thead');
97 $admin->row_input($options[4], 'setting[' . $key . ']', $bugsys->options
["$key"]);
101 $admin->row_textarea($options[4], 'setting[' . $key . ']', $bugsys->options["$key"]);
105 $admin->list_item(_('Yes'), '1', ($bugsys->options
["$key"] ? true : false));
106 $admin->list_item(_('No'), '0', ($bugsys->options["$key"] ? false : true));
107 $admin->row_list($options[4], 'setting[' . $key . ']', false);
111 eval('$optcode = "' . $options[0] . '";');
112 $admin->row_text($options[4], $optcode);
120 $admin->table_start();
121 $admin->row_submit();
128 /*=====================================================================*\
129 || ###################################################################
132 || ###################################################################
133 \*=====================================================================*/