<% ' ' Filename: show_act.asp ' Generated with CodeCharge 1.1.17 ' ASP.ccp build 2/28/2001 ' sFileName = "show_act.asp" %> Givethanks Studio ~Bulletin Board
<% Form_Show %>

   
<% '******************************************************************************** Sub Form_Show() Dim sWhere sWhere = "" sOrder = "" sSQL = "" ' Build ORDER statement iSort = GetParam("FormForm_Sorting") iSorted = GetParam("FormForm_Sorted") sDirection = "" sSortParams = "" if not IsEmpty(iSort) then if iSort = iSorted then form_sorting = "" sDirection = " DESC" sSortParams = "FormForm_Sorting=" & iSort & "&FormForm_Sorted=" & iSort & "&" else form_sorting = iSort sDirection = " ASC" sSortParams = "FormForm_Sorting=" & iSort & "&FormForm_Sorted=" & "&" end if if iSort = 1 then sOrder = " order by a.[a_time_s]" & sDirection if iSort = 2 then sOrder = " order by a.[a_obj]" & sDirection if IsNull(sOrder) then sDirection = "" end if %> <% sWhere = "" ' Build WHERE statement ' Build full SQL statement sSQL = "select [a].[a_no] as a_a_no, " & _ "[a].[a_obj] as a_a_obj, " & _ "[a].[a_time_s] as a_a_time_s " & _ " from [act] a where a_ok <>0 order by [a].[a_time_s]" sSQL = sSQL & sWhere & sOrder ' Select current page iPage = GetParam("FormForm_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 while not rs.EOF and iCounter < 20 flda_no = GetValue(rs, "a_a_no") flda_time_s = GetValue(rs, "a_a_time_s") flda_obj = GetValue(rs, "a_a_obj") %> <% rs.MoveNext iCounter = iCounter + 1 wend %> <% if not rs.EOF or not iPage=1 then %>
<<Posting a News>>
Date
Title
No data
<%=ToHTML(flda_time_s)%> &"><%=ToHTML(flda_obj)%> 
<% 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 Page <% 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 Page <% if not IsNull(scroller_next) then response.write("") end if set rs = nothing %>
<% end sub %>