Well,
The error I got mentions this code, which starts at line 133 in includes/template.php:
eval($code);
}
else {
$code = preg_replace("/<\[\?|%](php|=)+( \r\n)*(.*)[\?|%]>/siU", "", $template);
echo $code;
}
}
function exec_php_code($code) {
$code = str_replace('\\', '\\\\', $code);
$code = str_replace('\'', '\\\'', $code);
$new_lines = array();
$is_code = 0;
$lines = explode("\n", $code);
foreach ($lines as $line) {
//$line = trim($line);
if (preg_match('/<[\?|%](php|=)+/', $line, $regs)) {
$line = preg_replace('/<[\?|%](php|=)?/i', '', $line);
$line = ((!empty($regs[1]) && $regs[1] == "=") ? "echo " : "").$line;
$is_code = 1;
}
if ($is_code) {
$line = str_replace ('\\\'', '\'', $line);
$line = str_replace ('\\\\', '\\', $line);
if (preg_match('/[\?|%]>/', $line)) {
$line = preg_replace('/[\?|%]>/', '', $line);
$is_code = 0;
}
}
else {
$line = 'echo \''.$line.'\'."\\n";';
}
$new_lines[] = $line;
}
return implode("\n", $new_lines);
}
function clean_template($template) {
$search_array = array(
"/".$this->start."[^ \t\r\n".$this->end."]+".$this->end."/",
"/".$this->start."if[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
"/".$this->start."endif[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
"/$([0-9])/",
"/\([0-9])/"
);
$replace_array = array(
"",
"",
"",
'$\1',
'\\\1'
);
$template = preg_replace($search_array, $replace_array, $template);
return $template;
}
function error($errmsg, $halt = 0) {
if (!$this->no_error) {
echo "<br /><font color='#FF0000'><b>Template Error</b></font>: ".$errmsg."<br />";
if ($halt) {
exit;
}
}
}
} // end of class
?>
This is just semi-colons and curly brackets to me, but maybe someone can see something. I found htmlspecialchars in other php files, but it's not in this php file.
NoBob.