<% if Request.QueryString("Active")="No" or Request.QueryString("Active")="" then Response.redirect("listeclient.asp?Active=Yes") End IF %>
<%If Request.QueryString("HideDesc")="HideDesc" Then %> <%Else%> <%End IF%>
<% 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 Active = '" & Request.QueryString("Active") & "' ORDER BY ImageID Desc;" %> <% adoRs.Open strSQL, adoCn, 3, 1, &H0001 %> <% If adoRs.RecordCount = 0 Then %>
<% IF Session("AccessLevel")= "Admin" or Session("AccessLevel")= "Author" Then%> [ Aucun produit ]

[ Ajouter un produit ] <% Else %> [ Aucune entrée ]

[ S'inscrire ]

[ Identification ]

<% End IF %>
<% Response.End Else End IF %> <% Dim ShowPage ShowPage = CInt(Request.QueryString("ShowPage")) Dim PageSize ' nombre de produits a afficher sur cette page If Request.QueryString("HideDesc")="HideDesc" Then PageSize = 20 Else PageSize = 5 End IF adoRs.PageSize = PageSize Dim NumOfPages NumOfPages = adoRs.PageCount If ShowPage < 1 then ShowPage = 1 ElseIf ShowPage > NumOfPages Then ShowPage = NumOfPages End If adoRs.AbsolutePage = ShowPage Dim i i = 0 %> <% Do While Not adoRs.EOF and not i = PageSize %>
<% i = i + 1 adoRs.MoveNext Loop%> <% If Request.QueryString("HideDesc")="HideDesc" Then %> <%PagingHideDescUserList()%> <%Else%> <%PagingUserList()%> <%End IF%>
<% Dim TotalRecords TotalRecords= adoRs.RecordCount response.Write "Il y a " &TotalRecords & " produit(s) dans " & NumOfPages& " page(s) "%>
<% adoRs.Close set adoRs = nothing adoCn.Close set adoCn = nothing %>