) \\n\\1
%!postproc: () div.demo, pre {width: 90%; border: 2px solid #ddd; margin: 1em; padding: 1em;}\\n\\1
%!postproc: () textarea {width: 90%; border: 2px solid #ddd; margin: 1em;}\\n\\1
%!postproc: () hr { color: #f00; background-color: #f00; width: 90%; }\\n\\1
%!postproc: () hr.light { height: 2px; }\\n\\1
%!postproc: () hr.heavy { height: 6px; }\\n\\1
%!postproc: () ".class.php - online convertor\\1"
%!postproc: ""
EOF;
# create the form page
$x = new T2T($page);
# change the %%mtime
$x->mtime = filemtime(__FILE__);
$x->go();
$html = $x->fullhtml;
# for including in an HTML page: $html = $x->bodyhtml;
# for a complete HTML page: $html = $x->fullhtml;
$search = array('{(CODE)}', '{(HTML)}', '{(TEXT)}');
$replace = array("The result will appear here.", "The result will appear here.", '');
if(@$_POST['text']) {
$text = stripmagic($_POST['text']);
$z = new T2T($text);
$z->go();
$fullhtml = $z->fullhtml;
$onlybody = $z->bodyhtml;
$replace = array( htmlspecialchars($fullhtml), $onlybody, htmlspecialchars($text));
}
$html = str_replace($search, $replace, $html);
echo $html;