/[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.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");
         $fname = "";  
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";
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/pgHome.php");          if ($isMed) {
21          } else if ($section == "d_s") {                  $mnu = "inc/menuMED.php";
22                  $section_name = "DISEASE &amp; SYMPTOMES";                  if ($section == "home") {
23          } else if ($section == "conditions") {                          $section_name = "Home";
24                  $section_name = "CONDITIONS";                          $inc = "inc/pgHome";
25                  include_once("inc/pgConditions.php");                  } else if ($section == "registracija") {
26          } else if ($section == "lifestyle") {                          $section_name = "Registracija";
27                  $section_name = "LIFESTYLE";                          $inc = "inc/pgRegistracija";
28                  include_once("inc/pgLifestyle.php");                  } else if ($section == "onama") {
29          } else if ($section == "library") {                          $section_name = "O nama";
30                  $section_name = "LIBRARY";                          $inc = "inc/pgONama";
31                  include_once("inc/pgLibrary.php");                  } 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          $tpl->assign("section", $section);          if ($mnu && file_exists($mnu)) {
69          $tpl->assign("section_name", $section_name);                  $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          if (!$fname) $fname = "$section.tpl";          $tpl->assign("aupicdir", "$aupicdir/");
93          if ($section_name) $main = $tpl->fetch($fname);          $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);          $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.2  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26