/[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.3 by ravilov, Wed Aug 22 11:43:59 2001 UTC revision 1.11 by ravilov, Wed Sep 19 12:23:56 2001 UTC
# Line 1  Line 1 
1  <?php  <?php
2          include_once("inc/global.php");          include_once("inc/global.php");
3            include_once("inc/util.php");
4          $picdir = dirname($PHP_SELF)."/img/news";          $picdir = dirname($PHP_SELF)."/img/news";
5            $aupicdir = dirname($PHP_SELF)."/img/autori";
6          $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;          $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;
7            $sysaupicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$aupicdir;
8          include_once("inc/Smarty.class.php");          include_once("inc/Smarty.class.php");
9          include_once("inc/Smarty.local.php");          include_once("inc/Smarty.local.php");
10          $onload = "";          $onload = "";
11          $tpl = new Smarty();          $tpl = new Smarty();
12          if (!$section) {          $ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false;
13                  header("Location: $PHP_SELF?section=home");          $tpl->assign("ns4", $ns4);
14                  exit;          if (!$section) $section = "home";
15          }          $main_template = "index.tpl";
16          $fname = "$section.tpl";          $fname = "$section.tpl";
17          $section_name = "";          $section_name = "";
18          if ($section == "home") {          $inc = $mnu = "";
19                  $section_name = "Home";          $PATH = array($isMed ? "PLIVAMED.NET" : "PLIVAHEALTH.HR");
20                  include_once("inc/menuHome.php");          if ($isMed) {
21                  $f = "inc/pgHome".($section_menu?"-$section_menu":"").".php";                  $mnu = "inc/menuMED.php";
22                  @include_once($f);                  if ($section == "home") {
23          } else if ($section == "ds") {                          $section_name = "Home";
24                  $section_name = "Disease &amp; Symptomes";                          $inc = "inc/pgHome";
25                  include_once("inc/menuDS.php");                  } else if ($section == "registracija") {
26                  $f = "inc/pgDS".($section_menu?"-$section_menu":"").".php";                          $section_name = "Registracija";
27                  @include_once($f);                          $inc = "inc/pgRegistracija";
28          } else if ($section == "conditions") {                  } else if ($section == "onama") {
29                  $section_name = "Conditions";                          $section_name = "O nama";
30                  include_once("inc/menuConditions.php");                          $inc = "inc/pgONama";
31                  $f = "inc/pgConditions".($section_menu?"-$section_menu":"").".php";                  } else if ($section == "knjiznica") {
32                  @include_once($f);                          $section_name = "Knjižnica";
33          } else if ($section == "lifestyle") {                          $inc = "inc/pgKnjiznica2";
34                  $section_name = "Lifestyle";                  } else if ($section == "linkovi") {
35                  include_once("inc/menuLifestyle.php");                          $section_name = "Linkovi";
36                  $f = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php";                          $inc = "inc/pgLinkovi";
37                  @include_once($f);                  } else if ($section == "pretrazivanje") {
38          } else if ($section == "library") {                          $section_name = "Pretraživanje";
39                  $section_name = "Library";                          $inc = "inc/pgPretrazivanje";
40                  include_once("inc/menuLibrary.php");                  }
41                  $f = "inc/pgLibrary".($section_menu?"-$section_menu":"").".php";          } else {
42                  @include_once($f);                  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/");          $tpl->assign("newspicdir", "$picdir/");
92            $tpl->assign("aupicdir", "$aupicdir/");
93          $tpl->assign("section", $section);          $tpl->assign("section", $section);
         $tpl->assign("section_name", strtoupper($section_name));  
94          $tpl->assign("section_menu", $section_menu);          $tpl->assign("section_menu", $section_menu);
95          $tpl->assign("section_menu_name", strtoupper($section_menu_name));          $tpl->assign("spec", $spec);
96          if ($fname) $main = $tpl->fetch($fname);          $main = $fname ? $tpl->fetch($fname) : "";
97          $tpl->assign("MAIN", $main);          $tpl->assign("MAIN", $main);
98            $tpl->assign("FOOTER", $tpl->fetch("footer.tpl"));
99          $tpl->assign("onload", $onload);          $tpl->assign("onload", $onload);
100          $tpl->display("index.tpl");          $tpl->display($main_template);
101            include_once("inc/tracker.php");
102  ?>  ?>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26