]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
A lot forced-space characters ( ) removed, naming convention applied also in...
[mailer.git] / inc / functions.php
index eec116f9c7cd0c52b9a87f25ef4dd13ff2a8f696..7b9e64ad5ba58d1bd2b2b5b3a265f780c042f51c 100644 (file)
@@ -157,16 +157,17 @@ function compileFinalOutput () {
        addPageHeaderFooter();
 
        // Compile all out
-       while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) {
+       while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{DQUOTE}') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) {
                // Init common variables
                $content = array();
                $newContent = '';
 
                // Compile it
                //* DEBUG: */ print '<pre>'.htmlentities($GLOBALS['output']).'</pre>';
-               $eval = '$newContent = "' . compileCode(escapeQuotes($GLOBALS['output'])) . '";';
+               $eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($GLOBALS['output']))) . '";';
                //* DEBUG: */ die('<pre>'.htmlentities($eval).'</pre>');
                eval($eval);
+               //* DEBUG: */ die('<pre>'.htmlentities($newContent).'</pre>');
 
                // Was that eval okay?
                if (empty($newContent)) {
@@ -1708,7 +1709,10 @@ function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=fals
                }
 
                // Add seperator if we have not yet reached total pages
-               if ($page < $PAGES) $NAV .= '&nbsp;|&nbsp;';
+               if ($page < $PAGES) {
+                       // Add it
+                       $NAV .= '|';
+               } // END - if
        } // END - for
 
        // Define constants only once
@@ -2081,7 +2085,7 @@ function generateMemberAdminActionLinks ($userid, $status = '') {
        $targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
 
        // Begin of navigation links
-       $OUT = '[&nbsp;';
+       $OUT = '[';
 
        foreach ($targetArray as $tar) {
                $OUT .= '<span class="admin_user_link"><a href="{%url=modules.php?module=admin&amp;what=' . $tar . '&amp;userid=' . $userid . '%}" title="{--ADMIN_LINK_';
@@ -2101,7 +2105,7 @@ function generateMemberAdminActionLinks ($userid, $status = '') {
                        // All other status is fine
                        $OUT .= strtoupper($tar);
                }
-               $OUT .= '--}</a></span>&nbsp;|&nbsp;';
+               $OUT .= '--}</a></span>|';
        }
 
        // Finish navigation link
@@ -3261,12 +3265,12 @@ function generateExtensionNotInstalledMessage ($ext_name) {
        } // END - if
 
        // Default message
-       $message = getMaskedMessage('EXTENSION_PROBLEM_EXT_NOT_INSTALLED', $ext_name);
+       $message = getMaskedMessage('EXTENSION_PROBLEM_EXTENSION_NOT_INSTALLED', $ext_name);
 
        // Is an admin logged in?
        if (isAdmin()) {
                // Then output admin message
-               $message = getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED', $ext_name);
+               $message = getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXTENSION_NOT_INSTALLED', $ext_name);
        } // END - if
 
        // Return prepared message
@@ -3749,7 +3753,7 @@ function sendModeMails ($mod, $modes) {
 }
 
 // Generates a 'selection box' from given array
-function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent='') {
+function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent = '', $extraName = '') {
        // Start the output
        $OUT = '<select name="' . $name . '" size="1" class="admin_select">
 <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option>';
@@ -3759,7 +3763,7 @@ function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionCo
                // Add the <option> entry
                if (empty($optionContent)) {
                        // ... from template
-                       $OUT .= loadTemplate('select_' . $name . '_option', true, $option);
+                       $OUT .= loadTemplate('select_' . $name . $extraName . '_option', true, $option);
                } else {
                        // Direct HTML code
                        $OUT .= '<option value="' . $option[$optionValue] . '">' . $option[$optionContent] . '</option>';
@@ -3777,7 +3781,7 @@ function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionCo
        );
 
        // Load template and return it
-       return loadTemplate('select_' . $name . '_box', true, $content);
+       return loadTemplate('select_' . $name . $extraName . '_box', true, $content);
 }
 
 // Get a module from filename and access level