]>
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 if ($varname == 'columnoptions')
52 $value = serialize($value);
56 $value = implode(',', $value);
60 $db->query("REPLACE INTO " . TABLE_PREFIX
. "setting (varname, value) VALUES ('" . $bugsys->escape($varname) . "', '" . $bugsys->escape($value) . "')");
65 $admin->redirect('setting.php');
68 // ###################################################################
70 if ($_REQUEST['do'] == 'modify')
72 $admin->page_start(_('Settings'));
74 $admin->form_start('setting.php', 'update');
78 // Don't let them normal folk see what's going on ;-)
81 unset($settings['untouchables']);
85 foreach ($settings AS $group => $values)
87 foreach ($values AS $key => $options)
95 $admin->table_start();
96 $admin->table_head($options);
100 $admin->row_span('<span' . ((DEVDEBUG
) ? ' title="$bugsys->options[\'' . $key . '\']"' : '') . "><strong>" . $options[3] . "</strong></span>", 'thead');
104 $admin->row_input($options[4], 'setting[' . $key . ']', $bugsys->options
["$key"]);
108 $admin->row_textarea($options[4], 'setting[' . $key . ']', $bugsys->options["$key"]);
112 $admin->list_item(_('Yes'), '1', ($bugsys->options
["$key"] ? true : false));
113 $admin->list_item(_('No'), '0', ($bugsys->options["$key"] ? false : true));
114 $admin->row_list($options[4], 'setting[' . $key . ']', false);
118 eval('$optcode = "' . $options[0] . '";');
119 $admin->row_text($options[4], $optcode);
127 $admin->table_start();
128 $admin->row_submit();
135 /*=====================================================================*\
136 || ###################################################################
139 || ###################################################################
140 \*=====================================================================*/