<%@ Language=VBScript %> <% Option Explicit %> <% Response.Buffer = True %> FQCCL <% dim stext , stNbrA ,sNom ,sDescription ,sType ,sCode ,sAnimateurAdjoint, sAnimateur,sTable,sSqlPer,liensPer,stFormat ,iAge1,iAge2 ,sCout ,sNomType ,strSql1, rsQuery1,stCout dim stActivites,stDescription,iNbrTo,nbrToDisplay,iNbrFrom,lastpage,modul, stType,stStatut,stSexe,stOrder,stAnimateurAdjoint,stAnimateur,stformRap dim stNom, stPrenom stOrder = request("Order") liensPer = liensPer&"Order="&stOrder &"&" stFormat = request("Format") stNom = RemoveJunk(Request("Nom")) stPrenom = RemoveJunk(Request("Prenom")) stSexe = Request("Sexe") stStatut = Request("Statut") iAge1 = Request("Age1") iAge2 = Request("Age2") '****Personne paramettres************ stSexe = Request("Sexe") iAge1 = Request("Age1") iAge2 = Request("Age2") '************************************ Const adUseClient = 3 Const adOpenStatic = 3 Dim Connect_String Dim Page_Size Dim Current_Page Dim MyConn Dim RS,rsQuery Dim sSQL, strSql, sSqlR Dim Page_Count '****************** Page_Size = 10 'here we set the number of records viewed per page to 20. 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 stNom <> "" then sSqlPer = sSqlPer & "Personnes.Nom Like '" & stNom & "%' and " stext = stext &"Nom : " & stNom & " . " liensPer = liensPer &"Nom="&stNom &"&" end if if stPrenom <> "" then sSqlPer = sSqlPer & "Personnes.Prenom Like '" & stPrenom & "%' and " stext = stext &"Prenom : " & stPrenom & " . " liensPer = liensPer &"Prenom="&stPrenom &"&" end if if stStatut <> "" then sSqlPer = sSqlPer & " Personnes.Statut = " & stStatut & " and" if stStatut = "0" then stext = stext &"Statut: Inactif . " end if if stStatut = "1" then stext = stext &"Statut: Actif . " end if liensPer = liensPer&"Statut="&stStatut &"&" end if if stSexe <> "" then sSqlPer = sSqlPer & "Personnes.Sexe = '" & stSexe & "' and " stext = stext &"Sexe: " & stSexe & " . " liensPer = liensPer&"Sexe="&stSexe &"&" end if if iAge1 <> "" and iAge2 <> "" then sSqlPer = sSqlPer & "( year (date()) - year(Personnes.DDN) >= " & iAge1 & " and year (date()) - year(Personnes.DDN) <= " & iAge2 & " ) and " liensPer = liensPer &"Age1="&iAge1&"&Age2="&iAge2&"&" end if if iAge1 <> "" and iAge2 = "" then sSqlPer = sSqlPer & "( year (date()) - year(Personnes.DDN) = " & iAge1 & ") and " liensPer = liensPer &"Age1="&iAge1&"&" end if '*********************************** 'Response.Write sSqlR if stFormat = "E" then Response.Redirect ("rapportR24Excel.asp?"& Left(liensPer, Len(liensPer) - 1)&"") end if if sSqlPer <> "" then '****moins que 18***** sSqlPer = sSqlPer & "( year (date()) - year(Personnes.DDN) < 18 ) and " '********************* strSql = "SELECT count(*) as iNbrNodes FROM Inscriptions where CodeA IN ( SELECT CodeA FROM Activites WHERE Relve24 = true ) and CodeM IN (SELECT CodeM FROM Personnes WHERE "& Left(sSqlPer, Len(sSqlPer) - 4)&" )" Set rsQuery = Conn.Execute(strSql) nbrToDisplay = rsQuery("iNbrNodes") sSQL = "SELECT * FROM Inscriptions where CodeA IN ( SELECT CodeA FROM Activites WHERE Relve24 = true ) and CodeM IN (SELECT CodeM FROM Personnes WHERE "& Left(sSqlPer, Len(sSqlPer) - 4)&" )order by "&stOrder&" " end if 'response.write sSQL '********************************** if sSqlPer <> "" then 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 '************************************************** %>
<%=stext%>
<%if nbrToDisplay <> "0" then%>
<% if iNbrTo < nbrToDisplay then %> <%=iNbrFrom%> à <%=iNbrTo%> de <%=nbrToDisplay%> enregistrements
<%else%> <%=iNbrFrom%> à <%=nbrToDisplay%> de <%=nbrToDisplay%> enregistrements
<%end if%> <% 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 %>
<%Do While RS.AbsolutePage = Current_Page AND Not RS.EOF dim sCodeM ,sCodeA,sNomA,sPrenom,sDDN,sNASR24,sPrenomreleve24,sNomreleve24 sCodeM = RS("CodeM") sCodeA = RS("CodeA") strSql1 = "SELECT * FROM Personnes where CodeM = "& sCodeM Set rsQuery1 = Conn.Execute(strSql1) if not rsQuery1.eof then sNom = rsQuery1("Nom") sPrenom = rsQuery1("Prenom") sDDN = rsQuery1("DDN") sNomreleve24 = rsQuery1("Nomreleve24") sPrenomreleve24 = rsQuery1("Prenomreleve24") sNASR24 = rsQuery1("NASR24") end if strSql1 = "SELECT * FROM Activites where CodeA = "& sCodeA Set rsQuery1 = Conn.Execute(strSql1) if not rsQuery1.eof then sNomA = rsQuery1("Nom") sCout = rsQuery1("Cout") end if %> <% RS.MoveNext Loop 'clean up RS.Close Set RS = Nothing Conn.Close Set Conn = Nothing end if 'to check if we have select or not %>
Nom Prenom DDN Nom R24 Prenom R24 NAS Activité Côut
<%=sNom%> <%=sPrenom%> <%=sDDN%> <%=sNomreleve24%> <%=sPrenomreleve24%> <%=sNASR24%> <%=sNomA%> <%=sCout%>

<%if nbrToDisplay <> "0" then%> <%if iNbrTo < nbrToDisplay then %> <%=iNbrFrom%> à <%=iNbrTo%> de <%=nbrToDisplay%> enregistrements
<%else%> <%=iNbrFrom%> à <%=nbrToDisplay%> de <%=nbrToDisplay%> enregistrements
<%end if%> <% 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 %> <%else%>

Pas de résultat <%end if%> <%else%>

Aucun paramètre de recherche sélectionné <%end if%>