/[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.12 - (show annotations)
Tue Sep 25 15:38:04 2001 UTC (22 years, 7 months ago) by ravilov
Branch: MAIN
Changes since 1.11: +86 -32 lines
Major changes. Too numeruous to mention all here.

1 <?php
2 include_once("inc/global.php");
3 include_once("inc/util.php");
4 $picdir = str_replace("//", "/", dirname($PHP_SELF));
5 $picdir = ($picdir == "/") ? "" : $picdir;
6 $aupicdir = $vadpicdir = $picdir;
7 $picdir .= "/img/news";
8 $aupicdir .= "/img/autori";
9 $vadpicdir .= "/img/vademecum";
10 $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;
11 $sysaupicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$aupicdir;
12 $sysvadpicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$vadpicdir;
13 include_once("inc/Smarty.class.php");
14 include_once("inc/Smarty.local.php");
15 $onload = $refresh = $main = "";
16 $tpl = new Smarty();
17 $ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false;
18 $tpl->assign("ns4", $ns4);
19 if (!$isReg && $section != "registracija") $section = "prijava";
20 if (!$section) $section = $isReg ? "home" : "prijava";
21 $main_template = "index.tpl";
22 $fname = "$section.tpl";
23 $section_name = "";
24 $inc = $mnu = "";
25 $PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAHEALTH.HR");
26 if ($isMed) {
27 $mnu = "menuMED.php";
28 if ($section == "home") {
29 $section_name = "Home";
30 $inc = "pgHome";
31 } else if ($section == "search") {
32 $section_name = "Pretra¾ivanje";
33 $mnu = "";
34 $inc = "pgSearch";
35 } else if ($section == "onama") {
36 $section_name = "O nama";
37 $mnu = "";
38 $inc = "";
39 } else if ($section == "prijava") {
40 $section_name = "Prijava";
41 $inc = "pgPrijava";
42 } else if ($section == "registracija") {
43 $section_name = "Registracija";
44 $inc = "pgRegistracija";
45 } else if ($section == "knjiznica") {
46 $section_name = "Knji¾nica";
47 $inc = "pgKnjiznica2";
48 } else if ($section == "linkovi") {
49 $section_name = "Linkovi";
50 $inc = "pgLinkovi";
51 } else if ($section == "pretrazivanje") {
52 $section_name = "Pretra¾ivanje";
53 $inc = "pgPretrazivanje";
54 }
55 } else {
56 if ($section == "home") {
57 $section_name = "Home";
58 $mnu = "menuHome.php";
59 $inc = "pgHome";
60 } else if ($section == "search") {
61 $section_name = "Pretra¾ivanje";
62 $mnu = "";
63 $inc = "pgSearch";
64 } else if ($section == "onama") {
65 $section_name = "O nama";
66 $mnu = "";
67 $inc = "";
68 } else if ($section == "bolesti") {
69 $section_name = "Bolesti";
70 $mnu = "menuBolesti.php";
71 $inc = "pgBolesti";
72 } else if ($section == "simptomi") {
73 $section_name = "Simptomi";
74 $mnu = "menuSimptomi.php";
75 $inc = "pgSimptomi";
76 } else if ($section == "stanja") {
77 $section_name = "Stanja";
78 $mnu = "menuStanja.php";
79 $inc = "pgStanja";
80 } else if ($section == "lifestyle") {
81 $section_name = "Lifestyle";
82 $mnu = "menuLifestyle.php";
83 $inc = "pgLifestyle";
84 } else if ($section == "knjiznica") {
85 $section_name = "Knji¾nica";
86 $mnu = "menuKnjiznica.php";
87 $inc = "pgKnjiznica";
88 } else if ($section == "bmi") {
89 $section_name = "BMI";
90 $mnu = "";
91 $inc = "pgBMI";
92 } else if ($section == "ovulacija") {
93 $section_name = "Kalendar ovulacije";
94 $mnu = "";
95 $inc = "pgOvulacija";
96 }
97 }
98 if ($mnu && file_exists("inc/$mnu")) {
99 $keep_template = false;
100 include_once("inc/$mnu");
101 # if (!$section_menu) $section_menu = $menu[0]["name"];
102 if (!$menu) $menu = array();
103 $section_menu_name = "";
104 while (list($k, $v) = each($menu)) {
105 $menu[$k]["caption2"] = urlencode($menu[$k]["caption"]);
106 if ($v["name"] == $section_menu) $section_menu_name = $v["caption"];
107 }
108 $tpl->assign("MENU", $menu);
109 if ($section_menu && !$keep_template)
110 $fname = eregi_replace("(".$tpl->tpl_file_ext.")$", "-$section_menu\\1", $fname);
111 $inc2 = $inc.($section_menu?"-$section_menu":"");
112 if ($inc2 && file_exists("inc/$inc2.php")) $inc = $inc2;
113 }
114 $inc .= ".php";
115 if ($section_name) array_push($PATH, MyUpper($section_name));
116 if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name));
117 if ($section_menu2_name) array_push($PATH, MyUpper($section_menu2_name));
118 if ($inc && file_exists("inc/$inc")) include_once("inc/$inc");
119 $tpl->assign("isedit", $isEdit);
120 $tpl->assign("ismed", $isMed);
121 $tpl->assign("isreg", $isReg);
122 $tpl->assign("PATH", $PATH);
123 $tpl->assign("newspicdir", "$picdir/");
124 $tpl->assign("aupicdir", "$aupicdir/");
125 $tpl->assign("vadpicdir", "$vadpicdir/");
126 $tpl->assign("section", $section);
127 $tpl->assign("section_menu", $section_menu);
128 $tpl->assign("section_menu2", $section_menu2);
129 $tpl->assign("spec", $spec);
130 if ($fname) $main = $tpl->fetch($fname);
131 $tpl->assign("MAIN", $main);
132 $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));
133 if ($isMed) {
134 $tpl->assign("mainmenu", array(
135 array("sec" => "home", "alt" => "home", "w" => 56, "h" => 23),
136 array("sec" => "linkovi", "alt" => "linkovi", "w" => 60, "h" => 23),
137 array("sec" => "knjiznica", "alt" => "knji¾nica", "w" => 74, "h" => 23),
138 array("sec" => "pretrazivanje", "alt" => "pretra¾ivanje", "w" => 101, "h" => 23)
139 ));
140 } else {
141 $tpl->assign("mainmenu", array(
142 array("sec" => "home", "alt" => "home", "w" => 54, "h" => 23),
143 array("sec" => "bolesti", "alt" => "bolesti", "w" => 60, "h" => 23),
144 array("sec" => "simptomi", "alt" => "simptomi", "w" => 78, "h" => 23),
145 array("sec" => "stanja", "alt" => "stanja", "w" => 57, "h" => 23),
146 array("sec" => "lifestyle", "alt" => "lifestyle", "w" => 68, "h" => 23),
147 array("sec" => "knjiznica", "alt" => "knji¾nica", "w" => 78, "h" => 23)
148 ));
149 }
150 $tpl->assign("banner", "plivitc.gif");
151 $tpl->assign("onload", $onload);
152 $tpl->assign("refresh", $refresh);
153 $tpl->assign("query", $query);
154 $tpl->display($main_template);
155 include_once("inc/tracker.php");
156 ?>

  ViewVC Help
Powered by ViewVC 1.1.26