Seatek 2006  
 
 
     
 
 
 
 
  Gioymar nuovo e usato  
 
Copyright © 2000 -2006 - MotoNautica Official Site - Motonautica Editrice S.r.l.; Tutti i diritti di proprietà letteraria e artistica riservati.  
 
   
<% dim ncond dim wh sub EseguiRicerca pagereq = Request.QueryString("page") wh = Request.QueryString("wh") if wh = "" then model = request.Form("model") categ = request.Form("categ") ncond = 0 Call MakeQUERY(ncond, wh, model, "txtric", "LIKE") if (categ="16.00") then Call MakeQUERYVal(ncond, wh, "16", "categoria", "=") else Call MakeQUERYVal(ncond, wh, categ, "categoria", "<=") end if 'Response.Write (wh) Response.Write (" ") end if if wh <> "" then SQL= "SELECT * from [annunci]" sql = sql + " WHERE " + wh + " order by categoria, txtric " MAX_ON_PAGE = 10 set dbconnection=server.CreateObject ("ADODB.Connection") dbConnection.connectionstring = Session("DBAnnunci") dbconnection.open set rs=server.CreateObject ("ADODB.Recordset") rs.PageSize = MAX_ON_PAGE rs.Open SQL , dbconnection,3,1 if pagereq <>0 then rs.absolutepage = pagereq end if txtUsr="N° di inserzioni che soddifano la vostra ricerca : " Response.write("
" & txtUsr & rs.RecordCount & "
") call PageNavBar (rs.PageCount ) 'a = "" 'a = a + "" 'Response.write ( a ) ct=0 Do Until rs.EOF ct = ct+1 if (ct mod 2) = 0 then '** Riga pari else '** Riga dispari end if txtout = rs.fields ("Testo") xp = instr (1, txtout, ";" ) xv = instr (1, txtout, "," ) if xv<>0 then if xv < xp then xp = xv end if end if ' ** debug** Response.Write ("
" & xv & " -- " & xp & "
") if xp<>0 then txt1 = mid(txtout,1,xp) txt2 = mid(txtout,xp+1) res=txt1 + "" +txt2+"

" else if xv<>0 then txt1 = mid(txtout,1,xv) txt2 = mid(txtout,xv+1) res=txt1 + "" +txt2+"

" else txt1 ="" txt2 =txtout res= txt2 + "

" end if end if Response.write ( "" + "

FINO A "+cstr(rs.fields ("Categoria"))+" mt.
" ) Response.write ( "" +res ) '

Boston Whaler 22 Revenge: 1980, mt. 6.79, 1x200 ' hp Johnson fb del 2000, gps, eco, stereo, vhf , Euro 26.000,00; tel. 0421/91616 '

ctrec=ctrec+1 rs.MoveNext if ctrec = MAX_ON_PAGE then exit do end if Loop dbConnection.Close end if end sub '(esegui ricerca) sub PageNavBar (pagecount) Response.Write ("
  Pagine : ") for pag = 1 to pagecount action=" ") Response.write (pag) Response.Write (" | " + chr(13)) if pag=100 then exit for end if next Response.Write ("

") end sub ' Costruisce la Query per il filtro Sub MakeQUERY( m_ncond , _ m_wh , _ qTXT , _ bFieldSpec , _ sqloper ) Dim whtemp dim out_ncond dim out_wh whtemp = "" If qTXT <> "" Then if ucase(sqloper)="LIKE" then whtemp = "(" + bFieldSpec + " " + sqloper + "'%" + qTXT + "%' )" else whtemp = "(" + bFieldSpec + " " + sqloper + "'" + qTXT + "')" end if If m_ncond = 0 Then m_wh = m_wh & whtemp Else m_wh = m_wh & " and " & whtemp End If m_ncond = m_ncond + 1 out_ncond=m_ncond out_wh=m_wh End If End Sub Sub MakeQUERYVal( m_ncond , _ m_wh , _ qTXT , _ bFieldSpec , _ sqloper ) Dim whtemp dim out_ncond dim out_wh whtemp = "" If qTXT <> "" Then whtemp = "(" + bFieldSpec + " " + sqloper + qTXT + ")" If m_ncond = 0 Then m_wh = m_wh & whtemp Else m_wh = m_wh & " and " & whtemp End If m_ncond = m_ncond + 1 out_ncond=m_ncond out_wh=m_wh End If End Sub ' Costruisce la Query per il filtro Sub MakeBoolQUERY( m_ncond , _ m_wh , _ m_bool , _ bFieldSpec ) Dim whtemp dim booltxt dim out_ncond dim out_wh if m_bool then whtemp = " ( " + bFieldSpec + " ) " else whtemp = " ( NOT " + bFieldSpec + " ) " end if If m_ncond = 0 Then m_wh = m_wh & whtemp Else m_wh = m_wh & " and " & whtemp End If m_ncond = m_ncond + 1 out_ncond = m_ncond out_wh = m_wh End Sub %>