]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/beg_functions.php
Opps, not all elements for sprintf() has been set.
[mailer.git] / inc / libs / beg_functions.php
index 149a96b5f4b940f3dd0fd05aafb983c65b990231..b93c09d0aab997ec20f3ab2e12cee6d4b51ee2d6 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -43,16 +43,16 @@ if (!defined('__SECURITY')) {
 // Add points to user or begging rallye account
 function addPointsBeg ($userid, $points) {
        // Default is not added
-       $added = false;
+       $added = FALSE;
 
        // Is begging rallye active?
        if (isBegRallyeEnabled()) {
                // Add points to rallye account
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `beg_points`=`beg_points`+%s WHERE `userid`=%s LIMIT 1",
+               sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `beg_points`=`beg_points`+%s WHERE `userid`=%s LIMIT 1",
                        array($points, $userid), __FUNCTION__, __LINE__);
 
                // We need to set $add here, two
-               $added = (!SQL_HASZEROAFFECTED());
+               $added = (!ifSqlHasZeroAffectedRows());
        } else {
                // Add points to account
                initReferralSystem();
@@ -60,7 +60,7 @@ function addPointsBeg ($userid, $points) {
        }
 
        // Subtract begged points from member account if the admin has selected one
-       if (($added === true) && (isValidUserId(getBegUserid()))) {
+       if (($added === TRUE) && (isValidId(getBegUserid()))) {
                // Subtract from this account
                $added = ($added && subtractPoints('beg_payout', getBegUserid(), $points));
        } // END - if
@@ -74,7 +74,7 @@ function addPointsBeg ($userid, $points) {
 //-----------------------------------------------------------------------------
 
 // Outputs points which a member can get
-function doTemplateOutputBegPoints ($templateName, $clear = false) {
+function doTemplateOutputBegPoints ($templateName, $clear = FALSE) {
        // Default is not the same
        $return = '{--BEG_POINTS_MIN_MAX--}';