]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
wernis extension is now alpha code (only listing in admin area is missing), naming...
[mailer.git] / inc / libs / rallye_functions.php
index 799c896f7aab3b3a260f92ef74017bd0a6e8424f..4496e31e2511ac83154428f0794c3afbaf4d785e 100644 (file)
@@ -42,7 +42,7 @@ function RALLYE_AUTOSTART_RALLYES($result)
 {
        // Global data array for LOAD_EMAIL_TEMPLATE()
        $DATA = array();
-       global $DATA, $CONFIG;
+       global $DATA, $_CONFIG;
 
        // Load all rallyes (usally we have only one rallye active per time!
        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -110,7 +110,7 @@ FROM "._MYSQL_PREFIX."_user_points AS p
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
 ON p.userid=d.userid
 WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%d",
- array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
+ array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
                        list($cpoints) = SQL_FETCHROW($result_ref);
                        SQL_FREERESULT($result_ref);
 
@@ -201,8 +201,8 @@ function RALLYE_ADD_PRICES($rallye,$mode="email")
 //
 function RALLYE_ADD_TOPUSERS($rallye,$default=0)
 {
-       global $CONFIG;
-       $since = (time() - $CONFIG['ap_in_since']);
+       global $_CONFIG;
+       $since = (time() - $_CONFIG['ap_in_since']);
 
        // First check how many prices are set
        $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level",
@@ -234,7 +234,7 @@ WHERE u.rallye_id=%d AND r.counter > 0 ORDER BY u.refs DESC",
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
 ON p.userid=d.userid
 WHERE d.userid=%d AND d.status='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s AND d.last_online >= %s
-LIMIT 1", array(bigintval($uid), $CONFIG['ref_payout'], $since), __FILE__, __LINE__);
+LIMIT 1", array(bigintval($uid), $_CONFIG['ref_payout'], $since), __FILE__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -338,10 +338,10 @@ VALUES ('%s', '%s', '0')",
 //
 function RALLYE_EXPIRE_RALLYES($result)
 {
-       global $DATA, $CONFIG;
+       global $DATA, $_CONFIG;
 
        // Latest online time
-       $since = (time() - $CONFIG['ap_in_since']);
+       $since = (time() - $_CONFIG['ap_in_since']);
 
        // Load rallye data
        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -539,10 +539,10 @@ function RALLYE_LOAD_PRICES_ARRAY($rallye)
 //
 function RALLYE_LOAD_USERS_ARRAY($rallye)
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Fix zero points to 0.00000
-       if ($CONFIG['ref_payout'] == "0") $CONFIG['ref_payout'] = "0.00000";
+       if ($_CONFIG['ref_payout'] == "0") $_CONFIG['ref_payout'] = "0.00000";
 
        // Init multi array
        $users = array(
@@ -565,7 +565,7 @@ FROM "._MYSQL_PREFIX."_user_points AS p
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
 ON p.userid=d.userid
 WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%d",
- array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
+ array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -673,7 +673,7 @@ function RALLYE_LIST_WINNERS($rallye,$default=0)
 //
 function RALLYE_DELETE_EXPIRED_RALLYES()
 {
-       global $DATA, $CONFIG;
+       global $DATA, $_CONFIG;
        // Check for expired rallyes
        $EXPIRE = time() - ONE_DAY * 3; // The hard-coded value...
        $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time FROM "._MYSQL_PREFIX."_rallye_data WHERE end_time <= %s AND expired='Y'",
@@ -770,7 +770,7 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
 //
 function RALLYE_GET_REFCOUNT($uid, $old=0)
 {
-       global $REF_SYSTEM, $REF_DEPTHS, $CONFIG;
+       global $REF_SYSTEM, $REF_DEPTHS, $_CONFIG;
        // Check current refs
        if (GET_EXT_VERSION("cache") >= "0.1.2")
        {
@@ -807,7 +807,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
                if ($cnt > 0)
                {
                        // Count cache hits
-                       $CONFIG['cache_hits']++;
+                       $_CONFIG['cache_hits']++;
 
                        // Remove old refs
                        //* DEBUG: */ echo "+".$cnt."/".$old."+<br />";