X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=run.php;h=b5b91a18a1d66893802619a98b82056567587e27;hb=8ef1f36849dc9f50ad2d5c19bef126ab3c9e454b;hp=f77e7d026c710aa061551bbc60ee73dd8bb856d0;hpb=d98d81886649a863d0e902f7c4e63b1257217e1f;p=wfpl.git diff --git a/run.php b/run.php index f77e7d0..b5b91a1 100644 --- a/run.php +++ b/run.php @@ -1,23 +1,9 @@ 404

404 File Not Found

'; } @@ -102,14 +122,6 @@ function run_php($basename = false) { # files can return a basename or URL of a page to be run/displayed $other = file_run($php_file); if($other) { - if(strpos($other, ':')) { - redirect($other); - exit(); - } - if(substr($other, 0, 2) == './') { - redirect(ereg_replace('/[^/]*$', substr($other, 1), this_url())); - exit(); - } run_php($other); return; } @@ -125,9 +137,13 @@ function run_php($basename = false) { if(file_exists('template.html')) { $tem = new tem(); $tem->load("template.html"); + $tem->set('basename', $basename); + if($cms_content) foreach($cms_content as $name => $val) { + $tem->append($name, $val); + } $sections = tem_top_subs(); if($sections) foreach($sections as $name => $val) { - $tem->set($name, $val); + $tem->append($name, $val); } if(file_exists("$basename.css")) {