");
- } // END - if
-
- if ($IP_TIMEOUT) {
- OUTPUT_HTML("".REMOTE_ADDR_TIMEOUT."
");
- } // END - if
-
- if ((!empty($cats)) && ($cats < $_CONFIG['least_cats'])) {
- OUTPUT_HTML("".CATS_LEAST.": ".$_CONFIG['least_cats']."
");
+ if ((!empty($GLOBALS['registration_selected_cats'])) && ($GLOBALS['registration_selected_cats'] < getLeastCats())) {
+ registerOutputFailedMessage('', '{--CHOOSE_MORE_CATEGORIES--}');
+ } // END - if
} // END - if
// Generate birthday selection
- switch (GET_LANGUAGE())
- {
- case "de": // German date format
- define('BIRTHDAY_SELECTION', ADD_SELECTION("day", $_POST['day']).ADD_SELECTION("month", $_POST['month']).ADD_SELECTION("year", $_POST['year']));
- break;
-
- default: // Default is the US date format... :)
- break;
- }
-
- // Adds a table for the guests with all visible categories
- define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
-
- // Adds maximum receiveable mails list... :)
- define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
-
- // Check if nickname extension is active and get state if nickname is selected or userid
- $nick = false;
- if (EXT_IS_ACTIVE("nickname")) $nick = NICKNAME_IS_ACTIVE($GLOBALS['refid']);
+ switch (getLanguage()) {
+ case 'de': // German date format
+ $content['birthday_selection'] = addSelectionBox('da', postRequestElement('day')).addSelectionBox('mo', postRequestElement('month')).addSelectionBox('ye', postRequestElement('year'));
+ break;
- // Is the nickname valid?
- if (!$nick) {
- // Nope, disable it
- if (GET_EXT_VERSION("sql_patches") != '') {
- // Use default refid
- $GLOBALS['refid'] = $_CONFIG['def_refid'];
- } else {
- // Set zero
- $GLOBALS['refid'] = 0;
- }
- } // END - if
+ default: // Default is the US date format... :)
+ $content['birthday_selection'] = addSelectionBox('mo', postRequestElement('month')).addSelectionBox('da', postRequestElement('day')).addSelectionBox('ye', postRequestElement('year'));
+ break;
+ } // END - switch
// Shall I display the refid or shall I make it editable?
- if ($_CONFIG['display_refid'] == "Y") {
- // Load template to enter it
- define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
- } else {
+ if (isDisplayRefidEnabled()) {
// Load "hide" form template
- define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid']));
+ $content['refid_content'] = loadTemplate('guest_register_refid_hide', TRUE);
+ } else {
+ // Load template to enter it
+ $content['refid_content'] = loadTemplate('guest_register_refid', TRUE);
}
- // You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)
- define('REGISTER_HEADER_CONTENT', LOAD_TEMPLATE("register_header", true));
-
- // Please select at least x categories
- define('LEAST_CATS_VALUE', $_CONFIG['least_cats']);
+ // ZIP codes are numerical values
+ $content['zip'] = '';
+ if ((isPostRequestElementSet('zip')) && (postRequestElement('zip') > 0)) {
+ $content['zip'] = bigintval(postRequestElement('zip'));
+ } // END - if
// Other values
- define('__SURNAME', SQL_ESCAPE($_POST['surname']));
- define('__FAMILY', SQL_ESCAPE($_POST['family_name']));
- define('__STREET', SQL_ESCAPE($_POST['street_nr']));
- define('__COUNTRY', SQL_ESCAPE($_POST['cntry']));
- define('__ZIP', bigintval($_POST['zip']));
- define('__CITY', SQL_ESCAPE($_POST['city']));
- define('__ADDY', SQL_ESCAPE($_POST['addy']));
-
- // Shall I add a counrty selection box or the old input box?
- if (EXT_IS_ACTIVE("country"))
- {
- // New variant, good!
- $OUT = "";
- define('__COUNTRY_CONTENT', $OUT);
- }
- else
- {
- // Old out-dated variant
- define('__COUNTRY_CONTENT', "");
- }
+ foreach (array('gender', 'surname', 'family', 'street_nr', 'city', 'email') as $entry) {
+ $content[$entry] = SQL_ESCAPE(postRequestElement($entry));
+ } // END - foreach
- // Set MUST_??? constants
- if ((EXT_IS_ACTIVE("register")) && (GET_EXT_VERSION("register") > "0.0")) REGISTER_FILL_MUST_CONSTANTS();
+ // Set must-fillout fields
+ $content = runFilterChain('register_must_fillout', $content);
// Display registration form
- LOAD_TEMPLATE("guest_register");
+ loadTemplate('guest_register', FALSE, $content);
}
-//
+// [EOF]
?>