<%'//LEFT AREA %>
<%IF uAgent = "WWTA" And uUser = "walkerhillny@hotmail.com" Then%>
|
|
 |
<%'// Contents Start ------------------------------------------------------------------------------------------------------%>
<%
Dim isSearch
isSearch = Trim(Request("isSearch"))
Dim sKeyword
sKeyword = Trim(Request("sKeyword"))
Dim oDBconn
Set oDBconn = Server.CreateObject("ADODB.Connection")
oDBconn.CursorLocation = 3
oDBconn.Open GetDBConnectionString()
Dim post_qry, orderby_qry
post_qry = "SELECT * FROM S_Agent "
Dim where_qry
If isSearch = "Y" Then
If sKeyword <> "" Then
where_qry = " Where Upper(agent_name) like '%"&UCase(sKeyword)&"%' "
End IF
End If
post_qry = post_qry & where_qry
orderby_qry = "Order by idx desc "
'//response.write post_qry
Dim curPage
curPage = Trim(Request("curPage"))
IF curPage = "" Then
curPage = 1
End IF
Dim rsList
Set rsList = ExecutePage(oDBconn, post_qry, Trim(Request("curPage")), orderby_qry)
Dim totCount
totCount = ExecuteCount(oDBconn, post_qry)
Dim strParam
strParam = "&isSearch="&isSearch&"&sKeyword="&sKeyword
Dim ii, rowNumber
ii = 0
rowNumber = totCount - ((curPage - 1) * G_PAGE_SIZE)
%>
Results:
[ <%=totCount%> ] Found |
<%Response.Write ShowPageBar(Trim(Request("curPage")),"","",strParam)%> |
No. |
Agent |
Email |
Name |
Phone |
Address |
Registered |
Status |
<%
Do Until rsList.EOF
ii = ii + 1
%>
<%=rowNumber%> |
<%=rsList("agent_name")%> |
<%=rsList("user_id")%> |
<%=rsList("name_last")%>, <%=rsList("name_first")%> |
<%=rsList("phone")%> |
<%=rsList("adr1")%> <%=rsList("adr2")%>
<%=rsList("city")%>, <%=rsList("state")%> <%=rsList("zip")%>
|
<%=rsList("insert_date")%> |
<%=rsList("active_yn")%> |
<%
rsList.MoveNext
rowNumber = rowNumber - 1
Loop
rsList.close
set rsList = Nothing
%>
|
<%Response.Write ShowPageBar(Trim(Request("curPage")),"","",strParam)%> |
<%'// Contents End ------------------------------------------------------------------------------------------------------%>
|
 |
|