/[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.22 - (show annotations)
Tue Oct 23 16:13:59 2001 UTC (22 years, 6 months ago) by ravilov
Branch: MAIN
Changes since 1.21: +26 -20 lines
Added an author's CV. Added a secondary main article. Added the Related fields to news editor, and also fixed some bugs in it. Other bugfixes and 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 == "home") {
43 $section_name = "Home";
44 $inc = "pgHome";
45 } else if ($section == "search") {
46 $section_name = "Pretra¾ivanje";
47 $mnu = "";
48 $inc = "pgSearch";
49 } else if ($section == "onama") {
50 $section_name = "O nama";
51 $mnu = "";
52 $inc = "";
53 } else if ($section == "prijava") {
54 $section_name = "Prijava";
55 $inc = "pgPrijava";
56 } else if ($section == "registracija") {
57 $section_name = "Registracija";
58 $inc = "pgRegistracija";
59 } else if ($section == "knjiznica") {
60 $section_name = "Knji¾nica";
61 $inc = "pgKnjiznica2";
62 $mnu = "";
63 } else if ($section == "linkovi") {
64 $section_name = "Linkovi";
65 $inc = "pgLinkovi";
66 } else if ($section == "vademecum") {
67 $section_name = "PLIVA Vademecum";
68 $inc = "pgKnjiznica-vademecum";
69 $mnu = "";
70 $fname = "vademecum.tpl";
71 } else if ($section == "lijekovi") {
72 $section_name = "Lista lijekova";
73 $inc = "pgKnjiznica-lijekovi";
74 $mnu = "";
75 $fname = "lijekovi.tpl";
76 } else if ($section == "harrison") {
77 $section_name = "Harrison's Online";
78 $inc = $mnu = "";
79 $fname = "harrisons.tpl";
80 } else if ($section == "qa") {
81 $section_name = "Pitanja i odgovori";
82 $inc = "pgQA";
83 $mnu = "";
84 } else if ($section == "qa2") {
85 $section_name = "Pitanja i odgovori #2";
86 $inc = "pgQA2";
87 } else if ($section == "kalendar") {
88 $section_name = "Kalendar dogaðanja";
89 $inc = "pgKalendar";
90 } else if ($section == "zanimljivo") {
91 $section_name = "Zanimljivosti";
92 $mnu = "";
93 $inc = "pgZanimljivosti";
94 } else if ($section == "lozinka") {
95 $section_name = "Promjena lozinke";
96 $mnu = "";
97 $inc = "pgLozinka";
98 } else if ($section == "arhiva") {
99 $section_name = "Arhiva";
100 if ($acat == "z") $mnu = "";
101 $inc = "pgArhiva";
102 } else {
103 Header("Location: ?");
104 exit;
105 }
106 } else {
107 if ($section == "home") {
108 $section_name = "Home";
109 $mnu = "menuHome.php";
110 $inc = "pgHome";
111 } else if ($section == "search") {
112 $section_name = "Pretra¾ivanje";
113 $mnu = "";
114 $inc = "pgSearch";
115 } else if ($section == "onama") {
116 $section_name = "O nama";
117 $mnu = $inc = "";
118 } else if ($section == "bolesti") {
119 $section_name = "Bolesti";
120 $mnu = "menuBolesti.php";
121 $inc = "pgBolesti";
122 } else if ($section == "simptomi") {
123 $section_name = "Simptomi";
124 $mnu = "menuSimptomi.php";
125 $inc = "pgSimptomi";
126 } else if ($section == "stanja") {
127 $section_name = "Stanja";
128 $mnu = "menuStanja.php";
129 $inc = "pgStanja";
130 } else if ($section == "lifestyle") {
131 $section_name = "Lifestyle";
132 $mnu = "menuLifestyle.php";
133 $inc = "pgLifestyle";
134 } else if ($section == "knjiznica") {
135 $section_name = "Knji¾nica";
136 $mnu = "menuKnjiznica.php";
137 $inc = "pgKnjiznica";
138 } else if ($section == "bmi") {
139 $section_name = "BMI";
140 $mnu = "";
141 $inc = "pgBMI";
142 } else if ($section == "ovulacija") {
143 $section_name = "Kalendar ovulacije";
144 $mnu = "";
145 $inc = "pgOvulacija";
146 } else if ($section == "novaustanova") {
147 $section_name = "Nova ustanova";
148 $mnu = "";
149 $inc = "pgNovaUstanova";
150 } else if ($section == "qa") {
151 $section_name = "Pitanja i odgovori";
152 $inc = "pgQA";
153 } else if ($section == "qa2") {
154 $section_name = "Pitanja i odgovori #2";
155 $inc = "pgQA2";
156 } else if ($section == "duk") {
157 $section_name = "Doktor u kuæi";
158 $mnu = $inc = "";
159 } else if ($section == "arhiva") {
160 $section_name = "Arhiva";
161 $mnu = "";
162 $inc = "pgArhiva";
163 } else if ($section == "semafor") {
164 $section_name = "Alergijski semafor";
165 $mnu = $inc = "";
166 } else {
167 Header("Location: ?");
168 exit;
169 }
170 }
171 $push_menu = true;
172 if ($mnu && file_exists("inc/$mnu")) {
173 $keep_template = false;
174 include_once("inc/$mnu");
175 # if (!$section_menu) $section_menu = $menu[0]["name"];
176 if (!$menu) $menu = array();
177 $section_menu_name = "";
178 while (list($k, $v) = each($menu)) {
179 $menu[$k]["caption2"] = urlencode($menu[$k]["caption"]);
180 if ($v["name"] == $section_menu) $section_menu_name = $v["caption"];
181 }
182 $tpl->assign("MENU", $menu);
183 }
184 if ($section_menu && !$keep_template)
185 $fname = eregi_replace("(".$tpl->tpl_file_ext.")$", "-$section_menu\\1", $fname);
186 $inc2 = $inc.($section_menu?"-$section_menu":"");
187 if ($inc2 && file_exists("inc/$inc2.php")) $inc = $inc2;
188 $inc .= ".php";
189 if ($section_name) array_push($PATH, MyUpper($section_name));
190 if ($section_menu_name && $push_menu) array_push($PATH, MyUpper($section_menu_name));
191 if ($section_menu2_name) array_push($PATH, MyUpper($section_menu2_name));
192 if ($inc && file_exists("inc/$inc")) include_once("inc/$inc");
193 unset($dbh);
194 if ($isMed) {
195 $tpl->assign("mainmenu", array(
196 array("sec" => "home", "alt" => "home", "w" => 56, "h" => 23),
197 array("sec" => "linkovi", "alt" => "linkovi", "w" => 60, "h" => 23),
198 array("sec" => "knjiznica", "alt" => "knji¾nica", "w" => 74, "h" => 23),
199 array("sec" => "lijekovi", "alt" => "Lista HZZO lijekova", "w" => 134, "h" => 23)
200 ));
201 } else {
202 $tpl->assign("mainmenu", array(
203 array("sec" => "home", "alt" => "home", "w" => 54, "h" => 23),
204 array("sec" => "bolesti", "alt" => "bolesti", "w" => 60, "h" => 23),
205 array("sec" => "simptomi", "alt" => "simptomi", "w" => 78, "h" => 23),
206 array("sec" => "stanja", "alt" => "stanja", "w" => 57, "h" => 23),
207 array("sec" => "lifestyle", "alt" => "lifestyle", "w" => 68, "h" => 23),
208 array("sec" => "knjiznica", "alt" => "knji¾nica", "w" => 78, "h" => 23)
209 ));
210 }
211 $tpl->assign("isedit", $isEdit);
212 $tpl->assign("ismed", $isMed);
213 $tpl->assign("isreg", $isReg);
214 $tpl->assign("PATH", $PATH);
215 $tpl->assign("newspicdir", "$picdir/");
216 $tpl->assign("aupicdir", "$aupicdir/");
217 $tpl->assign("vadpicdir", "$vadpicdir/");
218 $tpl->assign("section", $section);
219 $tpl->assign("section_menu", $section_menu);
220 $tpl->assign("section_menu2", $section_menu2);
221 $tpl->assign("spec", $spec);
222 $tpl->assign("offset", $offset);
223 if ($fname && $section_name) $main = $tpl->fetch($fname);
224 $tpl->assign("MAIN", $main);
225 $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));
226 $tpl->assign("onload", $onload);
227 $tpl->assign("refresh", $refresh);
228 $tpl->assign("trazi", $trazi);
229 $tpl->assign("SEMAFOR", GetSemafor());
230 include_once("inc/banneri.php");
231 $idx = rand(0, count($banneri) - 1);
232 $idx2 = $i = 0;
233 $bnr = array();
234 reset($banneri);
235 while (list($k, $v) = each($banneri)) {
236 $idx2 = $k;
237 $bnr = $v;
238 if ($i++ >= $idx) break;
239 }
240 $tpl->assign("banner", $bnr["slika"]);
241 $tpl->assign("banner_alt", $bnr["alt"]);
242 $tpl->assign("banner_url", "?redir=$idx2");
243 $tpl->assign("show", $show ? true : false);
244 $tpl->assign("date", strftime("%d.%m.%Y."));
245 $tpl->assign("acat", $acat);
246 $tpl->assign("acat2", $acat2);
247 $tpl->display($main_template);
248 include_once("inc/tracker.php");
249 ?>

  ViewVC Help
Powered by ViewVC 1.1.26