15 |
|
|
16 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
17 |
|
|
18 |
$sth = $dbh->prepare("select distinct type from products"); |
$sth = $dbh->prepare("select type,description from prod_type"); |
19 |
$sth->execute(); |
$sth->execute(); |
20 |
$types[]="any"; |
$types[]="any"; |
21 |
while ($row=$sth->fetchrow_array()) { |
while ($row=$sth->fetchrow_array()) { |
22 |
$types[]=$row[0]; |
$types[]=$row[0]; |
23 |
|
$type_desc[]=$row[1]; |
24 |
} |
} |
25 |
$smarty->assign("types",$types); |
$smarty->assign(array( |
26 |
|
types=>$types, |
27 |
|
type_desc=>$type_desc |
28 |
|
)); |
29 |
|
|
30 |
$sql_where=""; |
$sql_where=""; |
31 |
|
|
50 |
|
|
51 |
if (isset($search)) { |
if (isset($search)) { |
52 |
|
|
53 |
$sth = $dbh->prepare("select distinct brand,form,generic,description,type,atc,town,smpc,have_smpc from products $sql_where"); |
$sth = $dbh->prepare("select distinct brand,form,generic,description,type,atc,town,smpc,have_smpc from products $sql_where order by brand asc"); |
54 |
$sth->execute(); |
$sth->execute(); |
55 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
56 |
$data[]=$row; |
$data[]=$row; |