/[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.1.1.1 by dpavlin, Tue Feb 20 12:16:35 2001 UTC revision 1.8 by dpavlin, Mon Oct 1 14:05:16 2001 UTC
# Line 6  $smarty = new Smarty; Line 6  $smarty = new Smarty;
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    
# Line 46  if ($sql_where != "") { Line 47  if ($sql_where != "") {
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;
# Line 63  if (isset($search)) { Line 65  if (isset($search)) {
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  ?>  ?>

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.26