]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Changed important SERVER_URL which now points to the right URL
[mailer.git] / inc / template-functions.php
index d15de9e25f09ac5b4ebc580789a2afd8525cef9f..597c5be9303f8e56b1b58dbb370208e7db1fc2be 100644 (file)
@@ -543,8 +543,8 @@ function getMenuCssClasses ($data) {
 }
 
 // Generate XHTML code for the CAPTCHA
-function generateCaptchaCode ($code, $type, $DATA, $userid) {
-       return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid_top.php?userid=' . $userid . '&amp;' . $type . '=' . $DATA . '&amp;mode=img&amp;code=' . $code . '%}" />';
+function generateCaptchaCode ($code, $type, $type, $userid) {
+       return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid_top.php?userid=' . $userid . '&amp;' . $type . '=' . $type . '&amp;mode=img&amp;code=' . $code . '%}" />';
 }
 
 // Compiles the given HTML/mail code
@@ -1231,7 +1231,9 @@ function handleCodeMessage () {
                $ext = 'unknown';
 
                // Is extension given?
-               if (isGetRequestParameterSet('ext')) $ext = getRequestParameter('ext');
+               if (isGetRequestParameterSet('ext')) {
+                       $ext = getRequestParameter('ext');
+               } // END - if
 
                // Convert the 'code' parameter from URL to a human-readable message
                $message = getMessageFromErrorCode(getRequestParameter('code'));
@@ -1341,7 +1343,7 @@ function linenumberCode ($code)    {
                if ($count_lines == 1) {
                        $r .= 1;
                } else {
-                       $r .= ($line == ($count_lines - 1)) ? '' :  ($line+1);
+                       $r .= ($line == ($count_lines - 1)) ? '' : ($line+1);
                }
                $r .= '</span>|';
 
@@ -1588,7 +1590,7 @@ function sendModeMails ($mod, $modes) {
        }
 
        // Load template
-       loadTemplate('admin_settings_saved', false, $content['message']);
+       displayMessage($content['message']);
 }
 
 // Generates a 'selection box' from given array
@@ -1705,6 +1707,12 @@ function translatePoolType ($type) {
        return sprintf("{--POOL_TYPE_%s--}", strtoupper($type));
 }
 
+// Displays given message in admin_settings_saved template
+function displayMessage ($message, $return = false) {
+       // Load the template
+       return loadTemplate('admin_settings_saved', $return, $message);
+}
+
 //-----------------------------------------------------------------------------
 //                      Template helper functions for EL
 //-----------------------------------------------------------------------------