- // 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\"");
- }
-
- // Prepare auto-sart
- if ($_CONFIG['surfbar_autostart'] == "Y") {
- // Yes selected
- define('__CONFIG_SURFBAR_AUTOSTART_Y', " checked=\"checked\"");
- define('__CONFIG_SURFBAR_AUTOSTART_N', "");
- } else {
- // No selected
- define('__CONFIG_SURFBAR_AUTOSTART_Y', "");
- 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\"");
- }
+ // 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