X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_yoomedia.php;h=e3fed6b1620c9912c690c21a8cd32b55981dfefb;hb=07ec113b187228ba74b4b08966602c4a2c161d2c;hp=bd7cb1088667e03472c06cf3ef7be24ef7abe74e;hpb=9976231a6912f167006012db6a3b757e097c46b9;p=mailer.git diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index bd7cb10886..e3fed6b162 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] ?>