/[corp_html]/human_health.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /human_health.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Sat Mar 3 09:27:38 2001 UTC revision 1.7 by dpavlin, Mon Mar 12 23:41:49 2001 UTC
# Line 15  $back_url="products.php"; Line 15  $back_url="products.php";
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    $type_desc[]="any";
22  while ($row=$sth->fetchrow_array()) {  while ($row=$sth->fetchrow_array()) {
23          $types[]=$row[0];          $types[]=$row[0];
24            $type_desc[]=$row[1];
25  }  }
26  $smarty->assign("types",$types);  $smarty->assign(array(
27            types=>$types,
28            type_desc=>$type_desc
29            ));
30    
31  $sql_where="";  $sql_where="";
32    
# Line 46  if ($sql_where != "") { Line 51  if ($sql_where != "") {
51    
52  if (isset($search)) {  if (isset($search)) {
53    
54          $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";
55            $sth = $dbh->prepare("$sql");
56          $sth->execute();          $sth->execute();
57          while ($row=$sth->fetchrow_hash()) {          while ($row=$sth->fetchrow_hash()) {
58                  $data[]=$row;                  $data[]=$row;
# Line 69  $smarty->assign( array(type=>"$type", Line 75  $smarty->assign( array(type=>"$type",
75  $main=$smarty->fetch("human_health.tpl");  $main=$smarty->fetch("human_health.tpl");
76    
77  include("common.inc");  include("common.inc");
78  $smarty->assign( array(back_url=>$back_url, MAIN=>$main));  $smarty->assign( array(back_url=>$back_url, MAIN=>$main, self=>$PHP_SELF));
79    
80  $smarty->display("index.tpl");  $smarty->display("index.tpl");
81  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26