<% M_UAdd = fun_chkRight("Registration","V") if M_UAdd = 0 then %> <% response.end end if%> <% Function fixquotes(theString) fixquotes = Replace(theString,"'","''") End Function regdtfr = fixquotes(Trim(request.form("regdtfr"))) regdtto = fixquotes(Trim(request.form("regdtto"))) if trim(regdtfr) = "" or trim(regdtto) = "" then regdtfr = date() regdtto = date() elseif isdate(regdtfr) = false or isdate(regdtto) = false then regdtfr = date() regdtto = date() end if EMsg = "No Registrations found" set rs = Server.CreateObject("ADODB.Recordset") ''''' Code for paging rs.CursorLocation = adUseClient rs.PageSize = 10 currentPage=trim(Request("currentPage")) if currentPage = "" or isNumeric(currentPage) = False then currentPage = 1 ''''' End Code for paging EMsg = EMsg & " for date range
" & formatdatetime(regdtfr, 1) & " - " & formatdatetime(regdtto, 1) & "
" strSQL = "select a.registerid, a.firstname, a.lastname, a.phone, a.contemail, a.address, a.city, a.pin, a.startdt, a.comment, a.logdate from registration a where a.logdate between #"& regdtfr &"# and #"& dateadd("d", 1, regdtto) &"# order by a.logdate, a.lastname, a.firstname" 'response.write strSQL 'response.end rs.Open strSQL, con, 3, 3 if not rs.EOF Then ''' Paging if Cint(currentPage)=0 or Cint(currentPage) > rs.PageCount then rs.AbsolutePage = rs.PageCount currentPage = rs.PageCount else rs.AbsolutePage = Cint(currentPage) end if studArr = rs.GetRows() if isEmpty(studArr) = False Then if UBound(studArr,2) >= (rs.PageSize-1) then toctr = (rs.PageSize-1) else toctr = UBound(studArr,2) end if end if '' End Paging end if %> <% if isEmpty(studArr)=False Then %> <% for i = 0 To toctr %> <% next %> <% if rs.pagecount > 1 then %> <%end if%> <% else %> <% end if %>
Student Registrations
Registration Recd. Date Range (mm/dd/yyyy) To

Date First Name Last Name Address Phone Start Date Comment
<%=Trim(studArr(10,i))%> <%=Trim(studArr(1,i))%> <%=Trim(studArr(2,i))%> <% response.write Trim(studArr(5,i)) & "
" & Trim(studArr(6,i)) & " - " & Trim(studArr(7,i)) if Trim(studArr(4,i)) <> "" then response.write "

Email: " & Trim(studArr(4,i)) %>
<%=Trim(studArr(3,i))%> <%=Trim(studArr(8,i))%> <%=Trim(studArr(9,i))%>
Page <%=currentPage & " of " & rs.PageCount&" -"%> <% for p = 1 to rs.PageCount if cint(currentpage) <> cint(p) then %> <%=p%>  <% else Response.Write "[" & p & "] " end if next %>
<%=EMsg%>
<% rs.Close set rs = nothing con.close set con = nothing %>