Rev | Line | |
---|
[10825] | 1 | <?php |
---|
| 2 | |
---|
| 3 | load_language('theme.lang', PHPWG_THEMES_PATH.'hr_os_xl/'); |
---|
| 4 | |
---|
| 5 | $options = array( |
---|
| 6 | 'home', |
---|
| 7 | 'categories', |
---|
| 8 | 'picture', |
---|
| 9 | 'other', |
---|
| 10 | ); |
---|
| 11 | |
---|
| 12 | if (isset($_POST['submit'])) |
---|
| 13 | { |
---|
| 14 | foreach ($options as $option) |
---|
| 15 | { |
---|
| 16 | $_POST['foo'][$option] = empty($_POST['foo'][$option]) ? false : true; |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | $query = ' |
---|
| 20 | UPDATE '.CONFIG_TABLE.' |
---|
[11027] | 21 | SET value = "'.pwg_db_real_escape_string(serialize($_POST['foo'])).'" |
---|
[10825] | 22 | WHERE param = "hr_os_xl" |
---|
| 23 | ;'; |
---|
| 24 | pwg_query($query); |
---|
| 25 | |
---|
| 26 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
| 27 | |
---|
| 28 | load_conf_from_db(); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | $template->set_filenames(array( |
---|
| 32 | 'theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
| 33 | |
---|
| 34 | $template->assign('foo', unserialize($conf['hr_os_xl'])); |
---|
| 35 | |
---|
| 36 | $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.