4 |
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
5 |
include_once("inc/Smarty.class.php"); |
include_once("inc/Smarty.class.php"); |
6 |
include_once("inc/Smarty.local.php"); |
include_once("inc/Smarty.local.php"); |
|
$fname = ""; |
|
7 |
$onload = ""; |
$onload = ""; |
8 |
$tpl = new Smarty(); |
$tpl = new Smarty(); |
9 |
if (!$section) { |
if (!$section) { |
10 |
header("Location: $PHP_SELF?section=home"); |
header("Location: $PHP_SELF?section=home"); |
11 |
exit; |
exit; |
12 |
} |
} |
13 |
|
$fname = "$section.tpl"; |
14 |
$section_name = ""; |
$section_name = ""; |
15 |
if ($section == "home") { |
if ($section == "home") { |
16 |
$section_name = "HOME"; |
$section_name = "Home"; |
17 |
include_once("inc/pgHome.php"); |
include_once("inc/menuHome.php"); |
18 |
} else if ($section == "d_s") { |
$f = "inc/pgHome".($section_menu?"-$section_menu":"").".php"; |
19 |
$section_name = "DISEASE & SYMPTOMES"; |
@include_once($f); |
20 |
|
} else if ($section == "ds") { |
21 |
|
$section_name = "Disease & Symptomes"; |
22 |
|
include_once("inc/menuDS.php"); |
23 |
|
$f = "inc/pgDS".($section_menu?"-$section_menu":"").".php"; |
24 |
|
@include_once($f); |
25 |
} else if ($section == "conditions") { |
} else if ($section == "conditions") { |
26 |
$section_name = "CONDITIONS"; |
$section_name = "Conditions"; |
27 |
include_once("inc/pgConditions.php"); |
include_once("inc/menuConditions.php"); |
28 |
|
$f = "inc/pgConditions".($section_menu?"-$section_menu":"").".php"; |
29 |
|
@include_once($f); |
30 |
} else if ($section == "lifestyle") { |
} else if ($section == "lifestyle") { |
31 |
$section_name = "LIFESTYLE"; |
$section_name = "Lifestyle"; |
32 |
include_once("inc/pgLifestyle.php"); |
include_once("inc/menuLifestyle.php"); |
33 |
|
$f = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php"; |
34 |
|
@include_once($f); |
35 |
} else if ($section == "library") { |
} else if ($section == "library") { |
36 |
$section_name = "LIBRARY"; |
$section_name = "Library"; |
37 |
include_once("inc/pgLibrary.php"); |
include_once("inc/menuLibrary.php"); |
38 |
|
$f = "inc/pgLibrary".($section_menu?"-$section_menu":"").".php"; |
39 |
|
@include_once($f); |
40 |
} |
} |
|
$tpl->assign("section", $section); |
|
|
$tpl->assign("section_name", $section_name); |
|
41 |
$tpl->assign("newspicdir", "$picdir/"); |
$tpl->assign("newspicdir", "$picdir/"); |
42 |
if (!$fname) $fname = "$section.tpl"; |
$tpl->assign("section", $section); |
43 |
if ($section_name) $main = $tpl->fetch($fname); |
$tpl->assign("section_name", strtoupper($section_name)); |
44 |
|
$tpl->assign("section_menu", $section_menu); |
45 |
|
$tpl->assign("section_menu_name", strtoupper($section_menu_name)); |
46 |
|
if ($fname) $main = $tpl->fetch($fname); |
47 |
$tpl->assign("MAIN", $main); |
$tpl->assign("MAIN", $main); |
48 |
$tpl->assign("onload", $onload); |
$tpl->assign("onload", $onload); |
49 |
$tpl->display("index.tpl"); |
$tpl->display("index.tpl"); |