]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
Even more variables renamed and login procedure prepared for filter
[mailer.git] / inc / libs / rallye_functions.php
index 8587a35e5801c2e033ec41d7d1286d4e677d3f72..5f83e14adb02a01323a6592f662192fd766041c9 100644 (file)
@@ -254,15 +254,15 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT
 // Run this function only when a new member has confirmed his email address!
 function RALLYE_AUTOADD_USER ($uid) {
        global $DATA;
-       $ADD = "";
+       $add = "";
 
        // Updated extension?
        if (GET_EXT_VERSION("rallye") >= "0.2.0") {
-               $ADD .= ", min_users, min_prices";
+               $add .= ", min_users, min_prices";
        } // END - if
 
        // Check for an auto-add rallye
-       $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$ADD." FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FUNCTION__, __LINE__);
+       $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$add." FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Init variables
                $min_users = 0; $min_prices = 0;
@@ -335,7 +335,7 @@ function RALLYE_EXPIRE_RALLYES ($result) {
        $DATA['now_t']  = MAKE_DATETIME(time(), "1");
 
        // Just count...
-       $TOTAL = 0;
+       $total = 0;
        foreach($prices['uid'] as $key => $uid) {
                // Check status
                //   active = 1: account is still confirmed
@@ -351,11 +351,11 @@ LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__);
 
                // Allow valid and active users with at least one ref to get points
                if (($uid > 0) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
-                       $TOTAL++;
+                       $total++;
                } // END - if
        } // END - foreach
 
-       if (($TOTAL < $min_prices) || ($TOTAL == 0)) {
+       if (($total < $min_prices) || ($total == 0)) {
                // Do not end this rallye!
                unset($DATA);
                return;
@@ -594,20 +594,20 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) {
                }
 
                // Add row
-               $ADD = "";
+               $add = "";
                $OUT .= "<tr>
-  <td class=\"switch_sw".$SW." bottom2".$ADD."\">&nbsp;&nbsp;".($idx+1).".</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom2".$ADD."\">";
+  <td class=\"switch_sw".$SW." bottom2".$add."\">&nbsp;&nbsp;".($idx+1).".</td>
+  <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
                if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>";
                $OUT .= $DATA['uid'][$idx];
                if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>";
                $OUT .= "</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom2".$ADD."\">";
+  <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
                if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>";
                $OUT .= $DATA['ref'][$idx];
                if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>";
                $OUT .= "</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom2".$ADD."\">";
+  <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
                if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>";
                $OUT .= $DATA['infos'][$idx];
                if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>";