<% ACTION = Request.Form("ACTION") %> <% Session("ConnGuestBook_ConnectionString") = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\..\db\seminars.mdb") Session("ConnGuestBook_ConnectionTimeout") = 15 Session("ConnGuestBook_CommandTimeout") = 30 Session("ConnGuestBook_RuntimeUserName") = "admin" Session("ConnGuestBook_RuntimePassword") = "" %> <% ACTION = Request.Querystring("ACTION") %> <% PAGE = CInt(Request.Querystring("PAGE")) %> <% RCOUNT = CInt(Request.Querystring("RCOUNT")) %> <% If RCOUNT = "" Then %> <% RCOUNT = "0" %> <% End If %> <% Dim objRS Dim MySQL, strSort strSort=Request("lstSort") If strSort="" then strSort="DateFrom" End If '** Get initial recordset Set objRS = Server.CreateObject("ADODB.Recordset") MySQL = "SELECT * FROM Seminar WHERE Approve=True ORDER BY " & strSort objRS.Open MySQL,Session("ConnGuestBook_ConnectionString"), 3 %> <% HOWMANY = 10 %> <% '** Determine Page Size objRS.PageSize = HOWMANY %> <% If ACTION = "FORWARD" Then %> <% PAGE = PAGE + 1 %> <% RCOUNT = RCOUNT + HOWMANY %> <% For DACOUNT = 1 To RCOUNT %> <% objRS.MoveNext %> <% Next %> <% End If %> <% If ACTION = "BACK" Then %> <% PAGE = PAGE - 1 %> <% RCOUNT = RCOUNT - HOWMANY %> <% If RCOUNT <> 0 Then %> <% For DACOUNT = 1 To RCOUNT %> <% objRS.MoveNext %> <% Next %> <% End If %> <% End If %> <% If RCOUNT = "0" Then %> <% PAGE = 1 %>

<% If objRS.RecordCount > 1 or objRS.RecordCount = 0 Then %> <% =objRS.RecordCount %> Seminars Found <% Else %> <% =objRS.RecordCount %> Seminars Found <% End If %> <% If objRS.RecordCount <> 0 And HOWMANY < objRS.RecordCount Then %> , Showing First <% = HOWMANY %> <% End If %>

<% End If %> <% If NOT objRS.RecordCount = 0 Then %>

<% y = 0 %> <% while NOT objRS.EOF %> <%If chkAdmin="True" then%> <%End If%> <% objRS.MoveNext %> <% y = y + 1 %> <% if y = HOWMANY then %> <% while NOT objRS.EOF %> <% objRS.MoveNext %> <% wend %> <% end if %> <% wend%>
<%= objRS("Country") %><%= ", " & objRS("City") %> <%= objRS("DateFrom") & " - " & objRS("DateTo")%>

<%= "" & objRS("Speaker") & "" %>

<% If not objRS("Address")="" then Response.write objRS("Address") & "
" End If Response.write objRS("City") & ", " & objRS("State") & ", " & objRS("Country") & " - " & objRS("Zip") & "
" Response.write "Ph: " & objRS("Phone") & " Email: " & objRS("Email") & "
" If not objRS("website")="" then Response.write objRS("Website") & "
" End If Response.write "
" & objRS("Misc") %>

" class="smallfont">Edit - " class="smallfont">Delete

<% If RCOUNT > 0 Then %>

<% End If %>
<% If PAGE = objRS.PageCount Then %> <% Else %>

<% End If %> <%objRS.Close set objRS=Nothing%>
<% End If %>