// Check submitted form data
//
// 1. Salutation / Surname / family name
- if (empty($_POST['salut']))
+ if (empty($_POST['gender']))
{
// Surname is empty
- $FORM_ERRORS[] = SPONSOR_NO_SALUT_SELECTED;
+ $FORM_ERRORS[] = SPONSOR_NO_GENDER_SELECTED;
}
if (empty($_POST['surname']))
{
}
}
// Is the password long enough?
- elseif (strlen($_POST['pass1']) < $CONFIG['pass_len'])
+ elseif (strlen($_POST['pass1']) < $_CONFIG['pass_len'])
{
// Too short!
$FORM_ERRORS[] = SPONSOR_PASSWORD_TOO_SHORT;
define('__EMAIL' , $_POST['email']);
define('__SURNAME' , $_POST['surname']);
define('__FAMILY' , $_POST['family']);
- define('__SALUT' , TRANSLATE_SEX($_POST['salut']));
+ define('__GENDER' , TRANSLATE_GENDER($_POST['gender']));
define('__TIMESTAMP', MAKE_DATETIME(time(), 0));
define('__PASSWORD' , $_POST['pass1']);
SEND_EMAIL($_POST['email'], SPONSOR_PLEASE_CONFIRM_SUBJ, $EMAIL_MSG);
// Send mail to admin
- if (GET_EXT_VERSION("admins") >= "0.4.1")
- {
- // Use new system
- SEND_ADMIN_EMAILS_PRO(ADMIN_NEW_SPONSOR, "admin_sponsor_reg", $hash);
- }
- else
- {
- // Send over old system
- $msg_admin = LOAD_EMAIL_TEMPLATE("admin_sponsor_reg", $hash);
- SEND_ADMIN_EMAILS (ADMIN_NEW_SPONSOR, $msg_admin);
- }
+ SEND_ADMIN_NOTIFICATION(ADMIN_NEW_SPONSOR, "admin_sponsor_reg", $hash);
// Output message: DONE
$MSG = $MSGs['added'];
define('__EMAIL' , COMPILE_CODE($_POST['email']));
define('__URL' , COMPILE_CODE($_POST['url']));
- // Check for salutation selection
- switch ($_POST['salut'])
+ // Check for gender selection
+ switch ($_POST['gender'])
{
case "M": // Male
- define('__SALUT_M' , " selected");
- define('__SALUT_F' , "");
- define('__SALUT_C' , "");
+ define('__GENDER_M' , " selected");
+ define('__GENDER_F' , "");
+ define('__GENDER_C' , "");
break;
case "F": // Female
- define('__SALUT_M' , "");
- define('__SALUT_F' , " selected");
- define('__SALUT_C' , "");
+ define('__GENDER_M' , "");
+ define('__GENDER_F' , " selected");
+ define('__GENDER_C' , "");
break;
case "C": // Company
- define('__SALUT_M' , "");
- define('__SALUT_F' , "");
- define('__SALUT_C' , " selected");
+ define('__GENDER_M' , "");
+ define('__GENDER_F' , "");
+ define('__GENDER_C' , " selected");
break;
}
define('__COMPANY' , "");
define('__POSITION' , "");
define('__TAX_IDENT', "");
- define('__SALUT_M' , "");
- define('__SALUT_F' , "");
- define('__SALUT_C' , "");
+ define('__GENDER_M' , "");
+ define('__GENDER_F' , "");
+ define('__GENDER_C' , "");
define('__SURNAME' , "");
define('__FAMILY' , "");
define('__STREET1' , "");