%
Dim GLOBAL_img_top, tipo, tipo2, titolo_pag, titolo_scheda, VAR_lingua
'Imposto lingua per recupero dati dal DB
'Valori ammessi: "_it" --> ITALIANO, "_en" --> INGLESE
VAR_lingua = "_en"
'Recupero INFO da URL (INIZIO)
tipo = TRIM( Request.QueryString("t") )
tipo2 = TRIM( Request.QueryString("t2") )
Select Case LCase( tipo )
Case "motore"
GLOBAL_img_top = "titolo_barche_motore_eng.gif"
titolo_pag = "MOTOR YACHTS"
tipo = "motore"
titolo_scheda = "MOTOR YACHTS"
SQLSelect = "SELECT * FROM barche WHERE visibile AND tipo='"& tipo &"' AND tipo2='"& tipo2 &"' ORDER BY lunghezza"& VAR_lingua &" DESC"
Case "vela"
GLOBAL_img_top = "titolo_barche_vela_eng.gif"
titolo_pag = "SAILING YACHTS"
tipo = "vela"
titolo_scheda = "SAILING YACHTS"
SQLSelect = "SELECT * FROM barche WHERE visibile AND tipo='"& tipo &"' ORDER BY lunghezza"& VAR_lingua &" DESC"
Case Else
Set GLOBAL_img_top = Nothing
Set tipo = Nothing
Set tipo2 = Nothing
Set titolo_pag = Nothing
Set titolo_scheda = Nothing
Set VAR_lingua = Nothing
Response.Write("
")
Response.End()
End Select
'Recupero INFO da URL (FINE)
Dim SQLSelect, contaRighe, pg, colspan
Dim rs_campo1, rs_campo2, rs_campo3, rs_campo_ID, rs_campo_IMG
contaRighe = 0
'Estrazione PAGINA corrente
pg = TRIM( Request("pg") )
If pg = "" Then
pg = 1
End If
rs.ActiveConnection = conn
rs.CursorType = adOpenStatic
rs.PageSize = 5
%>
Nissim Yachts - <%=titolo_pag%>
>
|
 |
 |
 |
 |
 |
 |
 |
 |
OUR
SELECTED OFFERS |
 |
<%=titolo_scheda%> |
 |
 |
 |
 |
 |
 |
 |
|
|
<%
If (tipo = "vela") OR (tipo = "motore" AND tipo2 <> "") Then
%>
For more detailed features, click on the boat's model
<%
rs.Open SQLSelect, conn
If NOT rs.EOF Then
rs.AbsolutePage = Int(pg)
While NOT rs.EOF AND contaRighe < rs.PageSize
contaRighe = contaRighe + 1
rs_campo1 = rs("modello")
rs_campo2 = rs("anno"& VAR_lingua)
rs_campo3 = rs("lunghezza"& VAR_lingua)
If rs_campo2 = GLOBAL_nullo_C Then
rs_campo2 = "-"
End If
If rs_campo3 = GLOBAL_nullo_C Then
rs_campo3 = "-"
End If
rs_campo_IMG = rs("file1m")
rs_campo_ID = rs("id_barche")
%>
<%
If rs_campo_IMG <> GLOBAL_nullo_C Then
colspan = ""
%>
 |
<%
Else
colspan = " colspan=""2"""
End If
%>
>
|
<%
rs.MoveNext
If NOT rs.EOF Then 'Se NON è ultimo record, stampo separatore.
%>
|
<%
End If
Wend
%>
<%
If rs.PageCount > 1 Then
%>
| Page:
<%
For i = 1 to rs.PageCount
If i <> cINT(pg) Then
%>
<%=i%>
<%
Else
%>
<%=i%>
<%
End If
Next
%>
| |
<%
End If
%>
<%
Else
%>
| Sorry, no yachts for <%=titolo_scheda%> |
|
<%
End If
%>
<%
Else
%>
<%
End If
%>
|
|
|
|
|
|
|
<%
Set GLOBAL_img_top = Nothing
Set tipo = Nothing
Set tipo2 = Nothing
Set titolo_pag = Nothing
Set titolo_scheda = Nothing
Set VAR_lingua = Nothing
Set SQLSelect = Nothing
Set contaRighe = Nothing
Set pg = Nothing
Set colspan = Nothing
Set rs_campo1 = Nothing
Set rs_campo2 = Nothing
Set rs_campo3 = Nothing
Set rs_campo_ID = Nothing
Set rs_campo_IMG = Nothing
%>