<% Dim strID strID =Request.Querystring("CatID") If strID=0 then Response.write "

Cette page n'est pas valide.

" Response.write "[Aller à la page des produits] " Response.End Else End IF %> Application automobile en asp
  >> PRODUITS
<% dim adoCn dim strSQL set adoCn = Server.CreateObject("ADODB.Connection") adoCn.Open strConn if Request.QueryString("action")="del" then strSQL = "DELETE FROM Images where ImageID=" & Request.QueryString("ImageID") adoCn.Execute strSQL end if dim adoRs set adoRs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT * FROM Images WHERE CatID = '" & Request.QueryString("CatID") & "' ORDER BY ImageID;" %> <% adoRs.Open strSQL, adoCn, 3, 1, &H0001 %> <% Dim ShowPage ShowPage = CInt(Request.QueryString("ShowPage")) Dim PageSize ' nombre de produits a afficher sur la page If Request.QueryString("HideDesc")="HideDesc" Then PageSize = 50 Else PageSize = 4 End IF adoRs.PageSize = PageSize Dim NumOfPages NumOfPages = adoRs.PageCount If ShowPage < 1 then ShowPage = 1 ElseIf ShowPage > NumOfPages Then ShowPage = NumOfPages End If %> <% Do While Not adoRs.EOF and not i = PageSize %>
             
<% i = i + 1 adoRs.MoveNext Loop%>
<% Response.write "" Response.write "" Response.write "" Response.write "
" 'Dim j for j=1 to NumOfPages if j=1 then Response.Write "Première Page" end if Next Response.write "" Dim n for n=1 to NumOfPages if n=ShowPage then if not ShowPage=1 then Response.Write " <<<  " ELse Response.Write " <<  " End if end if Next Dim k for k=1 to NumOfPages if k=ShowPage then Response.Write "" & k & " " else Response.Write "" & k & " " end if Next Dim m for m=1 to NumOfPages if m=ShowPage then if not ShowPage=NumOfPages then Response.Write " >>> " ELse Response.Write " >>  " End if end if Next Response.write "" Dim l for l=1 to NumOfPages if l=NumOfPages then Response.Write "Dernière Page" end if Next Response.write "
" %>
<% Dim TotalRecords TotalRecords= adoRs.RecordCount if TotalRecords=0 then Response.Write "Il n'y a aucun produit dans cette catégorie

Retour aux catégories" else response.Write "Il y a " &TotalRecords & " produit(s) dans " & NumOfPages& " page(s) " end if%>
<% adoRs.Close set adoRs = nothing adoCn.Close set adoCn = nothing %>