%
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 referral email data 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.referid, a.frnname, a.frnemail, a.emailsenton, a.emailclick, a.logdate from refer_friend a where a.logdate between #"& regdtfr &"# and #"& dateadd("d", 1, regdtto) &"# order by a.logdate, a.frnname"
'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
refArr = rs.GetRows()
if isEmpty(refArr) = False Then
if UBound(refArr,2) >= (rs.PageSize-1) then
toctr = (rs.PageSize-1)
else
toctr = UBound(refArr,2)
end if
end if
'' End Paging
end if
%>
| Referral Emails | ||||||
|
|
||||||
| Date | Name | |||||
| <%=Trim(refArr(5,i))%> | <%=Trim(refArr(1,i))%> | <%=Trim(refArr(2,i))%> | ||||
| <%=EMsg%> | ||||||