rand(1,9), 'color_theme' => rand(1,9), 'th' => rand(1,3), 'bg' => rand(1,6), 'hd' => rand(1,6), 'thumbreflex' => rand(0,1), 'imgtheme' => rand(0,1), 'colormenu' => rand(0,1), 'lytebox' => rand(0,1), 'menuident' => rand(1,3), ); conf_update_param('PwgCarbon', pwg_db_real_escape_string(serialize($params))); array_push($page['infos'], l10n('Your configuration settings are saved')); load_conf_from_db(); } if (isset($_POST['default'])) { $params = array( 'color_bg' => '4', 'color_theme' => '4', 'th' => '1', 'bg' => '1', 'hd' => '4', 'thumbreflex' => '1', 'imgtheme' => '1', 'colormenu' => '0', 'lytebox' => '0', 'menuident' => '1', ); conf_update_param('PwgCarbon', pwg_db_real_escape_string(serialize($params))); array_push($page['infos'], l10n('Your configuration settings are saved')); load_conf_from_db(); } if (isset($_POST['thumbreflex'])) $thumbreflex=1; else $thumbreflex=0; if (isset($_POST['imgtheme'])) $imgtheme=1; else $imgtheme=0; if (isset($_POST['colormenu'])) $colormenu=1; else $colormenu=0; if (isset($_POST['lytebox'])) $lytebox=1; else $lytebox=0; if (isset($_POST['submit'])) { $params = array( 'color_bg' => $_POST['color_bg'], 'color_theme' => $_POST['color_theme'], 'th' => $_POST['th'], 'bg' => $_POST['bg'], 'hd' => $_POST['hd'], 'menuident' => $_POST['menuident'], 'thumbreflex' => $thumbreflex, 'imgtheme' => $imgtheme, 'colormenu' => $colormenu, 'lytebox' => $lytebox, ); conf_update_param('PwgCarbon', pwg_db_real_escape_string(serialize($params))); array_push($page['infos'], l10n('Your configuration settings are saved')); load_conf_from_db(); } $params = array_merge(unserialize($conf['PwgCarbon'])); $template->assign(array( 'selected_color_bg' => $params['color_bg'], 'selected_bg' => $params['bg'], 'selected_th' => $params['th'], 'selected_color_theme' => $params['color_theme'], 'selected_hd' => $params['hd'], 'selected_thumbreflex' => $params['thumbreflex'], 'selected_imgtheme' => $params['imgtheme'], 'selected_colormenu' => $params['colormenu'], 'selected_lytebox' => $params['lytebox'], 'selected_menuident' => $params['menuident'], )); $template->set_filenames( array( 'theme_admin_content' => dirname(__FILE__) . '/admin.tpl') ); $template->assign('options', unserialize($conf['PwgCarbon'])); $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); ?>