set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/rh_admin.tpl') ); $rhthemes = new themes(); foreach (get_pwg_themes() as $pwg_templateID => $pwg_template) { if (isset($_POST['submit'])) { $me->rh_config[$pwg_templateID]['selected_cat'] = $_POST[$pwg_templateID.'selected_cat']; $me->rh_config[$pwg_templateID]['active_on_picture'] = (isset( $_POST[$pwg_templateID.'active_on_picture'] )) ? $_POST[$pwg_templateID.'active_on_picture'] : 'off' ; $me->rh_config[$pwg_templateID]['concat_before'] = (isset( $_POST[$pwg_templateID.'concat_before'] )) ? $_POST[$pwg_templateID.'concat_before'] : 'off' ; $me->rh_config[$pwg_templateID]['concat_after'] = (isset( $_POST[$pwg_templateID.'concat_after'] )) ? $_POST[$pwg_templateID.'concat_after'] : 'off' ; $me->rh_config[$pwg_templateID]['head_css'] = $_POST[$pwg_templateID.'head_css']; $me->rh_config[$pwg_templateID]['img_css'] = $_POST[$pwg_templateID.'img_css']; $me->rh_config[$pwg_templateID]['mode_background'] = (isset( $_POST[$pwg_templateID.'mode_background'] )) ? $_POST[$pwg_templateID.'mode_background'] : 'off' ; $me->save_config(); } $template->append('rhthemes', array( 'CURRENT_THEME_NAME'=> $pwg_template, 'CURRENT_THEME_ID' => $pwg_templateID, 'ACTIVE_ON_PICTURE' => ($me->rh_config[$pwg_templateID]['active_on_picture']=='on') ? 'checked' : '', 'MODE_BACKGROUND' => ($me->rh_config[$pwg_templateID]['mode_background']=='on') ? 'checked' : '', 'CONCAT_BEFORE' => ($me->rh_config[$pwg_templateID]['concat_before']=='on') ? 'checked' : '', 'CONCAT_AFTER' => ($me->rh_config[$pwg_templateID]['concat_after']=='on') ? 'checked' : '', 'HEAD_CSS' => $me->rh_config[$pwg_templateID]['head_css'], 'IMG_CSS' => $me->rh_config[$pwg_templateID]['img_css'], 'CATSELECTED' => $me->rh_config[$pwg_templateID]['selected_cat'] )); } display_select_cat_wrapper( 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE, array(), 'categories' ); load_language('plugin.lang', RH_PATH); $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); ?>