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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.26