if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
// Check for selected sponsor
- $result = SQL_QUERY_ESC("SELECT company, position, salut, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, receive_warnings, warning_interval FROM "._MYSQL_PREFIX."_sponsor_data WHERE id='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, receive_warnings, warning_interval FROM "._MYSQL_PREFIX."_sponsor_data WHERE id='%s' LIMIT 1",
array(bigintval($_GET['id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load sponsor details
define('__POSITION' , $DATA['position']);
define('__TAX_IDENT' , $DATA['tax_ident']);
// Personal data
- switch ($DATA['salut'])
+ switch ($DATA['gender'])
{
case "M":
- define('__SALUT_M', " selected");
- define('__SALUT_F', "");
- define('__SALUT_C', "");
+ define('__GENDER_M', " selected");
+ define('__GENDER_F', "");
+ define('__GENDER_C', "");
break;
case "F":
- define('__SALUT_M', "");
- define('__SALUT_F', " selected");
- define('__SALUT_C', "");
+ define('__GENDER_M', "");
+ define('__GENDER_F', " selected");
+ define('__GENDER_C', "");
break;
case "C":
- define('__SALUT_M', "");
- define('__SALUT_F', "");
- define('__SALUT_C', " selected");
+ define('__GENDER_M', "");
+ define('__GENDER_F', "");
+ define('__GENDER_C', " selected");
break;
}
define('__SURNAME' , $DATA['surname']);
SPONSOR_HANDLE_SPONSOR($_POST);
// Convert some data for the email template
- $_POST['salut'] = TRANSLATE_SEX($_POST['salut']);
+ $_POST['gender'] = TRANSLATE_GENDER($_POST['gender']);
$_POST['warning_interval'] = CREATE_FANCY_TIME($_POST['warning_interval']);
if (!$PASS) $_POST['pass1'] = SPONSOR_PASS_UNCHANGED;
if (!empty($MSG)) {
// Output message
LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
- }
- } elseif (file_exists(PATH."templates/".GET_LANGUAGE()."/html/admin/".$TPL.".tpl")) {
+ } // END - if
+ } elseif (FILE_READABLE(sprintf("%stemplates/%s/html/admin/%s.tpl", PATH, GET_LANGUAGE(), $TPL))) {
// Create mailto link
define('__SPONSOR_VALUE', "<A href=\"mailto:".__EMAIL."\">".__SURNAME." ".__FAMILY."</A>");