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