// JavaScripts don't like entities, dollar signs and timings
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
$GLOBALS['template_eval']['html'][$template] = '$ret = decodeEntities("' . compileRawCode(escapeJavaScriptQuotes($GLOBALS['template_content']['html'][$template]), FALSE, TRUE, TRUE, $compileCode) . '");';
+ } elseif (isAjaxOutputMode()) {
+ // AJAX (JSON content)
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
+ $GLOBALS['template_eval']['html'][$template] = '$ret = "' . compileRawCode(escapeJavaScriptQuotes($GLOBALS['template_content']['html'][$template]), FALSE, TRUE, TRUE, $compileCode) . '";';
} else {
// Prepare eval() command, other output doesn't like entities, maybe
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
$ret = '<!-- Template ' . $template . ' - Start //-->' . $GLOBALS['template_content']['html'][$template] . '<!-- Template ' . $template . ' - End //-->';
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
$GLOBALS['template_eval']['html'][$template] = '$ret = "' . getColorSwitchCode($template) . compileRawCode(escapeQuotes($ret), FALSE, TRUE, TRUE, $compileCode) . '";';
+ } elseif (isAjaxOutputMode()) {
+ // AJAX (JSON content)
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
+ $GLOBALS['template_eval']['html'][$template] = '$ret = "' . compileRawCode(escapeJavaScriptQuotes($GLOBALS['template_content']['html'][$template]), FALSE, TRUE, TRUE, $compileCode) . '";';
} else {
// JavaScript again
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
$GLOBALS['template_content']['email'][$template] = readFromFile($FQFN);
// Run code
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Reached!');
$GLOBALS['template_eval']['email'][$template] = '$newContent = decodeEntities("' . compileRawCode(escapeQuotes($GLOBALS['template_content']['email'][$template])) . '");';
} elseif (!empty($template)) {
// Template file not found
if ((isset($GLOBALS['template_eval']['email'][$template])) && ($GLOBALS['template_eval']['email'][$template] != '404')) {
// Eval the code
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template=' . $template . ' - BEFORE EVAL');
- ///* DEBUG: */ print('<pre>'.htmlentities($GLOBALS['template_eval']['email'][$template]).'</pre>');
+ //* DEBUG: */ print('<pre>'.htmlentities($GLOBALS['template_eval']['email'][$template]).'</pre>');
eval($GLOBALS['template_eval']['email'][$template]);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template=' . $template . ' - AFTER EVAL');
} // END - if
$hash = encodeHashForCookie(getUserData('password'));
// Does the hash match or should we change it?
- if (($hash == getSession('u_hash')) || (postRequestElement('pass1') == postRequestElement('pass2'))) {
+ if (($hash == getSession('u_hash')) || (postRequestElement('password1') == postRequestElement('password2'))) {
// Load the data
$content = getUserDataArray();