]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Referal overview finished and rewritten for refback extension
[mailer.git] / inc / mysql-manager.php
index 0d8f103b96155869e679f72c04cbc0f709cad046..923427e6aaa4adb902f248eef7816a7ff6a04a02 100644 (file)
@@ -1134,15 +1134,15 @@ function GET_REF_LEVEL_PERCENTS ($level) {
 }
 /**
  *
- * Dynamic referral system, can also send mails!
+ * Dynamic referal system, can also send mails!
  *
- * uid         = Referral ID wich should receive...
+ * uid         = Referal ID wich should receive...
  * points      = ... xxx points
- * send_notify = shall I send the referral an email or not?
+ * send_notify = shall I send the referal an email or not?
  * rid         = inc/modules/guest/what-confirm.php need this (DEPRECATED???)
  * locked      = Shall I pay it to normal (false) or locked (true) points ammount?
  * add_mode    = Add points only to $uid or also refs? (WARNING! Changing "ref" to "direct"
- *               for default value will cause no referral will get points ever!!!)
+ *               for default value will cause no referal will get points ever!!!)
  */
 function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") {
        //* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
@@ -1158,12 +1158,12 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock
                return;
        } // END - if
 
-       // Count up referral depth
+       // Count up referal depth
        if (!isset($DEPTH)) {
-               // Initialialize referral system
+               // Initialialize referal system
                $DEPTH = 0;
        } else {
-               // Increase referral level
+               // Increase referal level
                $DEPTH++;
        }
 
@@ -1229,7 +1229,7 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock
                                );
 
                                // Load email template
-                               $msg = LOAD_EMAIL_TEMPLATE("confirm-referral", $content, bigintval($uid));
+                               $msg = LOAD_EMAIL_TEMPLATE("confirm-referal", $content, bigintval($uid));
 
                                SEND_EMAIL($email, THANX_REFERRAL_ONE, $msg);
                        } elseif (($send_notify) && ($ref == 0) && (!$locked) && ($add_mode == "direct") && (!defined('__POINTS_VALUE'))) {
@@ -1267,7 +1267,7 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock
 function UPDATE_REF_COUNTER ($uid) {
        global $cacheArray, $cacheInstance;
 
-       // Make it sure referral level zero (member him-/herself) is at least selected
+       // Make it sure referal level zero (member him-/herself) is at least selected
        if (empty($cacheArray['ref_level'][$uid])) $cacheArray['ref_level'][$uid] = 1;
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$cacheArray['ref_level'][$uid]}<br />\n";
 
@@ -1284,7 +1284,7 @@ function UPDATE_REF_COUNTER ($uid) {
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid}<br />\n";
        } // END - if
 
-       // Check for his referral
+       // Check for his referal
        $result = SQL_QUERY_ESC("SELECT refid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                array(bigintval($uid)), __FILE__, __LINE__);
 
@@ -1295,9 +1295,9 @@ function UPDATE_REF_COUNTER ($uid) {
        SQL_FREERESULT($result);
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref}<br />\n";
 
-       // When he has a referral...
+       // When he has a referal...
        if (($ref > 0) && ($ref != $uid)) {
-               // Move to next referral level and count his counter one up!
+               // Move to next referal level and count his counter one up!
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />\n";
                $cacheArray['ref_level'][$uid]++; UPDATE_REF_COUNTER($ref);
        } elseif ((($ref == $uid) || ($ref == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2")) {