]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/surfbar_functions.php
Introduced new image output mode #2
[mailer.git] / inc / libs / surfbar_functions.php
index f1b2cb882bc27ccf4c9bee4c62b269c3540857b1..1636cbc8fbf1e60cfa34ddba12d6500c87b39eb9 100644 (file)
@@ -441,8 +441,23 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) {
        if (true) {
                //if (($urlData['url_views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
                // Run the query
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url`='%s', `url_views_allowed`=%s, `url_views_max`=%s WHERE `url_id`=%s AND `status`='%s' LIMIT 1",
-                       array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['url_status']), __FUNCTION__, __LINE__);
+               SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_surfbar_urls`
+SET
+       `url`='%s',
+       `url_views_allowed`=%s,
+       `url_views_max`=%s
+WHERE
+       `url_id`=%s AND
+       `status`='%s'
+LIMIT 1",
+                       array(
+                               $urlData['url'],
+                               $urlData['edit']['limit'],
+                               $urlData['edit']['limit'],
+                               $urlData['id'],
+                               $urlData['url_status']
+                       ), __FUNCTION__, __LINE__);
 
                // All fine
                $status = true;
@@ -1032,7 +1047,7 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') {
        }
 
        // Hash it with md5() and salt it with the random string
-       $hashedCode = generateHash(md5($urlId . getEncryptSeperator() . getMemberId()), SURFBAR_GET_SALT());
+       $hashedCode = generateHash(md5($urlId . getEncryptSeparator() . getMemberId()), SURFBAR_GET_SALT());
 
        // Finally encrypt it PGP-like and return it
        $valHashedCode = encodeHashForCookie($hashedCode);
@@ -1092,11 +1107,11 @@ function SURFBAR_PAY_POINTS () {
        } // END - if
 
        /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.getMemberId().',reward='.SURFBAR_GET_REWARD());
-       // Init referal system here
-       initReferalSystem();
+       // Init referral system here
+       initReferralSystem();
 
        // Book it to the user and ignore return status
-       addPointsThroughReferalSystem(sprintf("surfbar:%s", getSurfbarPaymentModel()), getMemberId(), SURFBAR_GET_REWARD());
+       addPointsThroughReferralSystem(sprintf("surfbar:%s", getSurfbarPaymentModel()), getMemberId(), SURFBAR_GET_REWARD());
        /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.SURFBAR_GET_USERID().',costs='.SURFBAR_GET_COSTS() . ' - EXIT!');
 }
 
@@ -1111,7 +1126,7 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
        // Do we have a limit?
        if ($allowed > 0) {
                // Then count views_max down!
-               $add .= ', `url_views_max`=`url_views_max`-1';
+               $add .= ',`url_views_max`=`url_views_max`-1';
        } // END - if
 
        // Update URL stats