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 |
include("section.inc"); |
16 |
$back_url="products.php"; |
17 |
|
18 |
$sub_part=substr($part,0,strpos($part,"-")); |
19 |
if ($sub_part == "CustomManuf") { |
20 |
$multi_page=array( |
21 |
"fine_chemicals.php?part=CustomManuf-Page1", |
22 |
"fine_chemicals.php?part=CustomManuf-Page2", |
23 |
"fine_chemicals.php?part=CustomManuf-Page3", |
24 |
"fine_chemicals.php?part=CustomManuf-Page4", |
25 |
"fine_chemicals.php?part=CustomManuf-Page5", |
26 |
); |
27 |
} |
28 |
|
29 |
$main_file="./fc/"; |
30 |
if ($part=="ContactUs") { |
31 |
$sth = $dbh->prepare("select name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is not true order by num"); |
32 |
$sth->execute(); |
33 |
while ($row=$sth->fetchrow_hash()) { |
34 |
$person[]=$row; |
35 |
} |
36 |
|
37 |
$sth = $dbh->prepare("select office,name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is true order by num"); |
38 |
$sth->execute(); |
39 |
while ($row=$sth->fetchrow_hash()) { |
40 |
$office[]=$row; |
41 |
} |
42 |
$smarty->assign( array( person=>$person, office=>$office ) ); |
43 |
$main=$smarty->fetch("fc_ContactUs.tpl"); |
44 |
|
45 |
$title.=" : Contact Us"; |
46 |
|
47 |
} elseif (file_exists($main_file.$part.".htm")) { |
48 |
$main_file.=$part.".htm"; |
49 |
$main=join('',file($main_file)); |
50 |
} else { |
51 |
$main_file.="Main.htm"; |
52 |
$title="Products : Fine Chemicals"; |
53 |
$main=join('',file($main_file)); |
54 |
} |
55 |
|
56 |
include("common.inc"); |
57 |
|
58 |
unset($menu); |
59 |
|
60 |
$sth = $dbh->prepare("select item,url,file from menu where section='fine' and $visible_is_true order by num"); |
61 |
$sth->execute(); |
62 |
while ($row=$sth->fetchrow_hash()) { |
63 |
$menu[]=$row; |
64 |
} |
65 |
$smarty->assign("menu",$menu); |
66 |
|
67 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, |
68 |
Section_title=>$title, back_url=>$back_url, MAIN=>$main, |
69 |
contact_url => 'fine_chemicals.php?part=ContactUs')); |
70 |
|
71 |
$smarty->display("index.tpl"); |
72 |
?> |