--- fine_chemicals.php 2001/02/22 20:47:10 1.1 +++ fine_chemicals.php 2001/09/18 10:26:46 1.8 @@ -13,36 +13,67 @@ $section="products"; -$title="Products : Fine Chemicals"; +if ($menu_item) { + $title="Products : Fine Chemicals : $menu_item"; +} else { + $title="Products : Fine Chemicals"; +} $lpic="products"; $lext=".jpg"; $mpic="products.gif"; $back_url="products.php"; -$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); +$sub_part=substr($part,0,strpos($part,"-")); +if ($sub_part == "CustomManuf") { + $multi_page=array( + "fine_chemicals.php?part=CustomManuf-Page1", + "fine_chemicals.php?part=CustomManuf-Page2", + "fine_chemicals.php?part=CustomManuf-Page3", + "fine_chemicals.php?part=CustomManuf-Page4", + "fine_chemicals.php?part=CustomManuf-Page5", + ); +} +$main_file="./fc/"; +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"); -$multi_page=array( - "fine_chemicals.php?part=Main", - "fine_chemicals.php?part=Profile", - "fine_chemicals.php?part=Products", - "fine_chemicals.php?part=CustomManuf-Page1", - "fine_chemicals.php?part=CustomManuf-Page2", - "fine_chemicals.php?part=CustomManuf-Page3", - "fine_chemicals.php?part=CustomManuf-Page4", - "fine_chemicals.php?part=CustomManuf-Page5", - "fine_chemicals.php?part=ContactUs" -); + $title.=" : Contact Us"; -$main_file="./fc/"; -if (file_exists($main_file.$part.".htm")) { +} 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"); -$smarty->assign( array(back_url=>$back_url, MAIN=>$main)); + +unset($menu); + +$sth = $dbh->prepare("select item,url,file from menu where section='fine' and $visible_is_true order by num"); +$sth->execute(); +while ($row=$sth->fetchrow_hash()) { + $menu[]=$row; +} +$smarty->assign("menu",$menu); + +$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, + Section_title=>$title, back_url=>$back_url, MAIN=>$main, + contact_url => 'fine_chemicals.php?part=ContactUs')); $smarty->display("index.tpl"); ?>