<%@ Language=VBScript %> <% Option Explicit %> <% Response.Buffer = True %> <% dim iNbrTo,nbrToDisplay,iNbrFrom,lastpage,modul ,colonne,liensRecu '************************************ Const adUseClient = 3 Const adOpenStatic = 3 Dim Connect_String Dim Page_Size Dim Current_Page Dim MyConn Dim RS,rsQuery Dim sSQL, strSql, sSQLRecu Dim Page_Count '****************** Page_Size = 10 'here we set the number of records viewed per page to 15. If Request("iPage")="1" Then Current_Page = 1 Else Current_Page = CInt(Request("iPage")) End If Set RS = Server.CreateObject("ADODB.RecordSet") RS.CursorLocation = adUseClient RS.PageSize = Page_Size '************************************************** if Request("Organisation") <> "" then sSQLRecu = sSQLRecu & "Recu.CodeO = " & RemoveJunk(Request("Organisation")) & " and " liensRecu = liensRecu&"Organisation="& Request("Organisation") &"&" end if if Request("Statut") <> "" then sSQLRecu = sSQLRecu & "Recu.Statut = " & Request("Statut") & " and " liensRecu = liensRecu&"Statut="& Request("Statut") &"&" end if if Request("SommeT") <> "" then sSQLRecu = sSQLRecu & "Recu.SommeT = " & RemoveJunk(Request("SommeT")) & " and " liensRecu = liensRecu&"SommeT="& Request("SommeT") &"&" end if if Request("Pour") <> "" then sSQLRecu = sSQLRecu & "Recu.Pour = '" & RemoveJunk(Request("Pour")) & "' and " liensRecu = liensRecu&"Pour="& Request("Pour") &"&" end if if Request("NoteG") <> "" then sSQLRecu = sSQLRecu & "Recu.NoteG = '" & RemoveJunk(Request("NoteG")) & "' and " liensRecu = liensRecu&"NoteG="& Request("NoteG") &"&" end if if sSQLRecu = "" then Response.Redirect ("RechercheRecu.asp") end if strSql = "SELECT count(*) as iNbrNodes FROM Recu WHERE "& Left(sSQLRecu, Len(sSQLRecu) - 4)&" " Set rsQuery = Conn.Execute(strSql) nbrToDisplay = rsQuery("iNbrNodes") sSQL = "SELECT * FROM Recu WHERE "& Left(sSQLRecu, Len(sSQLRecu) - 4)&" order by CodeR" '********************************** if nbrToDisplay <> "0" then RS.Open sSQL, Conn, adOpenStatic Page_Count = RS.PageCount If 1 > Current_Page Then Current_Page = 1 If Current_Page > Page_Count Then Current_Page = Page_Count RS.AbsolutePage = Current_Page end if 'iNbrFrom If Current_Page ="1" Then iNbrFrom = 1 iNbrTo = Page_Size Else iNbrFrom = Page_Size * (Current_Page - 1) iNbrTo = iNbrFrom + Page_Size End If modul = nbrToDisplay MOD Page_Size if modul <> "0" then lastpage = Cint(nbrToDisplay/Page_Size) + 1 else lastpage = Cint(nbrToDisplay/Page_Size) end if '************************************************** Response.Cookies("Current_PageRecu") = Current_Page Response.Cookies("liensRecu") = liensRecu %>
 
 
<%colonne = 1 %> <%Do While RS.AbsolutePage = Current_Page AND Not RS.EOF%> <% if colonne = 2 then %> <% colonne= 1 else%> <% colonne= 2 end if %> <% RS.MoveNext Loop 'clean up RS.Close Set RS = Nothing Conn.Close Set Conn = Nothing end if %> <%if nbrToDisplay <> "0" then%> <%else%>
Liste des Reçus
<%if nbrToDisplay <> "0" then%> <% if iNbrTo < nbrToDisplay then %> <%=iNbrFrom%> à <%=iNbrTo%> de <%=nbrToDisplay%> enregistrement(s)
<%else%> <%=iNbrFrom%> à <%=nbrToDisplay%> de <%=nbrToDisplay%> enregistrement(s)
<%end if%>
Numéro de reçu Description Reçu Modifier Supprimer
"><%= RS("CodeR")%> <%= RS("Pour") %>

 ">

"><%= RS("CodeR")%> <%= RS("Pour") %>

 ">



<% If Current_Page <> 1 Then Response.Write "   " & vbCrLf Response.Write "  " & vbCrLf Response.Write " " & vbCrLf End If If Current_Page < Page_Count Then Response.Write "   " & vbCrLf Response.Write "  " & vbCrLf End IF %>

<%if iNbrTo < nbrToDisplay then %> <%=iNbrFrom%> à <%=iNbrTo%> de <%=nbrToDisplay%> enregistrement(s)
<%else%> <%=iNbrFrom%> à <%=nbrToDisplay%> de <%=nbrToDisplay%> enregistrement(s)
<%end if%>




Pas de résultat







<%end if%>