.gif" width="742" height="10">
query(" SELECT cat.nome, cat.id as idcategoria, subcat.nome as subcat, subcat.id, subcat.idcat FROM cat LEFT OUTER JOIN subcat ON (cat.id=subcat.idcat) ORDER BY cat.nome, subcat.nome "); $old = ""; $menu = "Elenco Categorie:
    "; while($row = $sql->fetch()) { if($old != $row['nome']) { $old = $row['nome']; if($row['idcategoria'] == $_REQUEST['idcat']) { $menu .= << {$row['nome']}
    EOF ; } else { $menu .= << {$row['nome']}
    EOF ; } } if($row['subcat'] != "") { if($row['id'] == $_REQUEST['subcat']) { $menu .= <<{$row['subcat']}
    EOF ; } else { $menu .= <<{$row['subcat']}
    EOF ; } } } $menu .= "
"; //End 01/08/2005 $query = "select * from prodotti where id>0"; if($_REQUEST['idcat'] != "" && $_REQUEST['idcat'] != "all") { $query .= " AND cat =" . intval($_REQUEST['idcat']); if($_REQUEST['subcat'] != "" && $_REQUEST['subcat'] != "***") { $query .= " And subcat = " . intval($_REQUEST['subcat']); } } if($_GET['cat'] == "new") { $query .= " and nuovo = 1"; } else { $query .= " and nuovo = 0"; } $query .= " order by titolo asc"; $sql->query($query); if($sql->num_rows() == 0) { echo("Nessun prodotto corrisponde ai parametri di ricerca"); } else { echo(<<
$menu Elenco Prodotti:
    EOF ); while($row = $sql->fetch()) { extract($row); print(<<$titolo
    EOF ); } } ?>


  ATC ASSISTENZA TECNICA CARRELLI s.n.c. di Lazzarotto S.& C. Via Borlinetto, 4 - 35100 Padova (Pd)
Tel. +39 049/8987188 - Fax +39 049/8987202 - E-mail: info@atcsnc.it
  SEDE OPERATIVA Via Piccà Grolli, 2 Bis (ang. Via Industria) - 35030 Rubano (Pd)
Tel. +39 049/8987188 - Fax +39 049/8987202