// Email address is not valid
$SAVE = false;
} else {
- // Do we want to add a new sponsor or update his data?
+ // Add a new sponsor or update his data?
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE email='%s' LIMIT 1",
- array($postData['email']), __FUNCTION__, __LINE__);
+ array($postData['email']), __FUNCTION__, __LINE__);
// Is a sponsor alread in the db?
if (SQL_NUMROWS($result) == 1) {
// Search for an email address in the database
function isSponsorRegisteredWithEmail ($email) {
- // Do we already have the provided email address in our DB?
+ // Is there already the provided email address in database?
$ret = (countSumTotalData($email, 'sponsor_data', 'id', 'email', true) == 1);
// Return result
// Sponsor-related data, so is there a sponsor_id?
if (!empty($data['matches'][4][$data['key']])) {
- // Do we have a sponsor_id or $sponsor_id?
+ // Is there a sponsor_id or $sponsor_id?
if ($data['matches'][4][$data['key']] == '$userid') {
// Use dynamic call
$functionName = "getFetchedSponsorData('id', \$userid, '" . $data['callback'] . "')";
$functionName = "getSponsorData('" . $data['callback'] . "')";
}
- // Do we have another function to run (e.g. translations)
+ // Is there another function to run (e.g. translations)
if (!empty($data['extra_func'])) {
// Surround the original function call with it
$functionName = $data['extra_func'] . '(' . $functionName . ')';
$result = SQL_QUERY_ESC("SELECT *".$ADD." FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `%s`='%s' LIMIT 1",
array($column, $sponsor_id), __FUNCTION__, __LINE__);
- // Do we have a record?
+ // Is there a record?
if (SQL_NUMROWS($result) == 1) {
// Load data from cookies
$data = SQL_FETCHARRAY($result);
// Is given sponsor_id valid?
function isValidSponsorId ($sponsor_id) {
- // Do we have cache?
+ // Is there cache?
if (!isset($GLOBALS[__FUNCTION__][$sponsor_id])) {
// Check it out
$GLOBALS[__FUNCTION__][$sponsor_id] = ((!is_null($sponsor_id)) && (!empty($sponsor_id)) && ($sponsor_id > 0));
// Getter for sponsor_min_points
function getSponsorMinPoints () {
- // Do we have cache?
+ // Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Determine it
$GLOBALS[__FUNCTION__] = getConfig('sponsor_min_points');
// Getter for sponsor_ref_points
function getSponsorRefPoints () {
- // Do we have cache?
+ // Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Determine it
$GLOBALS[__FUNCTION__] = getConfig('sponsor_ref_points');