X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_surfbar.php;h=10d587c6758c94b5d73d2e1cb4782b75a846f607;hp=e49887b35109b233ed84811f72a20d584790e460;hb=6f4a70d53accbaf7776ef4ecd3a39fe1a81ee276;hpb=83f2946eedf09fd0e96bf2ed957fa754a2a57178;ds=sidebyside diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index e49887b351..10d587c675 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -40,7 +40,35 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) { // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -die("
".print_r($_CONFIG, true)."
"); +// Was the form submitted? +if (isset($_POST['ok'])) { + // Replace german decimal comma with computer decimal dot + if (isset($_POST['surfbar_static_reward'])) $_POST['surfbar_static_reward'] = str_replace(",", ".", $_POST['surfbar_static_reward']); + + // Save settings + ADMIN_SAVE_SETTINGS($_POST); +} else { + // Prepare content + $content = array( + 'surfbar_static_reward' => TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']), + 'surfbar_static_time' => $_CONFIG['surfbar_static_time'], + 'surfbar_static_lock' => $_CONFIG['surfbar_static_lock'] + ); + + // Prepare payment model for template + if ($_CONFIG['surfbar_pay_model'] == "STATIC") { + // Static model + define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , " checked=\"checked\""); + define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', ""); + } else { + // Dynamic model + define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , ""); + define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', " checked=\"checked\""); + } + + // Load template + LOAD_TEMPLATE("admin_config_surfbar", false, $content); +} // ?>