1 | <?php |
---|
2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
3 | global $template, $conf, $user; |
---|
4 | include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php'); |
---|
5 | load_language('plugin.lang', AHE_PATH); |
---|
6 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
7 | |
---|
8 | // +-----------------------------------------------------------------------+ |
---|
9 | // | Check Access and exit when user status is not ok | |
---|
10 | // +-----------------------------------------------------------------------+ |
---|
11 | check_status(ACCESS_ADMINISTRATOR); |
---|
12 | |
---|
13 | //-------------------------------------------------------- sections definitions |
---|
14 | |
---|
15 | $tabsheet = new tabsheet(); |
---|
16 | $tabsheet->add('Management', l10n('Management'), ''); |
---|
17 | $tabsheet->select('Management'); |
---|
18 | $tabsheet->assign(); |
---|
19 | |
---|
20 | if (isset($conf['add_head_element_apply_on'])) |
---|
21 | { |
---|
22 | $conf['add_head_element_apply_on'] = explode(',', $conf['add_head_element_apply_on']); |
---|
23 | } |
---|
24 | else |
---|
25 | { |
---|
26 | $conf['add_head_element_apply_on'] = array('gallery', 'admin'); |
---|
27 | } |
---|
28 | |
---|
29 | $template->assign( |
---|
30 | array( |
---|
31 | 'AHEBASE' => $conf['add_head_element'], |
---|
32 | 'gallery' => in_array('gallery', $conf['add_head_element_apply_on']), |
---|
33 | 'admin' => in_array('admin', $conf['add_head_element_apply_on']), |
---|
34 | ) |
---|
35 | ); |
---|
36 | |
---|
37 | if (isset($_POST['submitahe'])) |
---|
38 | { |
---|
39 | conf_update_param('add_head_element', $_POST['ahe']); |
---|
40 | |
---|
41 | $conf['add_head_element_apply_on'] = array(); |
---|
42 | |
---|
43 | if (!empty($_POST['apply_on_gallery'])) |
---|
44 | { |
---|
45 | $conf['add_head_element_apply_on'][] = 'gallery'; |
---|
46 | } |
---|
47 | |
---|
48 | if (!empty($_POST['apply_on_admin'])) |
---|
49 | { |
---|
50 | $conf['add_head_element_apply_on'][] = 'admin'; |
---|
51 | } |
---|
52 | |
---|
53 | conf_update_param('add_head_element_apply_on', implode(',', $conf['add_head_element_apply_on'])); |
---|
54 | |
---|
55 | $template->assign( |
---|
56 | array( |
---|
57 | 'AHEBASE' => stripslashes($_POST['ahe']), |
---|
58 | 'gallery' => in_array('gallery', $conf['add_head_element_apply_on']), |
---|
59 | 'admin' => in_array('admin', $conf['add_head_element_apply_on']), |
---|
60 | ) |
---|
61 | ); |
---|
62 | } |
---|
63 | |
---|
64 | $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
65 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
66 | ?> |
---|