1 |
<?php |
<?php |
2 |
|
if ($redir) { |
3 |
|
if ($redir == "harrison") include_once("inc/harrison.php"); |
4 |
|
else { |
5 |
|
include_once("inc/banneri.php"); |
6 |
|
// Sad tu neki brojac klikova ili nesto... |
7 |
|
Header("Location: ".$banneri[$redir - 1]["url"]); |
8 |
|
} |
9 |
|
exit; |
10 |
|
} |
11 |
include_once("inc/global.php"); |
include_once("inc/global.php"); |
12 |
include_once("inc/util.php"); |
include_once("inc/util.php"); |
13 |
$picdir = dirname($PHP_SELF)."/img/news"; |
$picdir = str_replace("//", "/", dirname($PHP_SELF)); |
14 |
|
$picdir = ($picdir == "/") ? "" : $picdir; |
15 |
|
$aupicdir = $vadpicdir = $picdir; |
16 |
|
$picdir .= "/img/news"; |
17 |
|
$aupicdir .= "/img/autori"; |
18 |
|
$vadpicdir .= "/img/vademecum"; |
19 |
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
20 |
|
$sysaupicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$aupicdir; |
21 |
|
$sysvadpicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$vadpicdir; |
22 |
include_once("inc/Smarty.class.php"); |
include_once("inc/Smarty.class.php"); |
23 |
include_once("inc/Smarty.local.php"); |
include_once("inc/Smarty.local.php"); |
24 |
$onload = ""; |
$onload = $refresh = $main = ""; |
25 |
$tpl = new Smarty(); |
$tpl = new Smarty(); |
26 |
if (!$section) $section = "home"; |
$ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false; |
27 |
|
$tpl->assign("ns4", $ns4); |
28 |
|
if (!$isReg && $section != "registracija") $section = "prijava"; |
29 |
|
if (!$section) $section = $isReg ? "home" : "prijava"; |
30 |
|
$main_template = "index.tpl"; |
31 |
$fname = "$section.tpl"; |
$fname = "$section.tpl"; |
32 |
$section_name = ""; |
$section_name = ""; |
33 |
$inc = $mnu = ""; |
$inc = $mnu = ""; |
34 |
$PATH = array("PLIVAHEALTH.COM"); |
$PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAZDRAVLJE.HR"); |
35 |
if ($section == "home") { |
if ($isMed) { |
36 |
$section_name = "Home"; |
$mnu = "menuMED.php"; |
37 |
$mnu = "inc/menuHome.php"; |
if ($section == "home") { |
38 |
$inc = "inc/pgHome".($section_menu?"-$section_menu":"").".php"; |
$section_name = "Home"; |
39 |
} else if ($section == "bolesti") { |
$inc = "pgHome"; |
40 |
$section_name = "Bolesti"; |
} else if ($section == "search") { |
41 |
$mnu = "inc/menuBolesti.php"; |
$section_name = "Pretraživanje"; |
42 |
$inc = "inc/pgBolesti".($section_menu?"-$section_menu":"").".php"; |
$mnu = ""; |
43 |
} else if ($section == "simptomi") { |
$inc = "pgSearch"; |
44 |
$section_name = "Simptomi"; |
} else if ($section == "onama") { |
45 |
$mnu = "inc/menuSimptomi.php"; |
$section_name = "O nama"; |
46 |
$inc = "inc/pgSimptomi".($section_menu?"-$section_menu":"").".php"; |
$mnu = ""; |
47 |
} else if ($section == "stanja") { |
$inc = ""; |
48 |
$section_name = "Stanja"; |
} else if ($section == "prijava") { |
49 |
$mnu = "inc/menuStanja.php"; |
$section_name = "Prijava"; |
50 |
$inc = "inc/pgStanja".($section_menu?"-$section_menu":"").".php"; |
$inc = "pgPrijava"; |
51 |
} else if ($section == "lifestyle") { |
} else if ($section == "registracija") { |
52 |
$section_name = "Lifestyle"; |
$section_name = "Registracija"; |
53 |
$mnu = "inc/menuLifestyle.php"; |
$inc = "pgRegistracija"; |
54 |
$inc = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php"; |
} else if ($section == "knjiznica") { |
55 |
} else if ($section == "knjiznica") { |
$section_name = "Knjižnica"; |
56 |
$section_name = "Knjižnica"; |
$inc = "pgKnjiznica2"; |
57 |
$mnu = "inc/menuKnjiznica.php"; |
} else if ($section == "linkovi") { |
58 |
$inc = "inc/pgKnjiznica".($section_menu?"-$section_menu":"").".php"; |
$section_name = "Linkovi"; |
59 |
|
$inc = "pgLinkovi"; |
60 |
|
} else if ($section == "pretrazivanje") { |
61 |
|
$section_name = "Pretraživanje"; |
62 |
|
$inc = "pgPretrazivanje"; |
63 |
|
} else if ($section == "vademecum") { |
64 |
|
$section_name = "PLIVA Vademecum"; |
65 |
|
$inc = "pgKnjiznica-vademecum"; |
66 |
|
$fname = "vademecum.tpl"; |
67 |
|
} else if ($section == "lijekovi") { |
68 |
|
$section_name = "Lista lijekova"; |
69 |
|
$inc = "pgKnjiznica-lijekovi"; |
70 |
|
$fname = "lijekovi.tpl"; |
71 |
|
} else if ($section == "harrison") { |
72 |
|
$section_name = "Harrison's Online"; |
73 |
|
$inc = ""; |
74 |
|
$fname = "harrisons.tpl"; |
75 |
|
} else if ($section == "qa") { |
76 |
|
$section_name = "Pitanja i odgovori"; |
77 |
|
$inc = "pgQA"; |
78 |
|
} else if ($section == "zanimljivo") { |
79 |
|
$section_name = "Zanimljivosti"; |
80 |
|
$inc = "pgZanimljivosti"; |
81 |
|
} |
82 |
|
} else { |
83 |
|
if ($section == "home") { |
84 |
|
$section_name = "Home"; |
85 |
|
$mnu = "menuHome.php"; |
86 |
|
$inc = "pgHome"; |
87 |
|
} else if ($section == "search") { |
88 |
|
$section_name = "Pretraživanje"; |
89 |
|
$mnu = ""; |
90 |
|
$inc = "pgSearch"; |
91 |
|
} else if ($section == "onama") { |
92 |
|
$section_name = "O nama"; |
93 |
|
$mnu = ""; |
94 |
|
$inc = ""; |
95 |
|
} else if ($section == "bolesti") { |
96 |
|
$section_name = "Bolesti"; |
97 |
|
$mnu = "menuBolesti.php"; |
98 |
|
$inc = "pgBolesti"; |
99 |
|
} else if ($section == "simptomi") { |
100 |
|
$section_name = "Simptomi"; |
101 |
|
$mnu = "menuSimptomi.php"; |
102 |
|
$inc = "pgSimptomi"; |
103 |
|
} else if ($section == "stanja") { |
104 |
|
$section_name = "Stanja"; |
105 |
|
$mnu = "menuStanja.php"; |
106 |
|
$inc = "pgStanja"; |
107 |
|
} else if ($section == "lifestyle") { |
108 |
|
$section_name = "Lifestyle"; |
109 |
|
$mnu = "menuLifestyle.php"; |
110 |
|
$inc = "pgLifestyle"; |
111 |
|
} else if ($section == "knjiznica") { |
112 |
|
$section_name = "Knjižnica"; |
113 |
|
$mnu = "menuKnjiznica.php"; |
114 |
|
$inc = "pgKnjiznica"; |
115 |
|
} else if ($section == "bmi") { |
116 |
|
$section_name = "BMI"; |
117 |
|
$mnu = ""; |
118 |
|
$inc = "pgBMI"; |
119 |
|
} else if ($section == "ovulacija") { |
120 |
|
$section_name = "Kalendar ovulacije"; |
121 |
|
$mnu = ""; |
122 |
|
$inc = "pgOvulacija"; |
123 |
|
} else if ($section == "novaustanova") { |
124 |
|
$section_name = "Nova ustanova"; |
125 |
|
$mnu = ""; |
126 |
|
$inc = "pgNovaUstanova"; |
127 |
|
} else if ($section == "qa") { |
128 |
|
$section_name = "Pitanja i odgovori"; |
129 |
|
$inc = "pgQA"; |
130 |
|
} else if ($section == "duk") { |
131 |
|
$section_name = "Doktor u kući"; |
132 |
|
$mnu = $inc = ""; |
133 |
|
} |
134 |
|
} |
135 |
|
if ($mnu && file_exists("inc/$mnu")) { |
136 |
|
$keep_template = false; |
137 |
|
include_once("inc/$mnu"); |
138 |
|
# if (!$section_menu) $section_menu = $menu[0]["name"]; |
139 |
|
if (!$menu) $menu = array(); |
140 |
|
$section_menu_name = ""; |
141 |
|
while (list($k, $v) = each($menu)) { |
142 |
|
$menu[$k]["caption2"] = urlencode($menu[$k]["caption"]); |
143 |
|
if ($v["name"] == $section_menu) $section_menu_name = $v["caption"]; |
144 |
|
} |
145 |
|
$tpl->assign("MENU", $menu); |
146 |
|
if ($section_menu && !$keep_template) |
147 |
|
$fname = eregi_replace("(".$tpl->tpl_file_ext.")$", "-$section_menu\\1", $fname); |
148 |
|
$inc2 = $inc.($section_menu?"-$section_menu":""); |
149 |
|
if ($inc2 && file_exists("inc/$inc2.php")) $inc = $inc2; |
150 |
} |
} |
151 |
|
$inc .= ".php"; |
152 |
if ($section_name) array_push($PATH, MyUpper($section_name)); |
if ($section_name) array_push($PATH, MyUpper($section_name)); |
153 |
if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name)); |
if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name)); |
154 |
if ($mnu && file_exists($mnu)) { |
if ($section_menu2_name) array_push($PATH, MyUpper($section_menu2_name)); |
155 |
include_once($mnu); |
if ($inc && file_exists("inc/$inc")) include_once("inc/$inc"); |
156 |
include_once("inc/menu.php"); |
if ($isMed) { |
157 |
|
$tpl->assign("mainmenu", array( |
158 |
|
array("sec" => "home", "alt" => "home", "w" => 56, "h" => 23), |
159 |
|
array("sec" => "linkovi", "alt" => "linkovi", "w" => 60, "h" => 23), |
160 |
|
array("sec" => "knjiznica", "alt" => "knjižnica", "w" => 74, "h" => 23), |
161 |
|
array("sec" => "lijekovi", "alt" => "Lista HZZO lijekova", "w" => 134, "h" => 23) |
162 |
|
)); |
163 |
|
} else { |
164 |
|
$tpl->assign("mainmenu", array( |
165 |
|
array("sec" => "home", "alt" => "home", "w" => 54, "h" => 23), |
166 |
|
array("sec" => "bolesti", "alt" => "bolesti", "w" => 60, "h" => 23), |
167 |
|
array("sec" => "simptomi", "alt" => "simptomi", "w" => 78, "h" => 23), |
168 |
|
array("sec" => "stanja", "alt" => "stanja", "w" => 57, "h" => 23), |
169 |
|
array("sec" => "lifestyle", "alt" => "lifestyle", "w" => 68, "h" => 23), |
170 |
|
array("sec" => "knjiznica", "alt" => "knjižnica", "w" => 78, "h" => 23) |
171 |
|
)); |
172 |
} |
} |
|
if ($inc && file_exists($inc)) include_once($inc); |
|
173 |
$tpl->assign("isedit", $isEdit); |
$tpl->assign("isedit", $isEdit); |
174 |
$tpl->assign("ismed", $isMed); |
$tpl->assign("ismed", $isMed); |
175 |
|
$tpl->assign("isreg", $isReg); |
176 |
$tpl->assign("PATH", $PATH); |
$tpl->assign("PATH", $PATH); |
177 |
$tpl->assign("newspicdir", "$picdir/"); |
$tpl->assign("newspicdir", "$picdir/"); |
178 |
|
$tpl->assign("aupicdir", "$aupicdir/"); |
179 |
|
$tpl->assign("vadpicdir", "$vadpicdir/"); |
180 |
$tpl->assign("section", $section); |
$tpl->assign("section", $section); |
181 |
$tpl->assign("section_menu", $section_menu); |
$tpl->assign("section_menu", $section_menu); |
182 |
if ($fname) $main = $tpl->fetch($fname); |
$tpl->assign("section_menu2", $section_menu2); |
183 |
|
$tpl->assign("spec", $spec); |
184 |
|
if ($fname && $section_name) $main = $tpl->fetch($fname); |
185 |
$tpl->assign("MAIN", $main); |
$tpl->assign("MAIN", $main); |
186 |
|
$tpl->assign("FOOTER", $tpl->fetch("footer.tpl")); |
187 |
$tpl->assign("onload", $onload); |
$tpl->assign("onload", $onload); |
188 |
$tpl->display("index.tpl"); |
$tpl->assign("refresh", $refresh); |
189 |
|
$tpl->assign("query", $query); |
190 |
|
include_once("inc/banneri.php"); |
191 |
|
$idx = rand(0, count($banneri) - 1); |
192 |
|
$tpl->assign("banner", $banneri[$idx]["slika"]); |
193 |
|
$tpl->assign("banner_alt", $banneri[$idx]["alt"]); |
194 |
|
$tpl->assign("banner_url", "?redir=".($idx + 1)); |
195 |
|
$tpl->assign("show", $show ? true : false); |
196 |
|
$tpl->display($main_template); |
197 |
|
include_once("inc/tracker.php"); |
198 |
?> |
?> |