X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=run.php;h=4e56e98237ed5c00654293628c479996e991e9bf;hb=9f4dd08b3d81e9200d8486655df7cd2fc7cf307a;hp=03d849afb636727f2ce6643556b539633eb8a358;hpb=d03e8554ee3e80a6333126e67dd4c20f54ec700e;p=wfpl.git
diff --git a/run.php b/run.php
index 03d849a..4e56e98 100644
--- a/run.php
+++ b/run.php
@@ -1,23 +1,9 @@
404404 File Not Found
';
- }
+ echo '404404 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();