]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/beg_functions.php
Extension ext-network continued:
[mailer.git] / inc / libs / beg_functions.php
index f1f333ae439dba0c4904fcef52629b3c4dd45cbb..f2702a945bcce7e18c2bd107abdc367059a6c92a 100644 (file)
@@ -55,8 +55,8 @@ function addPointsBeg ($userid, $points) {
                $added = (!SQL_HASZEROAFFECTED());
        } else {
                // Add points to account
-               initReferalSystem();
-               $added = addPointsThroughReferalSystem('beg', $userid, $points);
+               initReferralSystem();
+               $added = addPointsThroughReferralSystem('beg', $userid, $points);
        }
 
        // Subtract begged points from member account if the admin has selected one
@@ -69,6 +69,25 @@ function addPointsBeg ($userid, $points) {
        return $added;
 }
 
+//-----------------------------------------------------------------------------
+//                            Template functions
+//-----------------------------------------------------------------------------
+
+// Outputs points which a member can get
+function doTemplateOutputBegPoints ($templateName, $clear = false) {
+       // Default is not the same
+       $return = '{--BEG_POINTS_MIN_MAX--}';
+
+       // Is min/max points the same?
+       if (getBegPoints() == getBegPointsMax()) {
+               // Is the same, output different message
+               $return = '{--BEG_POINTS_FIXED--}';
+       } // END - if
+
+       // Return message
+       return $return;
+}
+
 //-----------------------------------------------------------------------------
 //                       Wrapper functions for ext-beg
 //-----------------------------------------------------------------------------