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 | 'picture_width', |
---|
13 | 'picture_height', |
---|
14 | 'LMT-licence', |
---|
15 | 'troncate_picture_name', |
---|
16 | 'troncate_name_longer', |
---|
17 | 'StartOrEnd', |
---|
18 | 'Display_light_categories', |
---|
19 | 'footer_height' |
---|
20 | ); |
---|
21 | |
---|
22 | if (isset($_POST['submit'])) |
---|
23 | { |
---|
24 | foreach ($options as $option) |
---|
25 | { |
---|
26 | $_POST['sbre'][$option] = empty($_POST['sbre'][$option]) ? false : true; |
---|
27 | } |
---|
28 | |
---|
29 | $query = ' |
---|
30 | UPDATE '.CONFIG_TABLE.' |
---|
31 | SET value = "'.addslashes(serialize($_POST['sbre'])).'" |
---|
32 | WHERE param = "Sobre" |
---|
33 | ;'; |
---|
34 | pwg_query($query); |
---|
35 | |
---|
36 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
37 | |
---|
38 | load_conf_from_db(); |
---|
39 | } |
---|
40 | |
---|
41 | $template->set_filenames(array( |
---|
42 | 'theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
43 | |
---|
44 | $template->assign('sbre', unserialize($conf['Sobre'])); |
---|
45 | |
---|
46 | $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); |
---|
47 | |
---|
48 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.