************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!is_admin())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
if (isset($_POST['ok'])) {
// Replace german decimal comma with computer decimal dot
if (isset($_POST['surfbar_static_reward'])) $_POST['surfbar_static_reward'] = str_replace(",", ".", $_POST['surfbar_static_reward']);
+ if (isset($_POST['surfbar_static_costs'])) $_POST['surfbar_static_costs'] = str_replace(",", ".", $_POST['surfbar_static_costs']);
if (isset($_POST['surfbar_dynamic_percent'])) $_POST['surfbar_dynamic_percent'] = str_replace(",", ".", $_POST['surfbar_dynamic_percent']);
// Save settings
'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent']),
'surfbar_max_order' => $_CONFIG['surfbar_max_order'],
// @TODO Rewrite this to tiny selection boxes
- 'surfbar_stats_reload' => $_CONFIG['surfbar_stats_reload']
+ 'surfbar_stats_reload' => $_CONFIG['surfbar_stats_reload'],
+ // @TODO Rewrite this to tiny selection boxes
+ 'surfbar_purge_deleted' => $_CONFIG['surfbar_purge_deleted'],
+ // @TODO Rewrite this to tiny selection boxes
+ 'surfbar_purge_migrated' => $_CONFIG['surfbar_purge_migrated'],
+ 'surfbar_pause_url' => $_CONFIG['surfbar_pause_url'],
+ 'surfbar_warn_low_points' => $_CONFIG['surfbar_warn_low_points']
);
// Prepare payment model for template
define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', " checked=\"checked\"");
}
- // 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 auto-sart
if ($_CONFIG['surfbar_autostart'] == "Y") {
// Yes selected
define('__CONFIG_SURFBAR_AUTOSTART_N', " checked=\"checked\"");
}
+ // Prepare notify limits
+ if ($_CONFIG['surfbar_notify_limits'] == "Y") {
+ // Yes selected
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y' , " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', "");
+ } else {
+ // No selected
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y' , "");
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', " checked=\"checked\"");
+ }
+
+ // Prepare order migration
+ if ($_CONFIG['surfbar_migrate_order'] == "Y") {
+ // Yes selected
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y' , " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', "");
+ } else {
+ // No selected
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y' , "");
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', " checked=\"checked\"");
+ }
+
+ // Pause URL mode
+ if ($_CONFIG['surfbar_pause_mode'] == "INTERNAL") {
+ // Internal pause page
+ define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', "");
+ } else {
+ // External pause page (if not empty)
+ define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', "");
+ define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', " checked=\"checked\"");
+ }
+
// Load template
LOAD_TEMPLATE("admin_config_surfbar", false, $content);
}