6 |
|
|
7 |
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
8 |
|
|
9 |
$section="products"; |
include("section.inc"); |
|
|
|
|
$title="Products : Human Health"; |
|
|
$lpic="products"; $lext=".jpg"; |
|
|
$mpic="products.gif"; |
|
10 |
$back_url="products.php"; |
$back_url="products.php"; |
11 |
|
|
12 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
13 |
|
|
14 |
$sth = $dbh->prepare("select distinct type from products"); |
$sth = $dbh->prepare("select type,description from prod_type"); |
15 |
$sth->execute(); |
$sth->execute(); |
16 |
$types[]="any"; |
$types[]="any"; |
17 |
|
$type_desc[]="any"; |
18 |
while ($row=$sth->fetchrow_array()) { |
while ($row=$sth->fetchrow_array()) { |
19 |
$types[]=$row[0]; |
$types[]=$row[0]; |
20 |
|
$type_desc[]=$row[1]; |
21 |
} |
} |
22 |
$smarty->assign("types",$types); |
$smarty->assign(array( |
23 |
|
types=>$types, |
24 |
|
type_desc=>$type_desc |
25 |
|
)); |
26 |
|
|
27 |
$sql_where=""; |
$sql_where=""; |
28 |
|
|
47 |
|
|
48 |
if (isset($search)) { |
if (isset($search)) { |
49 |
|
|
50 |
$sth = $dbh->prepare("select distinct brand,form,generic,description,type,atc,town,smpc,have_smpc from products $sql_where"); |
$sql="select distinct brand,form,generic,description,type,atc,town,smpc,have_smpc,tm from products $sql_where order by brand asc"; |
51 |
|
$sth = $dbh->prepare("$sql"); |
52 |
$sth->execute(); |
$sth->execute(); |
53 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
54 |
$data[]=$row; |
$data[]=$row; |
65 |
$smarty->assign("search","all"); |
$smarty->assign("search","all"); |
66 |
} |
} |
67 |
|
|
68 |
$smarty->assign("type","$type"); |
$smarty->assign( array(type=>"$type", |
69 |
|
show_description=>$show_description |
70 |
|
)); |
71 |
$main=$smarty->fetch("human_health.tpl"); |
$main=$smarty->fetch("human_health.tpl"); |
72 |
|
|
73 |
include("common.inc"); |
include("common.inc"); |
74 |
$smarty->assign( array(back_url=>$back_url, MAIN=>$main)); |
$smarty->assign( array(back_url=>$back_url, MAIN=>$main, self=>$PHP_SELF)); |
75 |
|
|
76 |
$smarty->display("index.tpl"); |
$smarty->display("index.tpl"); |
77 |
?> |
?> |