--- fine_chemicals.php 2001/03/03 12:56:33 1.3 +++ fine_chemicals.php 2001/09/07 14:15:03 1.6 @@ -37,19 +37,35 @@ } $main_file="./fc/"; -if (file_exists($main_file.$part.".htm")) { +if ($part=="ContactUs") { + $sth = $dbh->prepare("select name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is not true order by num"); + $sth->execute(); + while ($row=$sth->fetchrow_hash()) { + $person[]=$row; + } + + $sth = $dbh->prepare("select office,name,comment,addr1,addr2,email,tel,fax from fc_contact where is_office is true order by num"); + $sth->execute(); + while ($row=$sth->fetchrow_hash()) { + $office[]=$row; + } + $smarty->assign( array( person=>$person, office=>$office ) ); + $main=$smarty->fetch("fc_ContactUs.tpl"); + +} elseif (file_exists($main_file.$part.".htm")) { $main_file.=$part.".htm"; + $main=join('',file($main_file)); } else { $main_file.="Main.htm"; $title="Products : Fine Chemicals"; + $main=join('',file($main_file)); } -$main=join('',file($main_file)); include("common.inc"); unset($menu); -$sth = $dbh->prepare("select item,url,file from menu where section='fine' order by num"); +$sth = $dbh->prepare("select item,url,file from menu where section='fine' and visible order by num"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { $menu[]=$row;