]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_sponsor.php
Some fixes for surfbar extension (#123), double->single, misc cleanups/fixes
[mailer.git] / inc / modules / admin / what-unlock_sponsor.php
index 65418b104b5864f4332cc2e03673fc7747259304..4571d749fd1a026754808bd44310a98badc2db42 100644 (file)
@@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Check if admin has submitted form
-if (IS_FORM_SENT()) {
+if (isFormSent()) {
        // Does he have selected at least one sponsor?
        if (countSelection(REQUEST_POST('id')) > 0) {
                // At least one entry selected
@@ -61,7 +61,7 @@ if (IS_FORM_SENT()) {
                        $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, email, remote_addr, sponsor_created, points_amount, refid
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `status`='PENDING' AND id='%s' LIMIT 1",
-                               array($content['id']), __FILE__, __LINE__);
+                       array($content['id']), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result_main) == 1) {
                                // Load data
@@ -75,7 +75,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_sponsor_paytypes` AS sp
 ON sp.id=so.payid
 WHERE so.sponsorid='%s'
 ORDER BY sp.pay_name",
-                                       array($content['id']), __FILE__, __LINE__);
+                               array($content['id']), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) > 0) {
                                        // Payment does exist
                                        while ($content2 = SQL_FETCHARRAY($result)) {
@@ -96,7 +96,7 @@ ORDER BY sp.pay_name",
                                                        'stamp' => generateDateTime($content['pay_ordered'], '2'),
                                                        'pname' => $content['pay_name'],
                                                );
-       
+
                                                // Load email template
                                                $content['msg'] = LOAD_EMAIL_TEMPLATE("sponsor_unlock_sponsor_pay", $data, $content['id']);
                                        }
@@ -115,7 +115,7 @@ ORDER BY sp.pay_name",
                        // Unlock sponsor account
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='CONFIRMED'
 WHERE `id`='%s' AND `status`='PENDING' LIMIT 1",
-                               array($content['id']), __FILE__, __LINE__);
+                       array($content['id']), __FILE__, __LINE__);
 
                        // Update, if applyable, referal count and points
                        if (($content['refid'] > 0) && ($content['refid'] != $content['id'])) {
@@ -123,7 +123,7 @@ WHERE `id`='%s' AND `status`='PENDING' LIMIT 1",
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
 SET points_amount=points_amount+%s, ref_count=ref_count+1
 WHERE `id`='%s' LIMIT 1",
-                                       array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
+                               array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
 
                                // Whas that update fine?
                                if (SQL_AFFECTEDROWS() == 1) {
@@ -132,7 +132,7 @@ WHERE `id`='%s' LIMIT 1",
 (points_amount - points_used) AS points, receive_warnings, ref_count AS refs
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' LIMIT 1",
-                                               array(bigintval($content['refid'])), __FILE__, __LINE__);
+                                       array(bigintval($content['refid'])), __FILE__, __LINE__);
                                        $REFERRAL = SQL_FETCHARRAY($result);
 
                                        // Send warnings out?