+addMenuDescription('admin', __FILE__);
+
+// Was the form submitted?
+if (isFormSent()) {
+ // Replace german decimal comma with computer decimal dot
+ if (isPostRequestParameterSet(('surfbar_static_reward'))) setPostRequestParameter('surfbar_static_reward' , convertCommaToDot(postRequestParameter('surfbar_static_reward')));
+ if (isPostRequestParameterSet(('surfbar_static_costs'))) setPostRequestParameter('surfbar_static_costs' , convertCommaToDot(postRequestParameter('surfbar_static_costs')));
+ if (isPostRequestParameterSet(('surfbar_dynamic_percent'))) setPostRequestParameter('surfbar_dynamic_percent', convertCommaToDot(postRequestParameter('surfbar_dynamic_percent')));
+
+ // Save settings
+ adminSaveSettingsFromPostData();
+} else {
+ // Prepare content
+ $content = array(
+ 'surfbar_static_reward' => translateComma(getConfig('surfbar_static_reward')),
+ 'surfbar_static_costs' => translateComma(getConfig('surfbar_static_costs')),
+ 'surfbar_static_time' => createTimeSelections(getConfig('surfbar_static_time') , 'surfbar_static_time' , 'ms' , 'left'),
+ 'surfbar_static_lock' => createTimeSelections(getConfig('surfbar_static_lock') , 'surfbar_static_lock' , 'hm' , 'left'),
+ 'surfbar_restart_time' => createTimeSelections(getConfig('surfbar_restart_time') , 'surfbar_restart_time' , 'ms' , 'left'),
+ 'surfbar_dynamic_percent' => translateComma(getConfig('surfbar_dynamic_percent')),
+ 'surfbar_max_order' => getConfig('surfbar_max_order'),
+ 'surfbar_stats_reload' => createTimeSelections(getConfig('surfbar_stats_reload') , 'surfbar_stats_reload' , 'ms' , 'left'),
+ 'surfbar_purge_deleted' => createTimeSelections(getConfig('surfbar_purge_deleted') , 'surfbar_purge_deleted' , 'WDh', 'left'),
+ 'surfbar_purge_migrated' => createTimeSelections(getConfig('surfbar_purge_migrated'), 'surfbar_purge_migrated', 'WDh', 'left'),
+ 'surfbar_pause_url' => getConfig('surfbar_pause_url'),
+ 'surfbar_warn_low_points' => getConfig('surfbar_warn_low_points'),
+ 'surfbar_low_interval' => createTimeSelections(getConfig('surfbar_low_interval') , 'surfbar_low_interval' , 'WDh', 'left'),
+ );
+
+ // Prepare further Y/N config entries
+ foreach (array('surfbar_autostart','surfbar_notify_limits','surfbar_notify_admin_unlock','surfbar_migrate_order','surfbar_guest_login_form') as $entry) {
+ $content[$entry . '_y'] = '';
+ $content[$entry . '_n'] = '';
+ $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
+ } // END - foreach