--- fine_chemicals.php 2001/02/22 20:47:10 1.1 +++ fine_chemicals.php 2001/06/28 11:35:20 1.4 @@ -13,7 +13,11 @@ $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"; @@ -21,28 +25,39 @@ $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); -$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" -); +$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 (file_exists($main_file.$part.".htm")) { $main_file.=$part.".htm"; } else { $main_file.="Main.htm"; + $title="Products : Fine Chemicals"; } $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 order by num"); +$sth->execute(); +while ($row=$sth->fetchrow_hash()) { + $menu[]=$row; +} +$smarty->assign("menu",$menu); + +$smarty->assign( array(back_url=>$back_url, MAIN=>$main, + contact_url => 'fine_chemicals.php?part=ContactUs')); $smarty->display("index.tpl"); ?>