- 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']));
- if (!empty($_POST['zip'])) {
- define('__ZIP', bigintval($_POST['zip']));
- } else {
- define('__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 = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n";
- $whereStatement = "WHERE is_active='Y'";
- if (IS_ADMIN()) $whereStatement = "";
- $OUT .= ADD_OPTION_LINES("countries", "id", "descr", $_POST['country_code'], "code", $whereStatement);
- $OUT .= "</select>";
- define('__COUNTRY_CONTENT', $OUT);
- } else {
- // Old out-dated variant
- define('__COUNTRY_CONTENT', "<INPUT type=\"text\" name=\"cntry\" class=\"guest_normal\" size=\"2\" maxlength=\"3\" value=\"".__COUNTRY."\">");
- }
-
- // Set MUST_??? constants
- if ((EXT_IS_ACTIVE("register")) && (GET_EXT_VERSION("register") > "0.0")) REGISTER_FILL_MUST_CONSTANTS();
+ $content['surname'] = SQL_ESCAPE(postRequestElement('surname'));
+ $content['family'] = SQL_ESCAPE(postRequestElement('family'));
+ $content['street_nr'] = SQL_ESCAPE(postRequestElement('street_nr'));
+ $content['zip'] = bigintval(postRequestElement('zip'));
+ $content['city'] = SQL_ESCAPE(postRequestElement('city'));
+ $content['email'] = SQL_ESCAPE(postRequestElement('email'));
+
+ // Prepare country selection box
+ $OUT = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n";
+ $whereStatement = "WHERE `is_active`='Y'";
+ if (isAdmin()) $whereStatement = '';
+ $OUT .= generateOptionList('countries', 'id', 'descr', postRequestElement('country_code'), 'code', $whereStatement);
+ $OUT .= "</select>";
+ $content['country'] = $OUT;
+
+ // Set must-fillout fields
+ $content = runFilterChain('register_must_fillout', $content);