/[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

Diff of /index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by ravilov, Fri Sep 28 23:34:37 2001 UTC revision 1.24 by ravilov, Tue Oct 30 16:11:28 2001 UTC
# Line 1  Line 1 
1  <?php  <?php
2          if ($redir) {          if ($redir) {
3                  if ($redir == "harrison") include_once("inc/harrison.php");                  include_once("inc/global.php");
4                  else {                  include_once("inc/util.php");
5                          include_once("inc/banneri.php");                  include_once("inc/banneri.php");
6                          // Sad tu neki brojac klikova ili nesto...                  Click($redir);
7                          Header("Location: ".$banneri[$redir - 1]["url"]);                  $loc = $banneri[$redir]["url"];
8                  }                  if (!$loc) $loc = "?section=home";
9                    Header("Location: $loc");
10                  exit;                  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");          include_once("inc/global.php");
16          include_once("inc/util.php");          include_once("inc/util.php");
17          $picdir = str_replace("//", "/", dirname($PHP_SELF));          $mydir = str_replace("//", "/", dirname($PHP_SELF));
18          $picdir = ($picdir == "/") ? "" : $picdir;          $mydir = ($mydir == "/") ? "" : $mydir;
19          $aupicdir = $vadpicdir = $picdir;          $sysmydir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"];
20            $aupicdir = $vadpicdir = $picdir = $mydir;
21          $picdir .= "/img/news";          $picdir .= "/img/news";
22          $aupicdir .= "/img/autori";          $aupicdir .= "/img/autori";
23          $vadpicdir .= "/img/vademecum";          $vadpicdir .= "/img/vademecum";
24          $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;          $syspicdir = $sysmydir.$picdir;
25          $sysaupicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$aupicdir;          $sysaupicdir = $sysmydir.$aupicdir;
26          $sysvadpicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$vadpicdir;          $sysvadpicdir = $sysmydir.$vadpicdir;
27          include_once("inc/Smarty.class.php");          include_once("inc/Smarty.class.php");
28          include_once("inc/Smarty.local.php");          include_once("inc/Smarty.local.php");
29          $onload = $refresh = $main = "";          $onload = $refresh = $main = "";
# Line 34  Line 39 
39          $PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAZDRAVLJE.HR");          $PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAZDRAVLJE.HR");
40          if ($isMed) {          if ($isMed) {
41                  $mnu = "menuMED.php";                  $mnu = "menuMED.php";
42                  if ($section == "home") {                  if ($section == "salji") {
43                            $section_name = "Pošalji članak e-mailom";
44                            $inc = "pgSalji";
45                    } else if ($section == "home") {
46                          $section_name = "Home";                          $section_name = "Home";
47                          $inc = "pgHome";                          $inc = "pgHome";
48                  } else if ($section == "search") {                  } else if ($section == "search") {
# Line 57  Line 65 
65                  } else if ($section == "linkovi") {                  } else if ($section == "linkovi") {
66                          $section_name = "Linkovi";                          $section_name = "Linkovi";
67                          $inc = "pgLinkovi";                          $inc = "pgLinkovi";
                 } else if ($section == "pretrazivanje") {  
                         $section_name = "Pretraživanje";  
                         $inc = "pgPretrazivanje";  
68                  } else if ($section == "vademecum") {                  } else if ($section == "vademecum") {
69                          $section_name = "PLIVA Vademecum";                          $section_name = "PLIVA Vademecum";
70                          $inc = "pgKnjiznica-vademecum";                          $inc = "pgKnjiznica-vademecum";
71                            $mnu = "";
72                          $fname = "vademecum.tpl";                          $fname = "vademecum.tpl";
73                  } else if ($section == "lijekovi") {                  } else if ($section == "lijekovi") {
74                          $section_name = "Lista lijekova";                          $section_name = "Lista lijekova";
75                          $inc = "pgKnjiznica-lijekovi";                          $inc = "pgKnjiznica-lijekovi";
76                            $mnu = "";
77                          $fname = "lijekovi.tpl";                          $fname = "lijekovi.tpl";
78                  } else if ($section == "harrison") {                  } else if ($section == "harrison") {
79                          $section_name = "Harrison's Online";                          $section_name = "Harrison's Online";
80                          $inc = "";                          $inc = $mnu = "";
81                          $fname = "harrisons.tpl";                          $fname = "harrisons.tpl";
82                  } else if ($section == "qa") {                  } else if ($section == "qa") {
83                          $section_name = "Pitanja i odgovori";                          $section_name = "Pitanja i odgovori";
84                          $inc = "pgQA";                          $inc = "pgQA";
85                            $mnu = "";
86                    } else if ($section == "kalendar") {
87                            $section_name = "Kalendar događanja";
88                            $inc = "pgKalendar";
89                  } else if ($section == "zanimljivo") {                  } else if ($section == "zanimljivo") {
90                          $section_name = "Zanimljivosti";                          $section_name = "Zanimljivosti";
91                            $mnu = "";
92                          $inc = "pgZanimljivosti";                          $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 {          } else {
106                  if ($section == "home") {                  if ($section == "salji") {
107                            $section_name = "Pošalji članak e-mailom";
108                            $inc = "pgSalji";
109                    } else if ($section == "home") {
110                          $section_name = "Home";                          $section_name = "Home";
111                          $mnu = "menuHome.php";                          $mnu = "menuHome.php";
112                          $inc = "pgHome";                          $inc = "pgHome";
# Line 90  Line 116 
116                          $inc = "pgSearch";                          $inc = "pgSearch";
117                  } else if ($section == "onama") {                  } else if ($section == "onama") {
118                          $section_name = "O nama";                          $section_name = "O nama";
119                          $mnu = "";                          $mnu = $inc = "";
                         $inc = "";  
120                  } else if ($section == "bolesti") {                  } else if ($section == "bolesti") {
121                          $section_name = "Bolesti";                          $section_name = "Bolesti";
122                          $mnu = "menuBolesti.php";                          $mnu = "menuBolesti.php";
# Line 120  Line 145 
145                          $section_name = "Kalendar ovulacije";                          $section_name = "Kalendar ovulacije";
146                          $mnu = "";                          $mnu = "";
147                          $inc = "pgOvulacija";                          $inc = "pgOvulacija";
148                    } else if ($section == "ovulacija2") {
149                            $section_name = "Kalendar ovulacije";
150                            $mnu = "";
151                            $inc = "pgOvulacija2";
152                  } else if ($section == "novaustanova") {                  } else if ($section == "novaustanova") {
153                          $section_name = "Nova ustanova";                          $section_name = "Nova ustanova";
154                          $mnu = "";                          $mnu = "";
# Line 130  Line 159 
159                  } else if ($section == "duk") {                  } else if ($section == "duk") {
160                          $section_name = "Doktor u kući";                          $section_name = "Doktor u kući";
161                          $mnu = $inc = "";                          $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")) {          if ($mnu && file_exists("inc/$mnu")) {
176                  $keep_template = false;                  $keep_template = false;
177                  include_once("inc/$mnu");                  include_once("inc/$mnu");
# Line 143  Line 183 
183                          if ($v["name"] == $section_menu) $section_menu_name = $v["caption"];                          if ($v["name"] == $section_menu) $section_menu_name = $v["caption"];
184                  }                  }
185                  $tpl->assign("MENU", $menu);                  $tpl->assign("MENU", $menu);
                 if ($section_menu && !$keep_template)  
                         $fname = eregi_replace("(".$tpl->tpl_file_ext.")$", "-$section_menu\\1", $fname);  
                 $inc2 = $inc.($section_menu?"-$section_menu":"");  
                 if ($inc2 && file_exists("inc/$inc2.php")) $inc = $inc2;  
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";          $inc .= ".php";
192          if ($section_name) array_push($PATH, MyUpper($section_name));          if ($section_name) array_push($PATH, MyUpper($section_name));
193          if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name));          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));          if ($section_menu2_name) array_push($PATH, MyUpper($section_menu2_name));
195          if ($inc && file_exists("inc/$inc")) include_once("inc/$inc");          if ($inc && file_exists("inc/$inc")) include_once("inc/$inc");
196            unset($dbh);
197          if ($isMed) {          if ($isMed) {
198                  $tpl->assign("mainmenu", array(                  $tpl->assign("mainmenu", array(
199                          array("sec" => "home", "alt" => "home", "w" => 56, "h" => 23),                          array("sec" => "home", "alt" => "home", "w" => 56, "h" => 23),
# Line 181  Line 222 
222          $tpl->assign("section_menu", $section_menu);          $tpl->assign("section_menu", $section_menu);
223          $tpl->assign("section_menu2", $section_menu2);          $tpl->assign("section_menu2", $section_menu2);
224          $tpl->assign("spec", $spec);          $tpl->assign("spec", $spec);
225            $tpl->assign("offset", $offset);
226          if ($fname && $section_name) $main = $tpl->fetch($fname);          if ($fname && $section_name) $main = $tpl->fetch($fname);
227          $tpl->assign("MAIN", $main);          $tpl->assign("MAIN", $main);
228          $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));          $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));
229          $tpl->assign("onload", $onload);          $tpl->assign("onload", $onload);
230          $tpl->assign("refresh", $refresh);          $tpl->assign("refresh", $refresh);
231          $tpl->assign("query", $query);          $tpl->assign("trazi", $trazi);
232            $tpl->assign("SEMAFOR", GetSemafor());
233          include_once("inc/banneri.php");          include_once("inc/banneri.php");
234          $idx = rand(0, count($banneri) - 1);          $idx = rand(0, count($banneri) - 1);
235          $tpl->assign("banner", $banneri[$idx]["slika"]);          $idx2 = $i = 0;
236          $tpl->assign("banner_alt", $banneri[$idx]["alt"]);          $bnr = array();
237          $tpl->assign("banner_url", "?redir=".($idx + 1));          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);          $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);          $tpl->display($main_template);
251          include_once("inc/tracker.php");          include_once("inc/tracker.php");
252  ?>  ?>

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.26