/[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.11 - (show annotations)
Wed Sep 19 12:23:56 2001 UTC (22 years, 7 months ago) by ravilov
Branch: MAIN
Changes since 1.10: +68 -27 lines
Added thefilez/med/ (PLIVAmed site). Other major changes...

1 <?php
2 include_once("inc/global.php");
3 include_once("inc/util.php");
4 $picdir = dirname($PHP_SELF)."/img/news";
5 $aupicdir = dirname($PHP_SELF)."/img/autori";
6 $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;
7 $sysaupicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$aupicdir;
8 include_once("inc/Smarty.class.php");
9 include_once("inc/Smarty.local.php");
10 $onload = "";
11 $tpl = new Smarty();
12 $ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false;
13 $tpl->assign("ns4", $ns4);
14 if (!$section) $section = "home";
15 $main_template = "index.tpl";
16 $fname = "$section.tpl";
17 $section_name = "";
18 $inc = $mnu = "";
19 $PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAHEALTH.HR");
20 if ($isMed) {
21 $mnu = "inc/menuMED.php";
22 if ($section == "home") {
23 $section_name = "Home";
24 $inc = "inc/pgHome";
25 } else if ($section == "registracija") {
26 $section_name = "Registracija";
27 $inc = "inc/pgRegistracija";
28 } else if ($section == "onama") {
29 $section_name = "O nama";
30 $inc = "inc/pgONama";
31 } else if ($section == "knjiznica") {
32 $section_name = "Knji¾nica";
33 $inc = "inc/pgKnjiznica2";
34 } else if ($section == "linkovi") {
35 $section_name = "Linkovi";
36 $inc = "inc/pgLinkovi";
37 } else if ($section == "pretrazivanje") {
38 $section_name = "Pretra¾ivanje";
39 $inc = "inc/pgPretrazivanje";
40 }
41 } else {
42 if ($section == "home") {
43 $section_name = "Home";
44 $mnu = "inc/menuHome.php";
45 $inc = "inc/pgHome";
46 } else if ($section == "bolesti") {
47 $section_name = "Bolesti";
48 $mnu = "inc/menuBolesti.php";
49 $inc = "inc/pgBolesti";
50 } else if ($section == "simptomi") {
51 $section_name = "Simptomi";
52 $mnu = "inc/menuSimptomi.php";
53 $inc = "inc/pgSimptomi";
54 } else if ($section == "stanja") {
55 $section_name = "Stanja";
56 $mnu = "inc/menuStanja.php";
57 $inc = "inc/pgStanja";
58 } else if ($section == "lifestyle") {
59 $section_name = "Lifestyle";
60 $mnu = "inc/menuLifestyle.php";
61 $inc = "inc/pgLifestyle";
62 } else if ($section == "knjiznica") {
63 $section_name = "Knji¾nica";
64 $mnu = "inc/menuKnjiznica.php";
65 $inc = "inc/pgKnjiznica";
66 }
67 }
68 if ($mnu && file_exists($mnu)) {
69 $keep_template = false;
70 include_once($mnu);
71 # if (!$section_menu) $section_menu = $menu[0]["name"];
72 $section_menu_name = "";
73 while (list($k, $v) = each($menu)) {
74 $menu[$k]["caption2"] = urlencode($menu[$k]["caption"]);
75 if ($v["name"] == $section_menu) $section_menu_name = $v["caption"];
76 }
77 $tpl->assign("MENU", $menu);
78 if ($section_menu && !$keep_template)
79 $fname = eregi_replace("(".$tpl->tpl_file_ext.")$", "-$section_menu\\1", $fname);
80 $inc2 = $inc.($section_menu?"-$section_menu":"");
81 $inc .= ".php";
82 $inc2 .= ".php";
83 if ($inc2 && file_exists($inc2)) $inc = $inc2;
84 }
85 if ($section_name) array_push($PATH, MyUpper($section_name));
86 if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name));
87 if ($inc && file_exists($inc)) include_once($inc);
88 $tpl->assign("isedit", $isEdit);
89 $tpl->assign("ismed", $isMed);
90 $tpl->assign("PATH", $PATH);
91 $tpl->assign("newspicdir", "$picdir/");
92 $tpl->assign("aupicdir", "$aupicdir/");
93 $tpl->assign("section", $section);
94 $tpl->assign("section_menu", $section_menu);
95 $tpl->assign("spec", $spec);
96 $main = $fname ? $tpl->fetch($fname) : "";
97 $tpl->assign("MAIN", $main);
98 $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));
99 $tpl->assign("onload", $onload);
100 $tpl->display($main_template);
101 include_once("inc/tracker.php");
102 ?>

  ViewVC Help
Powered by ViewVC 1.1.26