|
<%
dim adoCn
dim strSQL
set adoCn = Server.CreateObject("ADODB.Connection")
adoCn.Open strConn
if Request.QueryString("action")="del" then
strSQL = "DELETE FROM Category where ID=" & Request.QueryString("ID")
adoCn.Execute strSQL
end if
dim adoRs
set adoRs = Server.CreateObject("ADODB.Recordset")
if Request.QueryString("action")="Desc" then
strSQL = "Select * From Category order by CatName Desc"
Else
strSQL = "Select * From Category order by CatName Asc"
End If
%>
<%
adoRs.Open strSQL, adoCn, 3, 1, &H0001
%>
<%
If adoRs.RecordCount = 0 Then
%>
<%
Response.End
Else
End IF
%>
<%
Dim ShowPage
ShowPage = CInt(Request.QueryString("ShowPage"))
Dim PageSize
' nombre de produits a afficher sur la page
PageSize = 20
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
%> | | Esplanade Parmentier 62600 Berck-sur-Mer Tél : 03.21.09.21.21 Fax : 03.21.09.29.29 |
<%
Do While Not adoRs.EOF and not i = PageSize
%>
<% dim TrColor
If TrColor="white" Then
TrColor="white"
Else
TrColor="white"
END IF
%>
<%
i = i + 1
adoRs.MoveNext
Loop%>
<%PagingCategoryAdminDisplay()%>
|
<% Dim TotalRecords
TotalRecords= adoRs.RecordCount
response.Write "Il y a " &TotalRecords & " catégorie(s) dans " & NumOfPages& " page(s) "%>
|
<%
adoRs.Close
set adoRs = nothing
adoCn.Close
set adoCn = nothing
%>
|