Changeset 7134 for extensions/Random_Header/admin/rh_admin.php
- Timestamp:
- Oct 9, 2010, 5:45:58 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Random_Header/admin/rh_admin.php
r3687 r7134 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 3 4 global $template; 4 5 $me = get_plugin_data($plugin_id); 5 global $template; 6 include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php'); 7 6 8 7 9 $template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/rh_admin.tpl') ); 8 $ template->assign( 'RH_VERSION' , RH_VERSION);10 $rhthemes = new themes(); 9 11 10 foreach (str_replace(" ", "_", get_pwg_themes()) as $pwg_template) { 12 13 foreach (get_pwg_themes() as $pwg_templateID => $pwg_template) { 11 14 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' ;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' ; 19 22 $me->save_config(); 20 23 } 21 24 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'] 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'] 31 35 )); 32 36 } … … 37 41 'categories' 38 42 ); 43 39 44 load_language('plugin.lang', RH_PATH); 40 45 46 47 41 48 $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); 42 49 ?>
Note: See TracChangeset
for help on using the changeset viewer.