 |
<%
Dim dcnDB 'As ADODB.connection
Dim recordset 'As ADODB.Recordset
Dim numero, produit, village, nom, qualite, persmini, persmaxi, telephone, fax, email, site, SQL, SQL2, Nmax, Ncur, Ndeb, Npag 'As ADODB.String
Set dcnDB = server.createObject("ADODB.Connection")
dcnDB.Open "eq37848"
village="Ouzous"
produit="meuble"
set recordset = server.createObject("ADODB.Recordset")
SQL = "SELECT * from liste where (village='"&village&"') and (produit='"&produit&"') order by nom"
recordset.Open SQL, dcnDB, 3, 3
if recordset.eof = true then%>
Il n'existe aucun meublé de tourisme à Ouzous
<%else%>
<%
Nmax = 5 ' nombre par page
Ncur = 0 ' n° de la fiche courante
Ndeb = 0 ' 1ère fiche transmise par l'URL
if request.queryString("num")<>"" then _
Ndeb = Cint(request.queryString("num"))%>
<%while not recordset.eof and Ncur= Ndeb then%>
<%=recordset("nom")%>
<% qualite = recordset("qualite")
if qualite <> "" then%>
<%if qualite = "3epis" then%>
  <%end if%>
<%if qualite = "2epis" then%>

<%end if%>
<%if qualite = "1epi" then%>
<%end if%>
<%if qualite = "***" then%>
***
<%end if%>
<%if qualite = "**" then%>
**
<%end if%>
<%if qualite = "*" then%>
*
<%end if%>
<%if qualite = "3cles*" then%>
<%end if%>
<%if qualite = "2cles" then%>
<%end if%>
<%if qualite = "1cle" then%>
<%end if%>
<%else%>
- non classé
<%end if%>
village : <%=recordset("village")%>
Téléphone : <%=recordset("telephone")%> - Fax : <%=recordset("fax")%>
<% if recordset("email") <> "" then%>
"><%=recordset("email")%>
<%else%>
Pas d'email
<%end if%>
-
<% if recordset("site") <> "" then%>
" target="_blank">Site
<%else%>
Pas de site web
<%end if%>

<%end if%>
<%' fiche suivante
recordset.movenext
' une de plus
Ncur = Ncur + 1
wend%>
|
<% ' Navigation Des fiches avant ?%>
|
<% ' N° des pages
Npag = int(recordset.recordCount/Nmax)
if Npag < recordset.recordCount/Nmax then Npag = Npag + 1
for i = 1 to Npag
' Page courante ?
if Ndeb = (i-1)*Nmax then%>
<%=i%>
<%else%>
<%=i%>
<%end if%>
<%next%>
|
<%end if%>
<%recordset.Close
set recordset = nothing
dcnDB.Close
Set dcnDB = nothing
%>
|
 |