Locali e Ristoranti

get_results ($qry1); $rs[1]['cnt']=count($rs[1]); } if ($rs[1] != null){ print $rs[1]['cnt'] . ” ristoranti a $citta
“; } if ($rs[1] != null){ showRistoranti($rs[1]); } }else{ $uri=$_SERVER['REQUEST_URI']; $myGet=split(‘/’, $uri); $ID=$myGet[2]; if ( is_numeric($ID)){ $strSQL=”select * from risto where ID=$ID”; $row=$wpdb->get_row($strSQL); $hotel=$row->nome; print “

” . $hotel . “

“; print “

” . $row->cap . ‘ ‘ . $row->citta . ‘ ‘ . $row->indir . ‘

‘; print ‘Telefono: ‘ . $row->tel . ‘
‘; print ‘

‘; $lat=$row->lat; $lon=$row->lon; print “
”; print ‘

‘; }else{ print “

“; ?>

get_results ($strSQL); showRistoranti($rows); } } function showRistoranti($rows){ print “

    “; foreach($rows as $row){ $tmpID=$row->id; if($row->nome!=”){ print ”

     

  • “; print ”

    ID . “\”>” . $row->nome . “

    “; print “” . $row->cap . ‘ ‘ . $row->citta . ‘ ‘ . $row->indir . ‘
    ‘; print “

  • “; } } print “

“; } ?>