]>
src.bluestatic.org Git - bugdar.git/blob - admin/setting.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
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)
48 $db->query("REPLACE INTO " . TABLE_PREFIX
. "setting (varname, value) VALUES ('" . $bugsys->escape($varname) . "', '" . $bugsys->escape($value) . "')");
53 $admin->redirect('setting.php');
56 // ###################################################################
58 if ($_REQUEST['do'] == 'modify')
60 $admin->page_start($lang->string('Settings'));
62 $admin->form_start('setting.php', 'update');
66 // Don't let them normal folk see what's going on ;-)
69 unset($settings['untouchables']);
73 foreach ($settings AS $group => $values)
75 foreach ($values AS $key => $options)
83 $admin->table_start();
84 $admin->table_head($options);
88 $admin->row_span('<span' . ((DEVDEBUG
) ? ' title="$bugsys->options[\'' . $key . '\']"' : '') . "><strong>" . $options[3] . "</strong></span>", 'thead');
92 $admin->row_input($options[4], 'setting[' . $key . ']', $bugsys->options
["$key"]);
96 $admin->row_textarea($options[4], 'setting[' . $key . ']', $bugsys->options["$key"]);
100 $admin->list_item($lang->string('Yes'), '1', ($bugsys->options
["$key"] ? true : false));
101 $admin->list_item($lang->string('No'), '0', ($bugsys->options["$key"] ? false : true));
102 $admin->row_list($options[4], 'setting[' . $key . ']', false);
106 eval('$optcode = "' . $options[0] . '";');
107 $admin->row_text($options[4], $optcode);
115 $admin->table_start();
116 $admin->row_submit();
123 /*=====================================================================*\
124 || ###################################################################
127 || ###################################################################
128 \*=====================================================================*/