1 |
dpavlin |
1.1 |
<?php |
2 |
|
|
|
3 |
|
|
if ($QUERY_STRING == "") { |
4 |
|
|
Header("Location: $PHP_SELF?part=Main"); |
5 |
|
|
} |
6 |
|
|
|
7 |
|
|
require("Smarty.class.php"); |
8 |
|
|
require("conn.inc"); |
9 |
|
|
|
10 |
|
|
$smarty = new Smarty; |
11 |
|
|
|
12 |
|
|
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
13 |
|
|
|
14 |
|
|
$section="products"; |
15 |
|
|
|
16 |
dpavlin |
1.3 |
if ($menu_item) { |
17 |
|
|
$title="Products : Fine Chemicals : $menu_item"; |
18 |
|
|
} else { |
19 |
|
|
$title="Products : Fine Chemicals"; |
20 |
|
|
} |
21 |
dpavlin |
1.1 |
$lpic="products"; $lext=".jpg"; |
22 |
|
|
$mpic="products.gif"; |
23 |
|
|
$back_url="products.php"; |
24 |
|
|
|
25 |
dpavlin |
1.2 |
$sub_part=substr($part,0,strpos($part,"-")); |
26 |
|
|
if ($sub_part == "CustomManuf") { |
27 |
|
|
$multi_page=array( |
28 |
|
|
"fine_chemicals.php?part=CustomManuf-Page1", |
29 |
|
|
"fine_chemicals.php?part=CustomManuf-Page2", |
30 |
|
|
"fine_chemicals.php?part=CustomManuf-Page3", |
31 |
|
|
"fine_chemicals.php?part=CustomManuf-Page4", |
32 |
|
|
"fine_chemicals.php?part=CustomManuf-Page5", |
33 |
|
|
); |
34 |
|
|
} |
35 |
dpavlin |
1.1 |
|
36 |
|
|
$main_file="./fc/"; |
37 |
dpavlin |
1.5 |
if ($part=="ContactUs") { |
38 |
dpavlin |
1.6 |
$sth = $dbh->prepare("select name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is not true order by num"); |
39 |
dpavlin |
1.5 |
$sth->execute(); |
40 |
|
|
while ($row=$sth->fetchrow_hash()) { |
41 |
|
|
$person[]=$row; |
42 |
|
|
} |
43 |
|
|
|
44 |
|
|
$sth = $dbh->prepare("select office,name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is true order by num"); |
45 |
|
|
$sth->execute(); |
46 |
|
|
while ($row=$sth->fetchrow_hash()) { |
47 |
|
|
$office[]=$row; |
48 |
|
|
} |
49 |
|
|
$smarty->assign( array( person=>$person, office=>$office ) ); |
50 |
|
|
$main=$smarty->fetch("fc_ContactUs.tpl"); |
51 |
|
|
|
52 |
dpavlin |
1.7 |
$title.=" : Contact Us"; |
53 |
|
|
|
54 |
dpavlin |
1.5 |
} elseif (file_exists($main_file.$part.".htm")) { |
55 |
dpavlin |
1.1 |
$main_file.=$part.".htm"; |
56 |
dpavlin |
1.5 |
$main=join('',file($main_file)); |
57 |
dpavlin |
1.1 |
} else { |
58 |
|
|
$main_file.="Main.htm"; |
59 |
dpavlin |
1.3 |
$title="Products : Fine Chemicals"; |
60 |
dpavlin |
1.5 |
$main=join('',file($main_file)); |
61 |
dpavlin |
1.1 |
} |
62 |
|
|
|
63 |
|
|
include("common.inc"); |
64 |
dpavlin |
1.2 |
|
65 |
|
|
unset($menu); |
66 |
|
|
|
67 |
dpavlin |
1.8 |
$sth = $dbh->prepare("select item,url,file from menu where section='fine' and $visible_is_true order by num"); |
68 |
dpavlin |
1.2 |
$sth->execute(); |
69 |
|
|
while ($row=$sth->fetchrow_hash()) { |
70 |
|
|
$menu[]=$row; |
71 |
|
|
} |
72 |
|
|
$smarty->assign("menu",$menu); |
73 |
|
|
|
74 |
dpavlin |
1.7 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, |
75 |
|
|
Section_title=>$title, back_url=>$back_url, MAIN=>$main, |
76 |
|
|
contact_url => 'fine_chemicals.php?part=ContactUs')); |
77 |
dpavlin |
1.1 |
|
78 |
|
|
$smarty->display("index.tpl"); |
79 |
|
|
?> |