--- smpc.php 2001/02/19 16:22:20 1.1 +++ smpc.php 2001/10/01 14:05:16 1.4 @@ -8,15 +8,17 @@ $section="products"; -$title="Products : SMPC"; -$lpic="products"; $lext=".jpg"; -$mpic="products.gif"; -$back_url="products.php"; +include("section.inc"); -$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); +$title.=" : SMPC"; +$back_url="products.php"; if (isset($smpc)) { + $sth = $dbh->prepare("select brand,form from products where smpc=$smpc"); + $sth->execute(); + if ($row=$sth->fetchrow_hash()) $title.=" : $row[brand] $row[form]"; + $sth = $dbh->prepare("select section,title,body from sections,paragraphs where smpc=$smpc and sections.id=section_id and section<=5.2 @@ -29,10 +31,12 @@ $smarty->assign("smpc",$data); } +$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); + $main=$smarty->fetch("smpc.tpl"); include("common.inc"); -$smarty->assign( array(back_url=>$back_url, MAIN=>$main)); +$smarty->assign( array(back_url=>$back_url, contact_from=>"human_health", MAIN=>$main)); $smarty->display("index.tpl"); ?>