1 | <?php |
---|
2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
3 | |
---|
4 | global $template; |
---|
5 | $me = get_plugin_data($plugin_id); |
---|
6 | include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php'); |
---|
7 | |
---|
8 | |
---|
9 | $template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/rh_admin.tpl') ); |
---|
10 | $rhthemes = new themes(); |
---|
11 | |
---|
12 | |
---|
13 | foreach (get_pwg_themes() as $pwg_templateID => $pwg_template) { |
---|
14 | if (isset($_POST['submit'])) { |
---|
15 | $me->rh_config[$pwg_templateID]['selected_cat'] = $_POST[$pwg_templateID.'selected_cat']; |
---|
16 | $me->rh_config[$pwg_templateID]['active_on_picture'] = (isset( $_POST[$pwg_templateID.'active_on_picture'] )) ? $_POST[$pwg_templateID.'active_on_picture'] : 'off' ; |
---|
17 | $me->rh_config[$pwg_templateID]['concat_before'] = (isset( $_POST[$pwg_templateID.'concat_before'] )) ? $_POST[$pwg_templateID.'concat_before'] : 'off' ; |
---|
18 | $me->rh_config[$pwg_templateID]['concat_after'] = (isset( $_POST[$pwg_templateID.'concat_after'] )) ? $_POST[$pwg_templateID.'concat_after'] : 'off' ; |
---|
19 | $me->rh_config[$pwg_templateID]['head_css'] = $_POST[$pwg_templateID.'head_css']; |
---|
20 | $me->rh_config[$pwg_templateID]['img_css'] = $_POST[$pwg_templateID.'img_css']; |
---|
21 | $me->rh_config[$pwg_templateID]['mode_background'] = (isset( $_POST[$pwg_templateID.'mode_background'] )) ? $_POST[$pwg_templateID.'mode_background'] : 'off' ; |
---|
22 | $me->save_config(); |
---|
23 | } |
---|
24 | |
---|
25 | $template->append('rhthemes', array( |
---|
26 | 'CURRENT_THEME_NAME'=> $pwg_template, |
---|
27 | 'CURRENT_THEME_ID' => $pwg_templateID, |
---|
28 | 'ACTIVE_ON_PICTURE' => ($me->rh_config[$pwg_templateID]['active_on_picture']=='on') ? 'checked' : '', |
---|
29 | 'MODE_BACKGROUND' => ($me->rh_config[$pwg_templateID]['mode_background']=='on') ? 'checked' : '', |
---|
30 | 'CONCAT_BEFORE' => ($me->rh_config[$pwg_templateID]['concat_before']=='on') ? 'checked' : '', |
---|
31 | 'CONCAT_AFTER' => ($me->rh_config[$pwg_templateID]['concat_after']=='on') ? 'checked' : '', |
---|
32 | 'HEAD_CSS' => $me->rh_config[$pwg_templateID]['head_css'], |
---|
33 | 'IMG_CSS' => $me->rh_config[$pwg_templateID]['img_css'], |
---|
34 | 'CATSELECTED' => $me->rh_config[$pwg_templateID]['selected_cat'] |
---|
35 | )); |
---|
36 | } |
---|
37 | |
---|
38 | display_select_cat_wrapper( |
---|
39 | 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE, |
---|
40 | array(), |
---|
41 | 'categories' |
---|
42 | ); |
---|
43 | |
---|
44 | load_language('plugin.lang', RH_PATH); |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); |
---|
49 | ?> |
---|