- // Prepare payment model for template
- if (getConfig('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 (getConfig('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 (getConfig('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 notify admin about unlocked emails
- if (getConfig('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 order migration
- if (getConfig('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