1 | <?php |
---|
2 | load_language('theme.lang', PHPWG_THEMES_PATH.'Slimi/'); |
---|
3 | |
---|
4 | if (isset($_POST['default'])) |
---|
5 | { |
---|
6 | $params = array( |
---|
7 | 'lytebox_slimi' => $_POST['lytebox_slimi'], |
---|
8 | 'bg_slimi' => '#FFA800', |
---|
9 | 'bd_slimi' => '#4F4F4F', |
---|
10 | 'title_slimi' => '#4F4F4F', |
---|
11 | 'carousel_speed' => '3' |
---|
12 | ); |
---|
13 | |
---|
14 | conf_update_param('Slimi', pwg_db_real_escape_string(serialize($params))); |
---|
15 | |
---|
16 | array_push($page['infos'], l10n('Your configuration settings are saved')); |
---|
17 | |
---|
18 | load_conf_from_db(); |
---|
19 | } |
---|
20 | |
---|
21 | |
---|
22 | if (isset($_POST['submit'])) |
---|
23 | { |
---|
24 | $params = array( |
---|
25 | 'lytebox_slimi' => $_POST['lytebox_slimi'], |
---|
26 | 'bg_slimi' => $_POST['bg_slimi'], |
---|
27 | 'bd_slimi' => $_POST['bd_slimi'], |
---|
28 | 'title_slimi' => $_POST['title_slimi'], |
---|
29 | 'carousel_speed' => $_POST['carousel_speed'], |
---|
30 | |
---|
31 | ); |
---|
32 | |
---|
33 | conf_update_param('Slimi', pwg_db_real_escape_string(serialize($params))); |
---|
34 | |
---|
35 | array_push($page['infos'], l10n('Your configuration settings are saved')); |
---|
36 | |
---|
37 | load_conf_from_db(); |
---|
38 | } |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | $params = array_merge(unserialize($conf['Slimi'])); |
---|
43 | |
---|
44 | $template->assign(array( |
---|
45 | 'selected_lytebox_slimi' => $params['lytebox_slimi'], |
---|
46 | 'selected_bg_slimi' => $params['bg_slimi'], |
---|
47 | 'selected_bd_slimi' => $params['bd_slimi'], |
---|
48 | 'selected_title_slimi' => $params['title_slimi'], |
---|
49 | 'selected_carousel_speed' => $params['carousel_speed'], |
---|
50 | )); |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | $template->set_filenames(array('theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
55 | $template->assign('options', unserialize($conf['Slimi'])); |
---|
56 | $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); |
---|
57 | ?> |
---|