<%
PaginaActual=Request("PaginaActual")
Mensaje="
No Tours available.
|
"
if PaginaActual="" then PaginaActual=1
On Error Resume Next
Set Cnn=Server.CreateObject("ADODB.Connection")
Set Rss=Server.CreateObject("ADODB.Recordset")
Cnn.Open "DSN_marili"
Rss.CursorType = 3
Rss.PageSize = 6
'Cnn.Mode=2
SQL="SELECT * from Tour WHERE Idioma='E' "
if Request("cboDestino")<>"" then
cboDestino = Request("cboDestino")
SQL=SQL & " AND Destino='" & cboDestino & "'"
Mensaje="
| We are sorry, Your search did not match any documents. |
"
end if
if Request("cboTipo")<>"" then
cboTipo = Request("cboTipo")
SQL = SQL & " AND (CodTipo1 ='" & cboTipo & "' OR CodTipo2 = '" & cboTipo & "')"
Mensaje="
| We are sorry, Your search did not match any documents. |
"
end if
SQL=SQL & " ORDER BY Preferencial ASC"
Rss.Open SQL,Cnn,3
if Not Rss.EOF then Rss.AbsolutePage = CInt(PaginaActual) end if
RowCount=0
if Err.number=0 then
%>
| Total: <%=Rss.RecordCount%> Tours |
<%if Rss.RecordCount < 1 then Response.Write(Mensaje) end if%>
<%while Not Rss.EOF and RowCount < Rss.PageSize%>
| |
|
|
|
|
|
<%RowCount = RowCount + 1%>
<%Rss.MoveNext%>
<%if Not Rss.EOF then%>
|
|
<%RowCount = RowCount + 1%>
<%Rss.MoveNext%>
<%else%>
|
<%end if%>
<%Wend%>
| |
|
|
|
|
<%if Rss.RecordCount > 6 then
Response.Write "Others Tours: "
For i = 1 to Rss.PageCount
if i=CInt(PaginaActual) then
Response.Write(i)
else%>
<%=i%>
<%end if
Next
end if
%>
|
<%else%>
<%=Response.Write(Mensaje)%>
<%end if%>