1 |
ravilov |
1.1 |
<?php |
2 |
|
|
require("Smarty.class.php"); |
3 |
|
|
require("conn.inc"); |
4 |
|
|
|
5 |
|
|
$smarty = new Smarty; |
6 |
|
|
|
7 |
|
|
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
8 |
|
|
|
9 |
|
|
$section=str_replace(".php","",basename($PHP_SELF)); |
10 |
|
|
$smarty->assign("section",$section); |
11 |
|
|
|
12 |
|
|
$main_file=$section; |
13 |
|
|
|
14 |
|
|
require("inc/section.php"); |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
$smarty->assign("r1link", "#"); |
18 |
|
|
$smarty->assign("r1pic", "bisolex.jpg"); |
19 |
|
|
$smarty->assign("r2link", "#"); |
20 |
|
|
$smarty->assign("r2pic", "andol1.jpg"); |
21 |
|
|
|
22 |
|
|
include("common.inc"); |
23 |
|
|
|
24 |
dpavlin |
1.3 |
include("find_html_file.inc"); |
25 |
|
|
|
26 |
|
|
if (isset($h) && file_exists(find_html_file("h/$section",$h))) { |
27 |
|
|
$main=join('',file(find_html_file("h/$section",$h))); |
28 |
|
|
if ($menu_item) { |
29 |
|
|
$title.=" : $menu_item"; |
30 |
|
|
} |
31 |
|
|
} elseif (file_exists("template/$main_file.tpl")) { |
32 |
|
|
$main=$smarty->fetch("$main_file.tpl"); |
33 |
|
|
} elseif (find_html_file("h",$section)) { |
34 |
|
|
$main=join('',file(find_html_file("h",$section))); |
35 |
|
|
} else { |
36 |
|
|
$main="<b>can't find template or html file for section $section</b>"; |
37 |
|
|
} |
38 |
|
|
$smarty->assign(array(section=>$section, |
39 |
|
|
mpic=>$mpic, |
40 |
|
|
Section_title=>$title, |
41 |
|
|
rnd=>$rnd, |
42 |
|
|
MAIN=>$main, |
43 |
|
|
)); |
44 |
ravilov |
1.1 |
|
45 |
|
|
$smarty->display("index.tpl"); |
46 |
|
|
?> |