/[health_html]/index.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /index.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.24 - (show annotations)
Tue Oct 30 16:11:28 2001 UTC (17 years, 8 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +12 -8 lines
Added the "po╣alji e-mailom" feature. Added the ability to register on "Kalendar ovulacije" for e-mail notifications. Other fixes/improvements.

1 <?php
2 if ($redir) {
3 include_once("inc/global.php");
4 include_once("inc/util.php");
5 include_once("inc/banneri.php");
6 Click($redir);
7 $loc = $banneri[$redir]["url"];
8 if (!$loc) $loc = "?section=home";
9 Header("Location: $loc");
10 exit;
11 }
12 Header("Pragma: no-cache");
13 Header("Cache-Control: no-cache");
14 Header("Cache-Policy: no-cache");
15 include_once("inc/global.php");
16 include_once("inc/util.php");
17 $mydir = str_replace("//", "/", dirname($PHP_SELF));
18 $mydir = ($mydir == "/") ? "" : $mydir;
19 $sysmydir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"];
20 $aupicdir = $vadpicdir = $picdir = $mydir;
21 $picdir .= "/img/news";
22 $aupicdir .= "/img/autori";
23 $vadpicdir .= "/img/vademecum";
24 $syspicdir = $sysmydir.$picdir;
25 $sysaupicdir = $sysmydir.$aupicdir;
26 $sysvadpicdir = $sysmydir.$vadpicdir;
27 include_once("inc/Smarty.class.php");
28 include_once("inc/Smarty.local.php");
29 $onload = $refresh = $main = "";
30 $tpl = new Smarty();
31 $ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false;
32 $tpl->assign("ns4", $ns4);
33 if (!$isReg && $section != "registracija") $section = "prijava";
34 if (!$section) $section = $isReg ? "home" : "prijava";
35 $main_template = "index.tpl";
36 $fname = "$section.tpl";
37 $section_name = "";
38 $inc = $mnu = "";
39 $PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAZDRAVLJE.HR");
40 if ($isMed) {
41 $mnu = "menuMED.php";
42 if ($section == "salji") {
43 $section_name = "Po┬╣alji ├Ęlanak e-mailom";
44 $inc = "pgSalji";
45 } else if ($section == "home") {
46 $section_name = "Home";
47 $inc = "pgHome";
48 } else if ($section == "search") {
49 $section_name = "Pretra┬żivanje";
50 $mnu = "";
51 $inc = "pgSearch";
52 } else if ($section == "onama") {
53 $section_name = "O nama";
54 $mnu = "";
55 $inc = "";
56 } else if ($section == "prijava") {
57 $section_name = "Prijava";
58 $inc = "pgPrijava";
59 } else if ($section == "registracija") {
60 $section_name = "Registracija";
61 $inc = "pgRegistracija";
62 } else if ($section == "knjiznica") {
63 $section_name = "Knji┬żnica";
64 $inc = "pgKnjiznica2";
65 } else if ($section == "linkovi") {
66 $section_name = "Linkovi";
67 $inc = "pgLinkovi";
68 } else if ($section == "vademecum") {
69 $section_name = "PLIVA Vademecum";
70 $inc = "pgKnjiznica-vademecum";
71 $mnu = "";
72 $fname = "vademecum.tpl";
73 } else if ($section == "lijekovi") {
74 $section_name = "Lista lijekova";
75 $inc = "pgKnjiznica-lijekovi";
76 $mnu = "";
77 $fname = "lijekovi.tpl";
78 } else if ($section == "harrison") {
79 $section_name = "Harrison's Online";
80 $inc = $mnu = "";
81 $fname = "harrisons.tpl";
82 } else if ($section == "qa") {
83 $section_name = "Pitanja i odgovori";
84 $inc = "pgQA";
85 $mnu = "";
86 } else if ($section == "kalendar") {
87 $section_name = "Kalendar doga├░anja";
88 $inc = "pgKalendar";
89 } else if ($section == "zanimljivo") {
90 $section_name = "Zanimljivosti";
91 $mnu = "";
92 $inc = "pgZanimljivosti";
93 } else if ($section == "lozinka") {
94 $section_name = "Promjena lozinke";
95 $mnu = "";
96 $inc = "pgLozinka";
97 } else if ($section == "arhiva") {
98 $section_name = "Arhiva";
99 if ($acat == "z") $mnu = "";
100 $inc = "pgArhiva";
101 } else {
102 Header("Location: ?");
103 exit;
104 }
105 } else {
106 if ($section == "salji") {
107 $section_name = "Po┬╣alji ├Ęlanak e-mailom";
108 $inc = "pgSalji";
109 } else if ($section == "home") {
110 $section_name = "Home";
111 $mnu = "menuHome.php";
112 $inc = "pgHome";
113 } else if ($section == "search") {
114 $section_name = "Pretra┬żivanje";
115 $mnu = "";
116 $inc = "pgSearch";
117 } else if ($section == "onama") {
118 $section_name = "O nama";
119 $mnu = $inc = "";
120 } else if ($section == "bolesti") {
121 $section_name = "Bolesti";
122 $mnu = "menuBolesti.php";
123 $inc = "pgBolesti";
124 } else if ($section == "simptomi") {
125 $section_name = "Simptomi";
126 $mnu = "menuSimptomi.php";
127 $inc = "pgSimptomi";
128 } else if ($section == "stanja") {
129 $section_name = "Stanja";
130 $mnu = "menuStanja.php";
131 $inc = "pgStanja";
132 } else if ($section == "lifestyle") {
133 $section_name = "Lifestyle";
134 $mnu = "menuLifestyle.php";
135 $inc = "pgLifestyle";
136 } else if ($section == "knjiznica") {
137 $section_name = "Knji┬żnica";
138 $mnu = "menuKnjiznica.php";
139 $inc = "pgKnjiznica";
140 } else if ($section == "bmi") {
141 $section_name = "BMI";
142 $mnu = "";
143 $inc = "pgBMI";
144 } else if ($section == "ovulacija") {
145 $section_name = "Kalendar ovulacije";
146 $mnu = "";
147 $inc = "pgOvulacija";
148 } else if ($section == "ovulacija2") {
149 $section_name = "Kalendar ovulacije";
150 $mnu = "";
151 $inc = "pgOvulacija2";
152 } else if ($section == "novaustanova") {
153 $section_name = "Nova ustanova";
154 $mnu = "";
155 $inc = "pgNovaUstanova";
156 } else if ($section == "qa") {
157 $section_name = "Pitanja i odgovori";
158 $inc = "pgQA";
159 } else if ($section == "duk") {
160 $section_name = "Doktor u ku├Ži";
161 $mnu = $inc = "";
162 } else if ($section == "arhiva") {
163 $section_name = "Arhiva";
164 $mnu = "";
165 $inc = "pgArhiva";
166 } else if ($section == "semafor") {
167 $section_name = "Alergijski semafor";
168 $mnu = $inc = "";
169 } else {
170 Header("Location: ?");
171 exit;
172 }
173 }
174 $push_menu = true;
175 if ($mnu && file_exists("inc/$mnu")) {
176 $keep_template = false;
177 include_once("inc/$mnu");
178 # if (!$section_menu) $section_menu = $menu[0]["name"];
179 if (!$menu) $menu = array();
180 $section_menu_name = "";
181 while (list($k, $v) = each($menu)) {
182 $menu[$k]["caption2"] = urlencode($menu[$k]["caption"]);
183 if ($v["name"] == $section_menu) $section_menu_name = $v["caption"];
184 }
185 $tpl->assign("MENU", $menu);
186 }
187 if ($section_menu && !$keep_template)
188 $fname = eregi_replace("(".$tpl->tpl_file_ext.")$", "-$section_menu\\1", $fname);
189 $inc2 = $inc.($section_menu?"-$section_menu":"");
190 if ($inc2 && file_exists("inc/$inc2.php")) $inc = $inc2;
191 $inc .= ".php";
192 if ($section_name) array_push($PATH, MyUpper($section_name));
193 if ($section_menu_name && $push_menu) array_push($PATH, MyUpper($section_menu_name));
194 if ($section_menu2_name) array_push($PATH, MyUpper($section_menu2_name));
195 if ($inc && file_exists("inc/$inc")) include_once("inc/$inc");
196 unset($dbh);
197 if ($isMed) {
198 $tpl->assign("mainmenu", array(
199 array("sec" => "home", "alt" => "home", "w" => 56, "h" => 23),
200 array("sec" => "linkovi", "alt" => "linkovi", "w" => 60, "h" => 23),
201 array("sec" => "knjiznica", "alt" => "knji┬żnica", "w" => 74, "h" => 23),
202 array("sec" => "lijekovi", "alt" => "Lista HZZO lijekova", "w" => 134, "h" => 23)
203 ));
204 } else {
205 $tpl->assign("mainmenu", array(
206 array("sec" => "home", "alt" => "home", "w" => 54, "h" => 23),
207 array("sec" => "bolesti", "alt" => "bolesti", "w" => 60, "h" => 23),
208 array("sec" => "simptomi", "alt" => "simptomi", "w" => 78, "h" => 23),
209 array("sec" => "stanja", "alt" => "stanja", "w" => 57, "h" => 23),
210 array("sec" => "lifestyle", "alt" => "lifestyle", "w" => 68, "h" => 23),
211 array("sec" => "knjiznica", "alt" => "knji┬żnica", "w" => 78, "h" => 23)
212 ));
213 }
214 $tpl->assign("isedit", $isEdit);
215 $tpl->assign("ismed", $isMed);
216 $tpl->assign("isreg", $isReg);
217 $tpl->assign("PATH", $PATH);
218 $tpl->assign("newspicdir", "$picdir/");
219 $tpl->assign("aupicdir", "$aupicdir/");
220 $tpl->assign("vadpicdir", "$vadpicdir/");
221 $tpl->assign("section", $section);
222 $tpl->assign("section_menu", $section_menu);
223 $tpl->assign("section_menu2", $section_menu2);
224 $tpl->assign("spec", $spec);
225 $tpl->assign("offset", $offset);
226 if ($fname && $section_name) $main = $tpl->fetch($fname);
227 $tpl->assign("MAIN", $main);
228 $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));
229 $tpl->assign("onload", $onload);
230 $tpl->assign("refresh", $refresh);
231 $tpl->assign("trazi", $trazi);
232 $tpl->assign("SEMAFOR", GetSemafor());
233 include_once("inc/banneri.php");
234 $idx = rand(0, count($banneri) - 1);
235 $idx2 = $i = 0;
236 $bnr = array();
237 reset($banneri);
238 while (list($k, $v) = each($banneri)) {
239 $idx2 = $k;
240 $bnr = $v;
241 if ($i++ >= $idx) break;
242 }
243 $tpl->assign("banner", $bnr["slika"]);
244 $tpl->assign("banner_alt", $bnr["alt"]);
245 $tpl->assign("banner_url", "?redir=$idx2");
246 $tpl->assign("show", $show ? true : false);
247 $tpl->assign("date", strftime("%d.%m.%Y."));
248 $tpl->assign("acat", $acat);
249 $tpl->assign("acat2", $acat2);
250 $tpl->display($main_template);
251 include_once("inc/tracker.php");
252 ?>

  ViewVC Help
Powered by ViewVC 1.1.26