--- index.php 2001/06/28 13:33:04 1.2 +++ index.php 2001/06/29 09:44:25 1.3 @@ -13,7 +13,6 @@ require("inc/section.php"); -$smarty->assign(array(section=>$section, mpic=>$mpic, Section_title=>$title, rnd=>$rnd)); $smarty->assign("r1link", "#"); $smarty->assign("r1pic", "bisolex.jpg"); @@ -22,7 +21,26 @@ include("common.inc"); -$smarty->assign("MAIN",$smarty->fetch("$main_file.tpl")); +include("find_html_file.inc"); + +if (isset($h) && file_exists(find_html_file("h/$section",$h))) { + $main=join('',file(find_html_file("h/$section",$h))); + if ($menu_item) { + $title.=" : $menu_item"; + } +} elseif (file_exists("template/$main_file.tpl")) { + $main=$smarty->fetch("$main_file.tpl"); +} elseif (find_html_file("h",$section)) { + $main=join('',file(find_html_file("h",$section))); +} else { + $main="can't find template or html file for section $section"; +} +$smarty->assign(array(section=>$section, + mpic=>$mpic, + Section_title=>$title, + rnd=>$rnd, + MAIN=>$main, + )); $smarty->display("index.tpl"); ?>