X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=run.php;h=3d0b1d4d5e2bbe66a7d9b7dc1a6d7bef69e349c9;hb=27f182546d729a9d297091799fcf1a1922da0c5e;hp=79a05dc661c5c40b0b6a0b19647262cb50a0ede3;hpb=22d5fb7ab7d4ee86bd59e194387dca268bd577a1;p=wfpl.git diff --git a/run.php b/run.php index 79a05dc..3d0b1d4 100644 --- a/run.php +++ b/run.php @@ -1,23 +1,9 @@ 404

404 File Not Found

'; - } + echo '404

404 File Not Found

'; + } + } + + $data = &$GLOBALS['wfpl_tem_data']; + $data['basename'] = $basename; + if(function_exists('display_messages')) { + display_messages(); + } + if($cms_content) foreach($cms_content as $name => $value) { + $data[$name] .= $value; + } + if(file_exists("$basename.css")) { + $data['css_link'] = "$basename.css"; + } + + if(file_exists("template.html")) { + $template = parse_template_file("template.html"); + if($html_exists) { + $subs = parse_template_file($html_file); + $template = merge_templates($template, $subs); } + } elseif($html_exists) { + $template = parse_template_file("$html_file"); } + if($template) print fill_template($template, $data); } run_php();