]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/bonus_functions.php
Mailer project continued:
[mailer.git] / inc / libs / bonus_functions.php
index eb23d167477cc9bd603773e27e78be3068046294..22c6f07d4ae698ae87e8994ff88d3ed86891ab1c 100644 (file)
@@ -100,7 +100,7 @@ function addTurboBonus ($mid, $userid, $type) {
                ), __FUNCTION__, __LINE__);
 
        // Rember this whole data for displaying ranking list
-       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_bonus_turbo` (`userid`,`mail_id`,`bonus_id`,`level`,`points`,`timemark`) VALUES (%s, %s, %s, %s, %s, UNIX_TIMESTAMP())",
+       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_bonus_turbo` (`userid`, `mail_id`, `bonus_id`, `level`, `points`, `timemark`) VALUES (%s, %s, %s, %s, %s, UNIX_TIMESTAMP())",
                array(
                        bigintval($userid),
                        bigintval($mail),
@@ -126,7 +126,7 @@ function addBonusRanks ($data, $type, $userid) {
        $ranks = count(explode(';', getTurboRates())) + 1;
 
        // Load current user's data
-       $result = SQL_QUERY_ESC("SELECT `level`,`points`,`timemark` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s AND `userid`=%s LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `level`, `points`, `timemark` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s AND `userid`=%s LIMIT 1",
                array(
                        $type,
                        $data,
@@ -156,7 +156,8 @@ function addBonusRanks ($data, $type, $userid) {
                for ($rank = 1; $rank <= SQL_NUMROWS($result); $rank++) {
                        // Load data
                        $result_users = SQL_QUERY_ESC("SELECT
-       `userid`,`points`
+       `userid`,
+       `points`
 FROM
        `{?_MYSQL_PREFIX?}_bonus_turbo`
 WHERE
@@ -281,7 +282,7 @@ function purgeExpiredTurboBonus() {
 
 // Determines whether the "bonus rallye" is active
 function isBonusRallyeActive () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS['bonus_rallye_active'])) {
                // Just determine it
                $GLOBALS['bonus_rallye_active'] = (getConfig('bonus_active') == 'Y');
@@ -293,7 +294,7 @@ function isBonusRallyeActive () {
 
 // Determines whether the "bonus new_member_notify" is active
 function isBonusNewMemberNotifyEnabled () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS['bonus_new_member_notify_active'])) {
                // Just determine it
                $GLOBALS['bonus_new_member_notify_active'] = (getConfig('bonus_new_member_notify') == 'Y');
@@ -305,7 +306,7 @@ function isBonusNewMemberNotifyEnabled () {
 
 // Getter for bonus_timeout
 function getBonusTimeout () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('bonus_timeout');
@@ -317,7 +318,7 @@ function getBonusTimeout () {
 
 // Getter for bonus_mode
 function getBonusMode () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('bonus_mode');
@@ -329,7 +330,7 @@ function getBonusMode () {
 
 // Getter for bonus_ranks
 function getBonusRanks () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('bonus_ranks');
@@ -341,7 +342,7 @@ function getBonusRanks () {
 
 // Getter for turbo_rates
 function getTurboRates () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('turbo_rates');
@@ -353,7 +354,7 @@ function getTurboRates () {
 
 // Getter for login_timeout
 function getLoginTimeout () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('login_timeout');
@@ -365,7 +366,7 @@ function getLoginTimeout () {
 
 // Getter for bonus_ref
 function getBonusRef () {
-       // Do we have cache?
+       // Is there cache?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
                $GLOBALS[__FUNCTION__] = getConfig('bonus_ref');