1 |
ravilov |
1.1 |
<?php |
2 |
|
|
include_once("inc/global.php"); |
3 |
|
|
$picdir = dirname($PHP_SELF)."/img/news"; |
4 |
|
|
$syspicdir = $HTTP_SERVER_VARS["DOCUMENT_ROOT"].$picdir; |
5 |
|
|
include_once("inc/Smarty.class.php"); |
6 |
|
|
include_once("inc/Smarty.local.php"); |
7 |
|
|
$fname = ""; |
8 |
|
|
$onload = ""; |
9 |
|
|
$tpl = new Smarty(); |
10 |
|
|
if (!$section) { |
11 |
|
|
header("Location: $PHP_SELF?section=home"); |
12 |
|
|
exit; |
13 |
|
|
} |
14 |
|
|
$section_name = ""; |
15 |
|
|
if ($section == "home") { |
16 |
|
|
$section_name = "HOME"; |
17 |
|
|
include_once("inc/pgHome.php"); |
18 |
|
|
} else if ($section == "d_s") { |
19 |
|
|
$section_name = "DISEASE & SYMPTOMES"; |
20 |
|
|
} else if ($section == "conditions") { |
21 |
|
|
$section_name = "CONDITIONS"; |
22 |
|
|
include_once("inc/pgConditions.php"); |
23 |
|
|
} else if ($section == "lifestyle") { |
24 |
|
|
$section_name = "LIFESTYLE"; |
25 |
|
|
include_once("inc/pgLifestyle.php"); |
26 |
|
|
} else if ($section == "library") { |
27 |
|
|
$section_name = "LIBRARY"; |
28 |
ravilov |
1.2 |
include_once("inc/pgLibrary.php"); |
29 |
ravilov |
1.1 |
} |
30 |
|
|
$tpl->assign("section", $section); |
31 |
|
|
$tpl->assign("section_name", $section_name); |
32 |
|
|
$tpl->assign("newspicdir", "$picdir/"); |
33 |
|
|
if (!$fname) $fname = "$section.tpl"; |
34 |
|
|
if ($section_name) $main = $tpl->fetch($fname); |
35 |
|
|
$tpl->assign("MAIN", $main); |
36 |
|
|
$tpl->assign("onload", $onload); |
37 |
|
|
$tpl->display("index.tpl"); |
38 |
|
|
?> |