]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Double question mark fixed
[mailer.git] / inc / libs / sponsor_functions.php
index fac07ce8cad9b34676fd8cfd024998f98b6b109c..b84281d7871f1098a924c8ba9108b03238e8b2f5 100644 (file)
@@ -79,7 +79,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray=array(),
                                                        if (SQL_NUMROWS($result) == 1) {
                                                                // Yes, he is!
                                                                if ((getWhat() == 'add_sponsor') || ($update)) {
-                                                                       // Already found!
+                                                                       // Already found
                                                                        $ALREADY = true;
                                                                } else {
                                                                        // Update his data
@@ -157,7 +157,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray=array(),
                                        // Generate hash code
                                        $DATA['keys'][] = 'hash';
                                        // @TODO Rewrite this to API function
-                                       $DATA['values'][] = md5(session_id().':'.$postData['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time());
+                                       $DATA['values'][] = md5(session_id() . getEncryptSeperator() . $postData['email'] . getEncryptSeperator() . detectRemoteAddr() . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . time());
                                        $DATA['keys'][] = 'remote_addr';
                                        $DATA['values'][] = detectRemoteAddr();
                                }
@@ -207,9 +207,9 @@ function handleSponsorRequest ($postData, $update=false, $messageArray=array(),
                                $result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
                        } // END - if
                } else {
-                       // Error found!
+                       // Error detected
                        $message = getMessageFromIndexedArray('{--SPONSOR_DATA_NOT_SAVED--}', 'failed', $messageArray);
-                       loadTemplate('admin_settings_saved', false, $message);
+                       displayMessage($message);
                }
 
        // Always return the status
@@ -226,7 +226,7 @@ function sponsorTranslateUserStatus ($status) {
                // Then use it
                $ret = getMessage($constantName);
        } else {
-               // Not found!
+               // Not found
                //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
                $ret = getMaskedMessage('ACCOUNT_STATUS_UNKNOWN', $status);
@@ -311,7 +311,7 @@ ORDER BY
                                $OUT .= loadTemplate('sponsor_action', true, $content);
                        } else {
                                // No sub menus active
-                               $OUT .= loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_SUB_MENUS_ACTIVE--}');
+                               $OUT .= displayMessage('{--SPONSOR_NO_SUB_MENUS_ACTIVE--}', true);
                        }
 
                        // Free memory
@@ -319,7 +319,7 @@ ORDER BY
                } // END - while
        } else {
                // No main menus active
-               $OUT .= loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}');
+               $OUT .= displayMessage('{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}', true);
        }
 
        // Free memory
@@ -340,8 +340,8 @@ function addSponsorContent ($what) {
                // Every sponsor action will output nothing directly. It will be written into $GLOBALS['sponsor_output']!
                loadIncludeOnce($INC);
        } else {
-               // File not found!
-               $GLOBALS['sponsor_output'] .= loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_CONTENT_404', $what));
+               // File not found
+               $GLOBALS['sponsor_output'] .= displayMessage(getMaskedMessage('SPONSOR_CONTENT_404', $what), true);
        }
 
        // Return content
@@ -428,7 +428,7 @@ function saveSponsorData ($postData, $content) {
 
                        // Generate hash code
                        // @TODO Rewrite this to API function
-                       $HASH = md5(session_id() . ':' . $postData['email'] . ':' . detectRemoteAddr() . ':' . detectUserAgent() . ':' . time());
+                       $HASH = md5(session_id() . getEncryptSeperator() . $postData['email'] . getEncryptSeperator() . detectRemoteAddr() . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . time());
                        $DATA[] = $HASH;
                } // END - if
        } // END - if