1 |
<?php |
<?php |
2 |
include_once("inc/global.php"); |
include_once("inc/global.php"); |
3 |
|
include_once("inc/util.php"); |
4 |
$picdir = dirname($PHP_SELF)."/img/news"; |
$picdir = dirname($PHP_SELF)."/img/news"; |
5 |
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
6 |
include_once("inc/Smarty.class.php"); |
include_once("inc/Smarty.class.php"); |
7 |
include_once("inc/Smarty.local.php"); |
include_once("inc/Smarty.local.php"); |
|
$fname = ""; |
|
8 |
$onload = ""; |
$onload = ""; |
9 |
$tpl = new Smarty(); |
$tpl = new Smarty(); |
10 |
if (!$section) { |
if (!$section) $section = "home"; |
11 |
header("Location: $PHP_SELF?section=home"); |
$fname = "$section.tpl"; |
|
exit; |
|
|
} |
|
12 |
$section_name = ""; |
$section_name = ""; |
13 |
|
$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/pgHome.php"); |
$mnu = "inc/menuHome.php"; |
18 |
} else if ($section == "d_s") { |
$inc = "inc/pgHome".($section_menu?"-$section_menu":"").".php"; |
19 |
$section_name = "DISEASE & SYMPTOMES"; |
} else if ($section == "bolesti") { |
20 |
} else if ($section == "conditions") { |
$section_name = "Bolesti"; |
21 |
$section_name = "CONDITIONS"; |
$mnu = "inc/menuBolesti.php"; |
22 |
include_once("inc/pgConditions.php"); |
$inc = "inc/pgBolesti".($section_menu?"-$section_menu":"").".php"; |
23 |
|
} else if ($section == "simptomi") { |
24 |
|
$section_name = "Simptomi"; |
25 |
|
$mnu = "inc/menuSimptomi.php"; |
26 |
|
$inc = "inc/pgSimptomi".($section_menu?"-$section_menu":"").".php"; |
27 |
|
} else if ($section == "stanja") { |
28 |
|
$section_name = "Stanja"; |
29 |
|
$mnu = "inc/menuStanja.php"; |
30 |
|
$inc = "inc/pgStanja".($section_menu?"-$section_menu":"").".php"; |
31 |
} else if ($section == "lifestyle") { |
} else if ($section == "lifestyle") { |
32 |
$section_name = "LIFESTYLE"; |
$section_name = "Lifestyle"; |
33 |
include_once("inc/pgLifestyle.php"); |
$mnu = "inc/menuLifestyle.php"; |
34 |
} else if ($section == "library") { |
$inc = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php"; |
35 |
$section_name = "LIBRARY"; |
} else if ($section == "knjiznica") { |
36 |
|
$section_name = "Knjižnica"; |
37 |
|
$mnu = "inc/menuKnjiznica.php"; |
38 |
|
$inc = "inc/pgKnjiznica".($section_menu?"-$section_menu":"").".php"; |
39 |
} |
} |
40 |
$tpl->assign("section", $section); |
if ($section_name) array_push($PATH, MyUpper($section_name)); |
41 |
$tpl->assign("section_name", $section_name); |
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 |
|
} |
46 |
|
if ($inc && file_exists($inc)) include_once($inc); |
47 |
|
$tpl->assign("isedit", $isEdit); |
48 |
|
$tpl->assign("ismed", $isMed); |
49 |
|
$tpl->assign("PATH", $PATH); |
50 |
$tpl->assign("newspicdir", "$picdir/"); |
$tpl->assign("newspicdir", "$picdir/"); |
51 |
if (!$fname) $fname = "$section.tpl"; |
$tpl->assign("section", $section); |
52 |
if ($section_name) $main = $tpl->fetch($fname); |
$tpl->assign("section_menu", $section_menu); |
53 |
|
if ($fname) $main = $tpl->fetch($fname); |
54 |
$tpl->assign("MAIN", $main); |
$tpl->assign("MAIN", $main); |
55 |
$tpl->assign("onload", $onload); |
$tpl->assign("onload", $onload); |
56 |
$tpl->display("index.tpl"); |
$tpl->display("index.tpl"); |