// Some security stuff...
if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
while (strpos($OUTPUT, '{!') > 0) {
// Prepare the content and eval() it...
$newContent = "";
- $eval = "\$newContent = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";";
+ $eval = "\$newContent = \"".COMPILE_CODE(addslashes($OUTPUT))."\";";
@eval($eval);
if (empty($newContent)) {
// Compile and run finished rendered HTML code
while (strpos($OUTPUT, '{!') > 0) {
- $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";";
+ $eval = "\$OUTPUT = \"".COMPILE_CODE(addslashes($OUTPUT))."\";";
eval($eval);
}
while (strpos($tmpl_file, "\'") !== false) { $tmpl_file = str_replace("\'", '{QUOT}', $tmpl_file); }
// Do we have to compile the code?
+ $ret = "";
if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) {
// Okay, compile it!
- $tmpl_file = "\$ret=\"" . COMPILE_CODE(addslashes($tmpl_file)) . "\";";
+ $tmpl_file = "\$ret=\"".COMPILE_CODE(addslashes($tmpl_file))."\";";
eval($tmpl_file);
} else {
// Simply return loaded code
// Send mail out to an email address
function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") {
// Compile subject line (for POINTS constant etc.)
- $eval = "\$SUBJECT = \"" . COMPILE_CODE(addslashes($SUBJECT)) . "\";";
+ $eval = "\$SUBJECT = \"".COMPILE_CODE(addslashes($SUBJECT))."\";";
eval($eval);
$SUBJECT = html_entity_decode($SUBJECT);
OUTPUT_HTML("<A href=\"".$URL."\">".$URL."</A>");
} elseif (!headers_sent()) {
// Load URL when headers are not sent
+ /*
+ print("<pre>");
+ debug_print_backtrace();
+ die("</pre>URL={$URL}");
+ */
@header ("Location: ".str_replace("&", "&", $URL));
} else {
// Output error message
}
// Finish navigation link
- $eval = substr($eval, 0, -7) . "]\";";
+ $eval = substr($eval, 0, -7)."]\";";
eval($eval);
// Return string
}
// Return hash
- return $salt . sha1($salt . $plainText);
+ return $salt.sha1($salt.$plainText);
}
//
function scrambleString($str) {
debug_print_backtrace();
die("</pre>");
}
+// Debug message logger
+function DEBUG_LOG ($message) {
+ // Is debug mode enabled?
+ if (isBooleanConstantAndTrue('DEBUG_MODE')) {
+ // Log this message away
+ $fp = fopen(PATH."inc/cache/debug.log", 'a') or mxchange_die("Cannot write logfile debug.log!");
+ fwrite($fp, date("d.m.Y|H:i:s", time())."|{$message}\n");
+ fclose($fp);
+ } // END - if
+}
//
//////////////////////////////////////////////////
// //