--- smpc.php 2001/02/19 16:22:20 1.1 +++ smpc.php 2001/03/03 12:56:33 1.2 @@ -13,10 +13,12 @@ $mpic="products.gif"; $back_url="products.php"; -$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); - 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,6 +31,8 @@ $smarty->assign("smpc",$data); } +$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); + $main=$smarty->fetch("smpc.tpl"); include("common.inc");