X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_yoomedia.php;h=c151303b2b90227b45c4261e427352baf9d13785;hb=d22fa6e71e81743b277da0873e2abe7fc7bb5d98;hp=338dc08369782d3756c0860af05f256f787cb08c;hpb=bf01243fde80bcd43029376788dc3ec341620c6d;p=mailer.git diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index 338dc08369..c151303b2b 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -1,7 +1,7 @@ bigintval($_CONFIG['yoomedia_id']), - 'yoomedia_sid' => bigintval($_CONFIG['yoomedia_sid']), - 'yoomedia_passwd' => $_CONFIG['yoomedia_passwd'], - 'yoomedia_tm_max_reload' => bigintval($_CONFIG['yoomedia_tm_max_reload']), - 'yoomedia_tm_min_wait' => bigintval($_CONFIG['yoomedia_tm_min_wait']), - 'yoomedia_tm_clicks_remain' => bigintval($_CONFIG['yoomedia_tm_clicks_remain']), - 'yoomedia_tm_min_pay' => bigintval($_CONFIG['yoomedia_tm_min_pay']) - ); - - // Erotic? - switch ($_CONFIG['yoomedia_erotic_allowed']) { - case 0: // No erotic at all - define('__CFG_YOOMEDIA_EROTIC_NONE' , " selected=\"selected\""); - define('__CFG_YOOMEDIA_EROTIC_INCLUDE', ""); - define('__CFG_YOOMEDIA_EROTIC_ONLY' , ""); - break; + // Erotic selection + for ($idx = '0'; $idx <= 2; $idx++) { + $content['yoomedia_erotic_allowed_' . $idx] = ''; + } // END - for - case 1: // Include erotic - define('__CFG_YOOMEDIA_EROTIC_NONE' , ""); - define('__CFG_YOOMEDIA_EROTIC_INCLUDE', " selected=\"selected\""); - define('__CFG_YOOMEDIA_EROTIC_ONLY' , ""); - break; - - case 2: // Erotic only - define('__CFG_YOOMEDIA_EROTIC_NONE' , ""); - define('__CFG_YOOMEDIA_EROTIC_INCLUDE', ""); - define('__CFG_YOOMEDIA_EROTIC_ONLY' , " selected=\"selected\""); - break; - } + // Set default selection + foreach (array('yoomedia_erotic_allowed') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_yoomedia", false, $content); + loadTemplate('admin_config_yoomedia', false, $content); } -// +// [EOF] ?>