X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=run.php;h=4e56e98237ed5c00654293628c479996e991e9bf;hb=9f4dd08b3d81e9200d8486655df7cd2fc7cf307a;hp=8d8d1dfcda0fd6db30d58d2bf068b413a60fba0a;hpb=15fa6e23941fd5497ca19266adaede5c19e3836a;p=wfpl.git diff --git a/run.php b/run.php index 8d8d1df..4e56e98 100644 --- a/run.php +++ b/run.php @@ -1,24 +1,9 @@ 404

404 File Not Found

'; - } + echo '404

404 File Not Found

'; + } + } + + $data = &$GLOBALS['wfpl_template']; + $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();