X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_yoomedia.php;h=d7a1ea4658ee156814e75e96cd02f4d9c8175c8a;hb=834fdeec3dc894c7b6387aa5e65f969fffee1c76;hp=e93cc9bb4abcee156e5b75b8c07b445518db7054;hpb=d86f2ead64eed4ed981605b84cc0f00dc3bdaa31;p=mailer.git diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index e93cc9bb4a..d7a1ea4658 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -1,19 +1,23 @@ 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] ?>