--- fine_chemicals.php 2001/02/22 20:47:10 1.1 +++ fine_chemicals.php 2001/02/23 13:56:07 1.2 @@ -21,17 +21,16 @@ $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")) { @@ -42,7 +41,18 @@ $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' 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"); ?>