X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_surfbar.php;h=3503ac0d0b122b8f2657b74d90acafd2fd784b2e;hp=6ad36f950fdfb078e02fbb9ca6a127ac99d36612;hb=fb573d4c3d981d52fd969a6d7167d8dc839be688;hpb=c3ea029c279923888cebf39020fe152c4540fbe8 diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 6ad36f950f..3503ac0d0b 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -1,7 +1,7 @@ TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']), - 'surfbar_static_costs' => TRANSLATE_COMMA($_CONFIG['surfbar_static_costs']), - // @TODO Rewrite this to tiny selection boxes - 'surfbar_static_time' => $_CONFIG['surfbar_static_time'], - // @TODO Rewrite this to tiny selection boxes - 'surfbar_restart_time' => $_CONFIG['surfbar_restart_time'], - 'surfbar_static_lock' => $_CONFIG['surfbar_static_lock'], - 'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent']), - 'surfbar_max_order' => $_CONFIG['surfbar_max_order'] + 'surfbar_static_time' => createConfigurationTimeSelections('surfbar_static_time' , 'ms' , 'left'), + 'surfbar_static_lock' => createConfigurationTimeSelections('surfbar_static_lock' , 'hm' , 'left'), + 'surfbar_restart_time' => createConfigurationTimeSelections('surfbar_restart_time' , 'ms' , 'left'), + 'surfbar_stats_reload' => createConfigurationTimeSelections('surfbar_stats_reload' , 'ms' , 'left'), + 'surfbar_purge_deleted' => createConfigurationTimeSelections('surfbar_purge_deleted' , 'WDh', 'left'), + 'surfbar_purge_migrated' => createConfigurationTimeSelections('surfbar_purge_migrated', 'WDh', 'left'), + 'surfbar_low_interval' => createConfigurationTimeSelections('surfbar_low_interval' , 'WDh', 'left'), ); - // 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\""); - } + // Even some more... + foreach (array('surfbar_payment_model_static','surfbar_payment_model_dynamic','surfbar_pause_mode_internal','surfbar_pause_mode_external','surfbar_notification_mode_instant','surfbar_notification_mode_reset') as $entry) { + $content[$entry] = ''; + } // END - foreach - // Prepare admin notify - if ($_CONFIG['surfbar_notify_admin_unlock'] == "Y") { - // Yes selected - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y' , " checked=\"checked\""); - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', ""); - } else { - // No selected - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y' , ""); - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', " checked=\"checked\""); - } + // Prepare selections + foreach (array('surfbar_payment_model','surfbar_pause_mode','surfbar_notification_mode') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_surfbar", false, $content); + loadTemplate('admin_config_surfbar', false, $content); } -// +// [EOF] ?>