--- index.php 2001/08/22 11:43:59 1.3 +++ index.php 2001/08/27 09:17:40 1.4 @@ -12,32 +12,31 @@ } $fname = "$section.tpl"; $section_name = ""; + $inc = ""; if ($section == "home") { $section_name = "Home"; include_once("inc/menuHome.php"); - $f = "inc/pgHome".($section_menu?"-$section_menu":"").".php"; - @include_once($f); + $inc = "inc/pgHome".($section_menu?"-$section_menu":"").".php"; } else if ($section == "ds") { $section_name = "Disease & Symptomes"; include_once("inc/menuDS.php"); - $f = "inc/pgDS".($section_menu?"-$section_menu":"").".php"; - @include_once($f); + $inc = "inc/pgDS".($section_menu?"-$section_menu":"").".php"; } else if ($section == "conditions") { $section_name = "Conditions"; include_once("inc/menuConditions.php"); - $f = "inc/pgConditions".($section_menu?"-$section_menu":"").".php"; - @include_once($f); + $inc = "inc/pgConditions".($section_menu?"-$section_menu":"").".php"; } else if ($section == "lifestyle") { $section_name = "Lifestyle"; include_once("inc/menuLifestyle.php"); - $f = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php"; - @include_once($f); + $inc = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php"; } else if ($section == "library") { $section_name = "Library"; include_once("inc/menuLibrary.php"); - $f = "inc/pgLibrary".($section_menu?"-$section_menu":"").".php"; - @include_once($f); + $inc = "inc/pgLibrary".($section_menu?"-$section_menu":"").".php"; } + if ($inc && file_exists($inc)) include_once($inc); + $tpl->assign("isedit", $isEdit); + $tpl->assign("ismed", $isMed); $tpl->assign("newspicdir", "$picdir/"); $tpl->assign("section", $section); $tpl->assign("section_name", strtoupper($section_name));