<% sFileName = "membersview.asp" Dim sWhere sWhere = "" sOrder = "" sSQL = "" transit_params = "name=" & ToURL(GetParam("name")) & "&" form_params = "name=" & ToURL(GetParam("name")) & "&" ' Build ORDER statement sOrder = " order by b_name Asc" iSort = GetParam("Formmembersview_Sorting") iSorted = GetParam("Formmembersview_Sorted") sDirection = "" sSortParams = "" if not IsEmpty(iSort) then if iSort = iSorted then form_sorting = "" sDirection = " DESC" sSortParams = "Formmembersview_Sorting=" & iSort & "&Formmembersview_Sorted=" & iSort & "&" else form_sorting = iSort sDirection = " ASC" sSortParams = "Formmembersview_Sorting=" & iSort & "&Formmembersview_Sorted=" & "&" end if if iSort = 1 then sOrder = " order by b_name" & sDirection if iSort = 2 then sOrder = " order by b_name" & sDirection if IsNull(sOrder) then sDirection = "" end if %>

<% sWhere = "" ' Build WHERE statement pname = GetParam("name") if not isEmpty(pname) then HasParam = true sWhere = "b_name='" & replace(pname, "'", "''") & "'" 'deleted from here end if if HasParam then sWhere = " AND (" & sWhere & ")" ' Build full SQL statement sSQL = "select m_no,b_name from profile order by b_name" '"from profile order by bname1" 'sSQL = sSQL & sOrder ' Select current page iPage = GetParam("Formmembersview_Page") if IsEmpty(iPage) then iPage = 1 ' Open recordset openrs rs, sSQL if rs.eof then ' Recordset is empty %> <% else iCounter = 0 while not rs.eof and iCounter < (iPage-1)*20 rs.movenext iCounter = iCounter + 1 wend iCounter = 0 end if ' Show main table based on recordset do while not rs.EOF and iCounter < 20 fldb_name = GetValue(rs, "b_name") %> <% rs.MoveNext iCounter = iCounter + 1 loop if not rs.EOF or not iPage=1 then %>
AMPTPP MEMBERS DIRECTORY
Banner Name
No records
" target="_blank"><%=ToHTML(fldb_name)%>
<% end if %> <% ' Handle scroller if not rs.EOF or not iPage=1 then if iPage = 1 then scroller_prev = "" else prev_page = iPage - 1 scroller_prev = "" end if %> <%=scroller_prev%><<-Previous <% if not IsNull(scroller_prev) then response.write "" response.write " [ "&iPage&" ] " if rs.EOF then scroller_next = "" else next_page = iPage + 1 scroller_next = "" end if %> <%=scroller_next%>Next->> <% if not IsNull(scroller_next) then response.write("") end if set rs = nothing %>