/[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.7 by ravilov, Tue Sep 4 09:48:51 2001 UTC revision 1.10 by ravilov, Fri Sep 7 15:07:17 2001 UTC
# Line 7  Line 7 
7          include_once("inc/Smarty.local.php");          include_once("inc/Smarty.local.php");
8          $onload = "";          $onload = "";
9          $tpl = new Smarty();          $tpl = new Smarty();
10            $ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false;
11            $tpl->assign("ns4", $ns4);
12          if (!$section) $section = "home";          if (!$section) $section = "home";
13            $main_template = "index.tpl";
14          $fname = "$section.tpl";          $fname = "$section.tpl";
15          $section_name = "";          $section_name = "";
16          $inc = $mnu = "";          $inc = $mnu = "";
# Line 15  Line 18 
18          if ($section == "home") {          if ($section == "home") {
19                  $section_name = "Home";                  $section_name = "Home";
20                  $mnu = "inc/menuHome.php";                  $mnu = "inc/menuHome.php";
21                  $inc = "inc/pgHome".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgHome";
22          } else if ($section == "bolesti") {          } else if ($section == "bolesti") {
23                  $section_name = "Bolesti";                  $section_name = "Bolesti";
24                  $mnu = "inc/menuBolesti.php";                  $mnu = "inc/menuBolesti.php";
25                  $inc = "inc/pgBolesti".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgBolesti";
26          } else if ($section == "simptomi") {          } else if ($section == "simptomi") {
27                  $section_name = "Simptomi";                  $section_name = "Simptomi";
28                  $mnu = "inc/menuSimptomi.php";                  $mnu = "inc/menuSimptomi.php";
29                  $inc = "inc/pgSimptomi".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgSimptomi";
30          } else if ($section == "stanja") {          } else if ($section == "stanja") {
31                  $section_name = "Stanja";                  $section_name = "Stanja";
32                  $mnu = "inc/menuStanja.php";                  $mnu = "inc/menuStanja.php";
33                  $inc = "inc/pgStanja".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgStanja";
34          } else if ($section == "lifestyle") {          } else if ($section == "lifestyle") {
35                  $section_name = "Lifestyle";                  $section_name = "Lifestyle";
36                  $mnu = "inc/menuLifestyle.php";                  $mnu = "inc/menuLifestyle.php";
37                  $inc = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgLifestyle";
38          } else if ($section == "knjiznica") {          } else if ($section == "knjiznica") {
39                  $section_name = "Knjižnica";                  $section_name = "Knjižnica";
40                  $mnu = "inc/menuKnjiznica.php";                  $mnu = "inc/menuKnjiznica.php";
41                  $inc = "inc/pgKnjiznica".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgKnjiznica";
42          }          }
         if ($section_name) array_push($PATH, MyUpper($section_name));  
         if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name));  
43          if ($mnu && file_exists($mnu)) {          if ($mnu && file_exists($mnu)) {
44                  include_once($mnu);                  include_once($mnu);
45                  include_once("inc/menu.php");                  include_once("inc/menu.php");
46                    $inc = $inc.($section_menu?"-$section_menu":"").".php";
47          }          }
48            if ($section_name) array_push($PATH, MyUpper($section_name));
49            if ($section_menu_name) array_push($PATH, MyUpper($section_menu_name));
50          if ($inc && file_exists($inc)) include_once($inc);          if ($inc && file_exists($inc)) include_once($inc);
51          $tpl->assign("isedit", $isEdit);          $tpl->assign("isedit", $isEdit);
52          $tpl->assign("ismed", $isMed);          $tpl->assign("ismed", $isMed);
# Line 50  Line 54 
54          $tpl->assign("newspicdir", "$picdir/");          $tpl->assign("newspicdir", "$picdir/");
55          $tpl->assign("section", $section);          $tpl->assign("section", $section);
56          $tpl->assign("section_menu", $section_menu);          $tpl->assign("section_menu", $section_menu);
57          if ($fname) $main = $tpl->fetch($fname);          $main = $fname ? $tpl->fetch($fname) : "";
58          $tpl->assign("MAIN", $main);          $tpl->assign("MAIN", $main);
59          $tpl->assign("onload", $onload);          $tpl->assign("onload", $onload);
60          $tpl->display("index.tpl");          $tpl->display($main_template);
61  ?>  ?>

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26