<% 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 CmdShowEntries Dim MySQL, strSort strSort=Request("lstSort") If strSort="" then strSort="DateFrom" End If '** Get initial recordset Set CmdShowEntries = Server.CreateObject("ADODB.Recordset") MySQL = "SELECT * FROM Seminar WHERE Approve=False ORDER BY " & strSort & " DESC" CmdShowEntries.Open MySQL,Session("ConnGuestBook_ConnectionString"), 3 %> <% HOWMANY = 10 %> <% '** Determine Page Size CmdShowEntries.PageSize = HOWMANY %> <% If ACTION = "FORWARD" Then %> <% PAGE = PAGE + 1 %> <% RCOUNT = RCOUNT + HOWMANY %> <% For DACOUNT = 1 To RCOUNT %> <% CmdShowEntries.MoveNext %> <% Next %> <% End If %> <% If ACTION = "BACK" Then %> <% PAGE = PAGE - 1 %> <% RCOUNT = RCOUNT - HOWMANY %> <% If RCOUNT <> 0 Then %> <% For DACOUNT = 1 To RCOUNT %> <% CmdShowEntries.MoveNext %> <% Next %> <% End If %> <% End If %> <% If RCOUNT = "0" Then %> <% PAGE = 1 %>

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

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

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

<%=CmdShowEntries("Speaker")%>

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

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

<% If RCOUNT > 0 Then %>

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

<% End If %> <%CmdShowEntries.Close set cmdShowEntries=Nothing%>
<% End If %>