clearOutputBuffer();
} // END - if
- // Extension 'rewrite' installed?
- if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
- $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
- } // END - if
-
// Send all HTTP headers
sendHttpHeaders();
// Output code here, DO NOT REMOVE! ;-)
outputRawCode($GLOBALS['output']);
} elseif ((getConfig('OUTPUT_MODE') == 'render') && (!empty($GLOBALS['output']))) {
- // Rewrite links when rewrite extension is active
- if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
- $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
- } // END - if
-
// Send all HTTP headers
sendHttpHeaders();
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)) {
$cnt++;
} // END - while
+ // Extension 'rewrite' installed?
+ if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) {
+ $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
+ } // END - if
+
// Compress it?
if (!empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos('gzip', $_SERVER['HTTP_ACCEPT_ENCODING']) !== null)) {
// Compress it for HTTP gzip
}
// Add seperator if we have not yet reached total pages
- if ($page < $PAGES) $NAV .= ' | ';
+ if ($page < $PAGES) {
+ // Add it
+ $NAV .= '|';
+ } // END - if
} // END - for
// Define constants only once
$targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
// Begin of navigation links
- $OUT = '[ ';
+ $OUT = '[';
foreach ($targetArray as $tar) {
$OUT .= '<span class="admin_user_link"><a href="{%url=modules.php?module=admin&what=' . $tar . '&userid=' . $userid . '%}" title="{--ADMIN_LINK_';
// All other status is fine
$OUT .= strtoupper($tar);
}
- $OUT .= '--}</a></span> | ';
+ $OUT .= '--}</a></span>|';
}
// Finish navigation link
} // 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
}
// 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>';
// 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>';
);
// 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