X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=eec116f9c7cd0c52b9a87f25ef4dd13ff2a8f696;hp=473c494382dfc52f9e3d88e2e1781bc076e9099b;hb=0715fa7aa8e5e70bcf1d957fb09ae655c3896c4e;hpb=4836fdd88165b4d32f5b826a93467d2bb293e3ad
diff --git a/inc/functions.php b/inc/functions.php
index 473c494382..eec116f9c7 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -45,7 +45,9 @@ if (!defined('__SECURITY')) {
// Output HTML code directly or 'render' it. You addionally switch the new-line character off
function outputHtml ($htmlCode, $newLine = true) {
// Init output
- if (!isset($GLOBALS['output'])) $GLOBALS['output'] = '';
+ if (!isset($GLOBALS['output'])) {
+ $GLOBALS['output'] = '';
+ } // END - if
// Transfer username
$username = getMessage('USERNAME_UNKNOWN');
@@ -149,19 +151,21 @@ function sendHttpHeaders () {
// Compiles the final output
function compileFinalOutput () {
// Init counter
- $cnt = '0';
+ $cnt = 0;
// Add page header and footer
addPageHeaderFooter();
// Compile all out
- while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
+ while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) {
// Init common variables
$content = array();
$newContent = '';
// Compile it
- $eval = "\$newContent = \"".compileCode(escapeQuotes($GLOBALS['output']))."\";";
+ //* DEBUG: */ print '
'.htmlentities($GLOBALS['output']).'
';
+ $eval = '$newContent = "' . compileCode(escapeQuotes($GLOBALS['output'])) . '";';
+ //* DEBUG: */ die(''.htmlentities($eval).'
');
eval($eval);
// Was that eval okay?
@@ -169,6 +173,8 @@ function compileFinalOutput () {
// Something went wrong!
debug_report_bug('Evaluation error:' . linenumberCode($eval) . '
', false);
} // END - if
+
+ // Use it again
$GLOBALS['output'] = $newContent;
// Count round
@@ -1165,30 +1171,30 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 're
if ($type == 'yn') {
// This is a yes/no selection only!
- if ($id > 0) $prefix .= "[" . $id."]";
- $OUT .= "