// Is a sponsor alread in the db?
if (SQL_NUMROWS($result) == 1) {
// Yes, he is!
- if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE)) {
+ if (($GLOBALS['what'] == 'add_sponsor') || ($NO_UPDATE)) {
// Already found!
$ALREADY = true;
} else {
}
break;
- case "pass1":
+ case 'pass1':
$k = ''; $v = '';
break;
- case "pass2":
- $k = "password"; $v = md5($v);
+ case 'pass2':
+ $k = 'password'; $v = md5($v);
break;
- case "url":
+ case 'url':
if (!isUrlValid($v)) $SAVE = false;
break;
$DATA['keys'][] = 'status';
if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
// Only allowed for admin
- $DATA['values'][] = "PENDING";
+ $DATA['values'][] = 'PENDING';
} else {
// Guest area
- $DATA['values'][] = "UNCONFIRMED";
+ $DATA['values'][] = 'UNCONFIRMED';
// Generate hash code
$DATA['keys'][] = "hash";
if (!empty($sql)) {
// Run SQL command
$result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
- }
+ } // END - if
// Output message
if ((!$NO_UPDATE) && (IS_ADMIN())) {
LOAD_TEMPLATE('admin_settings_saved', false, $message);
- }
+ } // END - if
} else {
// Error found!
- $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray);
+ $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), 'failed', $messageArray);
LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
// Shall we return the status?
- if ($RET_STATUS) return $ret;
+ if ($RET_STATUS === true) return $ret;
}
//
function sponsorTranslateUserStatus ($status) {
// Search for an email address in the database
function SPONSOR_FOUND_EMAIL_DB ($email) {
// Do we already have the provided email address in our DB?
- $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", 'email', true) == 1);
+ $ret = (GET_TOTAL_DATA($email, "sponsor_data", 'id', 'email', true) == 1);
// Return result
return $ret;