function carrello1(){
$sql = $this->gestcarrello->query1("select * from  tb_acquisti join tb_prodotti
						on tb_acquisti.tb_acquisti_idprod = tb_prodotti.tb_prodotti_id
					where tb_acquisti_idutente = '$_SESSION[ses_idacq]' and tb_acquisti_qta > '0'									
					");
					$html = "<form name=\"form1\" method=\"post\" action=\"../Carrello/carrello1_upd.php \">
" ;
					
					$html .= "<table width=\"100%\" border=\"1\">
  					<tr>
    				<th>Codice</th>
    				<th>Descrizione</th>    	
					<th>Prezzo</th>
					<th>qta</th>
					<th>canc</th>
  					</tr>" ;
					while($righe = mysql_fetch_array($sql)) {
						$html .=  "<tr><td>$righe[tb_prodotti_codice]</td>" ;    
	$html .=  "<td><A href=\"#\" onClick=\"window.open ('../Prodotti/dettaglioprodotti.php?idprod=$righe[tb_prodotti_id];','',
	'top=10,left=10,width=500,height=400,scrollbars=ye  s');\">$righe[tb_prodotti_descr]</td></a>" ;    
	
  		if($righe['tb_prodotti_promoz'] == 0){
				$prezzo =  $righe['tb_prodotti_prezzo'] ; 
				$html .=  "<td>$prezzo</td>" ;
	 		}else{
				$t = (($righe['tb_prodotti_prezzo'] - ($righe['tb_prodotti_prezzo'] * $righe['tb_prodotti_promoz']) 
				/ 100)) ;
				$prezzoscont = number_format($t,2) ;
				$prezzo =  $prezzoscont." "."scontato del"." "."$righe[tb_prodotti_promoz]"  ;
				$html .=  "<td>$prezzo</td>" ;
		}
	$html .=  "<td><input size=\"5\" type=\"text\" name=\"qta[$righe[tb_prodotti_id]]\" value=\"$righe[tb_acquisti_qta]\"></td>" ;    
	$html .="<td width=\"5%\"><input size=\"5\" type=\"checkbox\" name=\"canc[$righe[tb_prodotti_id]]\"></td></tr>" ;
		$t = (($righe['tb_prodotti_prezzo'] - ($righe['tb_prodotti_prezzo'] * $righe['tb_prodotti_promoz']) 
		/ 100)) ;
		//$tot = $righe['tb_prodotti_prezzo'] * $righe['tb_acquisti_qta'] ;
		$tot = $t * $righe['tb_acquisti_qta'] ;
		$totale += $tot ; 
		$totale1 = number_format($totale,2) ;
		$pezzi += $righe['tb_acquisti_qta'] ;
		
	
 } //fine ciclo while
	$html .= " </table>" ;
	$html .= "<input name=\"Aggiorna\" type=\"submit\" value=\"Aggiorna\" >" ;
  
	$html .= "<a href=\"../Carrello/carrello2_cassa.php\"><img src=\"../Immagini/imm.png\" border=\"0\" alt=\"Vai alla Cassa\"></a>"."
" ;
	$html .= " </form>" ;
	return $html ;				
}