]> git.mxchange.org Git - mailer.git/commitdiff
Rewrites for config in SQLs
authorRoland Häder <roland@mxchange.org>
Fri, 6 Nov 2009 19:24:17 +0000 (19:24 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 6 Nov 2009 19:24:17 +0000 (19:24 +0000)
inc/libs/rallye_functions.php
inc/modules/member/what-refback.php
inc/modules/member/what-transfer.php
inc/reset/reset_birthday.php
inc/reset/reset_surfbar.php

index 1630c50e22b6443d185b75264bc970c5f60a8a51..a6c26adca2cb054eaad5ed362fb55e60c8f67322 100644 (file)
@@ -244,9 +244,9 @@ WHERE
        d.`status`='CONFIRMED' AND
        p.ref_depth=1 AND
        d.max_mails > 0 AND
-       d.mails_confirmed >= %s
+       d.mails_confirmed >= {?ref_payout?}
 LIMIT 1",
-                       array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCTION__, __LINE__);
+                       array(bigintval($content['userid'])), __FUNCTION__, __LINE__);
 
                // Get points
                list($refpoints) = SQL_FETCHROW($result_ref);
index e2fd4870d96086201a4dc31e25952f39d1deecb6..ed81e5104dc57ea62d77bba82567454b7ca52551 100644 (file)
@@ -104,11 +104,15 @@ if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) {
 } // END - if
 
 // Load all referal levels
-$result = SQL_QUERY_ESC("SELECT r.level, r.percents
-FROM `{?_MYSQL_PREFIX?}_refdepths` AS r
-WHERE r.level > 0
-ORDER BY r.level ASC",
-array(getMemberId()), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("SELECT
+       r.level, r.percents
+FROM
+       `{?_MYSQL_PREFIX?}_refdepths` AS r
+WHERE
+       r.level > 0
+ORDER BY
+       r.level ASC",
+       array(getMemberId()), __FILE__, __LINE__);
 
 // Are there some entries? (Shall be!)
 if (SQL_NUMROWS($result) > 0) {
index 3cb992daf5a08b8b0efdc23994ee567e8cd47747..691733e5e76106589dbcfd071884766c8ae045b3 100644 (file)
@@ -375,8 +375,8 @@ KEY (`party_userid`)
 ) TYPE=HEAP", __FILE__, __LINE__);
 
                // Let's begin with the incoming list
-               $result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT %s",
-                       array(getMemberId(), getConfig('transfer_max')), __FILE__, __LINE__);
+               $result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT {?transfer_max?}",
+                       array(getMemberId()), __FILE__, __LINE__);
                while ($DATA = SQL_FETCHROW($result)) {
                        $DATA[] = 'IN';
                        $DATA = implode("','", $DATA);
index d8d2185b8808f60b98185fd8904d567f74eaea03..d4f8eaa8af2b5264373a523b37dfb49fbec1497c 100644 (file)
@@ -95,8 +95,11 @@ if (SQL_NUMROWS($result_birthday) > 0) {
                        } // END - for
 
                        // Insert row into database
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )",
-                               array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
+                               array(
+                                       bigintval($content['userid']),
+                                       $content['check']
+                               ), __FILE__, __LINE__);
 
                        // Load email template with confirmation link
                        $message = loadEmailTemplate('member_birthday_confirm', $content, bigintval($content['userid']));
index 7b063c9538e243fdd063622e8b069cda37dac311..920491b16ab6b96def7b31280de6429ed2c0e1c7 100644 (file)
@@ -48,7 +48,7 @@ if ((getOutputMode() != 0) || (!isResetModeEnabled())) return;
 //* DEBUG: */ outputHtml(basename(__FILE__)."<br />");
 
 // Reset surfbar counter
-updateConfiguration(array("surfbar_daily_counter", "surfbar_yester_counter"), array(0, getConfig('surfbar_daily_counter')));
+updateConfiguration(array('surfbar_daily_counter', 'surfbar_yester_counter'), array(0, getConfig('surfbar_daily_counter')));
 setConfigEntry('surfbar_yester_counter', getConfig('surfbar_daily_counter'));
 setConfigEntry('surfbar_daily_counter' , 0);