/[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.4 by ravilov, Mon Aug 27 09:17:40 2001 UTC revision 1.10 by ravilov, Fri Sep 7 15:07:17 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          $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;          $syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir;
6          include_once("inc/Smarty.class.php");          include_once("inc/Smarty.class.php");
7          include_once("inc/Smarty.local.php");          include_once("inc/Smarty.local.php");
8          $onload = "";          $onload = "";
9          $tpl = new Smarty();          $tpl = new Smarty();
10          if (!$section) {          $ns4 = strstr($HTTP_USER_AGENT, 'Mozilla/4.7') ? true : false;
11                  header("Location: $PHP_SELF?section=home");          $tpl->assign("ns4", $ns4);
12                  exit;          if (!$section) $section = "home";
13          }          $main_template = "index.tpl";
14          $fname = "$section.tpl";          $fname = "$section.tpl";
15          $section_name = "";          $section_name = "";
16          $inc = "";          $inc = $mnu = "";
17            $PATH = array("PLIVAHEALTH.COM");
18          if ($section == "home") {          if ($section == "home") {
19                  $section_name = "Home";                  $section_name = "Home";
20                  include_once("inc/menuHome.php");                  $mnu = "inc/menuHome.php";
21                  $inc = "inc/pgHome".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgHome";
22          } else if ($section == "ds") {          } else if ($section == "bolesti") {
23                  $section_name = "Disease &amp; Symptomes";                  $section_name = "Bolesti";
24                  include_once("inc/menuDS.php");                  $mnu = "inc/menuBolesti.php";
25                  $inc = "inc/pgDS".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgBolesti";
26          } else if ($section == "conditions") {          } else if ($section == "simptomi") {
27                  $section_name = "Conditions";                  $section_name = "Simptomi";
28                  include_once("inc/menuConditions.php");                  $mnu = "inc/menuSimptomi.php";
29                  $inc = "inc/pgConditions".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgSimptomi";
30            } else if ($section == "stanja") {
31                    $section_name = "Stanja";
32                    $mnu = "inc/menuStanja.php";
33                    $inc = "inc/pgStanja";
34          } else if ($section == "lifestyle") {          } else if ($section == "lifestyle") {
35                  $section_name = "Lifestyle";                  $section_name = "Lifestyle";
36                  include_once("inc/menuLifestyle.php");                  $mnu = "inc/menuLifestyle.php";
37                  $inc = "inc/pgLifestyle".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgLifestyle";
38          } else if ($section == "library") {          } else if ($section == "knjiznica") {
39                  $section_name = "Library";                  $section_name = "Knjižnica";
40                  include_once("inc/menuLibrary.php");                  $mnu = "inc/menuKnjiznica.php";
41                  $inc = "inc/pgLibrary".($section_menu?"-$section_menu":"").".php";                  $inc = "inc/pgKnjiznica";
42            }
43            if ($mnu && file_exists($mnu)) {
44                    include_once($mnu);
45                    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);
53            $tpl->assign("PATH", $PATH);
54          $tpl->assign("newspicdir", "$picdir/");          $tpl->assign("newspicdir", "$picdir/");
55          $tpl->assign("section", $section);          $tpl->assign("section", $section);
         $tpl->assign("section_name", strtoupper($section_name));  
56          $tpl->assign("section_menu", $section_menu);          $tpl->assign("section_menu", $section_menu);
57          $tpl->assign("section_menu_name", strtoupper($section_menu_name));          $main = $fname ? $tpl->fetch($fname) : "";
         if ($fname) $main = $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.4  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26