+ exit();
+ }
+
+ if(file_exists($html_file)) {
+ $GLOBALS['wfpl_template'] = new tem();
+ tem_load($html_file);
+ }
+
+ $other = file_run($php_file);
+ if($other) {
+ if(strpos($other, ':')) {
+ redirect($other);
+ exit();
+ }
+ run_php($other);
+ return;
+ }
+
+ if($GLOBALS['wfpl_template']) {
+ if(file_exists('template.html')) {
+ $tem = new tem();
+ $tem->load("template.html");
+ $sections = tem_top_subs();
+ if($sections) foreach($sections as $name => $val) {
+ $tem->set($name, $val);
+ }
+ $GLOBALS['wfpl_template'] = $tem;
+ }
+
+ if(function_exists('display_messages')) {
+ display_messages();
+ }
+ tem_output();