7 |
include_once("inc/Smarty.local.php"); |
include_once("inc/Smarty.local.php"); |
8 |
$onload = ""; |
$onload = ""; |
9 |
$tpl = new Smarty(); |
$tpl = new Smarty(); |
10 |
if (!$section) { |
if (!$section) $section = "home"; |
|
header("Location: $PHP_SELF?section=home"); |
|
|
exit; |
|
|
} |
|
11 |
$fname = "$section.tpl"; |
$fname = "$section.tpl"; |
12 |
$section_name = ""; |
$section_name = ""; |
13 |
$inc = ""; |
$inc = $mnu = ""; |
14 |
|
$PATH = array("PLIVAHEALTH.COM"); |
15 |
if ($section == "home") { |
if ($section == "home") { |
16 |
$section_name = "Home"; |
$section_name = "Home"; |
17 |
include_once("inc/menuHome.php"); |
$mnu = "inc/menuHome.php"; |
18 |
$inc = "inc/pgHome".($section_menu?"-$section_menu":"").".php"; |
$inc = "inc/pgHome"; |
19 |
} else if ($section == "ds") { |
} else if ($section == "bolesti") { |
20 |
$section_name = "Disease & Symptomes"; |
$section_name = "Bolesti"; |
21 |
include_once("inc/menuDS.php"); |
$mnu = "inc/menuBolesti.php"; |
22 |
$inc = "inc/pgDS".($section_menu?"-$section_menu":"").".php"; |
$inc = "inc/pgBolesti"; |
23 |
|
} else if ($section == "simptomi") { |
24 |
|
$section_name = "Simptomi"; |
25 |
|
$mnu = "inc/menuSimptomi.php"; |
26 |
|
$inc = "inc/pgSimptomi"; |
27 |
} else if ($section == "stanja") { |
} else if ($section == "stanja") { |
28 |
$section_name = "Stanja"; |
$section_name = "Stanja"; |
29 |
include_once("inc/menuStanja.php"); |
$mnu = "inc/menuStanja.php"; |
30 |
$inc = "inc/pgStanja".($section_menu?"-$section_menu":"").".php"; |
$inc = "inc/pgStanja"; |
31 |
} else if ($section == "lifestyle") { |
} else if ($section == "lifestyle") { |
32 |
$section_name = "Lifestyle"; |
$section_name = "Lifestyle"; |
33 |
include_once("inc/menuLifestyle.php"); |
$mnu = "inc/menuLifestyle.php"; |
34 |
$inc = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php"; |
$inc = "inc/pgLifestyle"; |
35 |
} else if ($section == "knjiznica") { |
} else if ($section == "knjiznica") { |
36 |
$section_name = "Knjižnica"; |
$section_name = "Knjižnica"; |
37 |
include_once("inc/menuKnjiznica.php"); |
$mnu = "inc/menuKnjiznica.php"; |
38 |
$inc = "inc/pgKnjiznica".($section_menu?"-$section_menu":"").".php"; |
$inc = "inc/pgKnjiznica"; |
39 |
|
} |
40 |
|
if ($section_name) array_push($PATH, MyUpper($section_name)); |
41 |
|
if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name)); |
42 |
|
if ($mnu && file_exists($mnu)) { |
43 |
|
include_once($mnu); |
44 |
|
include_once("inc/menu.php"); |
45 |
|
$inc = $inc.($section_menu?"-$section_menu":"").".php"; |
46 |
} |
} |
47 |
if ($inc && file_exists($inc)) include_once($inc); |
if ($inc && file_exists($inc)) include_once($inc); |
48 |
$tpl->assign("isedit", $isEdit); |
$tpl->assign("isedit", $isEdit); |
49 |
$tpl->assign("ismed", $isMed); |
$tpl->assign("ismed", $isMed); |
50 |
|
$tpl->assign("PATH", $PATH); |
51 |
$tpl->assign("newspicdir", "$picdir/"); |
$tpl->assign("newspicdir", "$picdir/"); |
52 |
$tpl->assign("section", $section); |
$tpl->assign("section", $section); |
|
$tpl->assign("section_name", strtoupper($section_name)); |
|
53 |
$tpl->assign("section_menu", $section_menu); |
$tpl->assign("section_menu", $section_menu); |
|
$tpl->assign("section_menu_name", strtoupper($section_menu_name)); |
|
54 |
if ($fname) $main = $tpl->fetch($fname); |
if ($fname) $main = $tpl->fetch($fname); |
55 |
$tpl->assign("MAIN", $main); |
$tpl->assign("MAIN", $main); |
56 |
$tpl->assign("onload", $onload); |
$tpl->assign("onload", $onload); |