X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Ftemplate-functions.php;h=597c5be9303f8e56b1b58dbb370208e7db1fc2be;hb=be39a7fb887473487fd2c5f8d550aa03b720cb73;hp=b2f6b1fa00a7b14a21f2971e85cd3ecfde1197b8;hpb=ef8bdde1d3b805a341e64cb29c89e562e1ca963f;p=mailer.git diff --git a/inc/template-functions.php b/inc/template-functions.php index b2f6b1fa00..597c5be930 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -331,7 +331,7 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC (' . $template . ')
- {--TEMPLATE_CONTENT--} + {--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
'; } else { @@ -490,9 +490,9 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU {--TEMPLATE_404--}: ' . $template . '
- {--TEMPLATE_CONTENT--} + {--TEMPLATE_CONTENT--}:
' . print_r($content, true) . '
- {--TEMPLATE_DATA--} + {--TEMPLATE_DATA--}:
' . print_r($DATA, true) . '
'; @@ -543,8 +543,8 @@ function getMenuCssClasses ($data) { } // Generate XHTML code for the CAPTCHA -function generateCaptchaCode ($code, $type, $DATA, $userid) { - return 'Code ' . $code . ''; +function generateCaptchaCode ($code, $type, $type, $userid) { + return 'Code ' . $code . ''; } // Compiles the given HTML/mail code @@ -841,7 +841,9 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = $M2 = getMonth(time() + $timestamp); // If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day) - if ((floor($TEST) == $TEST) && ($M1 == '02') && ($M2 > '02')) $SWITCH = getOneDay(); + if ((floor($TEST) == $TEST) && ($M1 == '02') && ($M2 > '02')) { + $SWITCH = getOneDay(); + } // END - switch // First of all years... $Y = abs(floor($timestamp / (31536000 + $SWITCH))); @@ -1229,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')); @@ -1339,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 .= '|'; @@ -1586,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 @@ -1703,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 //-----------------------------------------------------------------------------