source: extensions/Random_Header/admin/rh_admin.php @ 3684

Last change on this file since 3684 was 3684, checked in by repie38, 15 years ago

import of the current version (2.0)

File size: 2.2 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4$me = get_plugin_data($plugin_id);
5global $template;
6
7$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/rh_admin.tpl') );
8$template->assign( 'RH_VERSION' , RH_VERSION );
9
10foreach (get_pwg_themes() as $pwg_template) {
11        if (isset($_POST['submit'])) {
12                $me->rh_config[$pwg_template]['selected_cat']           = $_POST[$pwg_template.'selected_cat'];
13                $me->rh_config[$pwg_template]['active_on_picture']      = (isset( $_POST[$pwg_template.'active_on_picture'] )) ? $_POST[$pwg_template.'active_on_picture'] : 'off' ; 
14                $me->rh_config[$pwg_template]['concat_before']          = (isset( $_POST[$pwg_template.'concat_before'] )) ? $_POST[$pwg_template.'concat_before'] : 'off' ; 
15                $me->rh_config[$pwg_template]['concat_after']           = (isset( $_POST[$pwg_template.'concat_after'] )) ? $_POST[$pwg_template.'concat_after'] : 'off' ; 
16                $me->rh_config[$pwg_template]['head_css']                       = $_POST[$pwg_template.'head_css']; 
17                $me->rh_config[$pwg_template]['img_css']                        = $_POST[$pwg_template.'img_css']; 
18                $me->rh_config[$pwg_template]['mode_background']        = (isset( $_POST[$pwg_template.'mode_background'] )) ? $_POST[$pwg_template.'mode_background'] : 'off' ;
19                $me->save_config();
20        }
21       
22        $template->append('themes', array(
23                                'CURRENT_THEME'         => $pwg_template,
24                                'ACTIVE_ON_PICTURE' => ($me->rh_config[$pwg_template]['active_on_picture']=='on') ? 'checked' : '',
25                                'MODE_BACKGROUND'       => ($me->rh_config[$pwg_template]['mode_background']=='on') ? 'checked' : '',
26                                'CONCAT_BEFORE'         => ($me->rh_config[$pwg_template]['concat_before']=='on') ? 'checked' : '',
27                                'CONCAT_AFTER'          => ($me->rh_config[$pwg_template]['concat_after']=='on') ? 'checked' : '',
28                                'HEAD_CSS'                      =>  $me->rh_config[$pwg_template]['head_css'],
29                                'IMG_CSS'                       =>  $me->rh_config[$pwg_template]['img_css'],
30                                'CATSELECTED'           =>  $me->rh_config[$pwg_template]['selected_cat']
31                                ));
32
33       
34       
35}
36display_select_cat_wrapper(
37          'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE,
38          array(),
39          'categories'
40          );
41load_language('plugin.lang', RH_PATH);
42
43$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
44?>
Note: See TracBrowser for help on using the repository browser.