<% Dim sUser,sPass,abspage,pagecnt,page,limit sUser = "admin" sPass = "brand" Session.Timeout = 45 If Request.Form("username") <> "" And Request.Form("password") <> "" Then If Request.Form("username") = sUser And Request.Form("password") = sPass Then Session("ASC_ADMIN_LOGGED_IN") = True Response.Redirect("entries.asp") End If End If If Request.QueryString("action") = "logout" Then Session("ASC_ADMIN_LOGGED_IN") = False Session.Contents.Remove("ASC_ADMIN_LOGGED_IN") Response.Redirect("entries.asp") End If %>

 

Admin options

<%If Not Session("ASC_ADMIN_LOGGED_IN") Then%>


<%Else%> Logged in as Administrator

View list
Excel view
Logout
<%End If%>

Essential products for your practice entries

<%If Not Session("ASC_ADMIN_LOGGED_IN") Then%>

You must be logged in to view this page

<%Else%>
Confirmation #: " size="25" />

<% If Request.QueryString("cid") = "" Then dir = "" If Request.QueryString("d") = "" Or Request.QueryString("d") = "desc" Then dir = "ASC" Else dir = "DESC" End If ' Figure out if we need to apply any special sort pattern Select Case Request.QueryString("s") Case "confirmation" Sql_String = "SELECT * FROM Forms_ASC ORDER BY Confirmation " & UCase(dir) & ";" Case "name" SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY Name " & UCase(dir) & ";" Case "facility" SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY Facility " & UCase(dir) & ";" Case "city" SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY City " & UCase(dir) & ";" Case "state" SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY State " & UCase(dir) & ";" Case "zip" SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY Zip " & UCase(dir) & ";" Case "date" SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY DateStamp " & UCase(dir) & ";" Case Else SQL_STRING = "SELECT * FROM Forms_ASC ORDER BY DateStamp DESC;" End Select Else Sql_String = "SELECT * FROM Forms_ASC WHERE Confirmation = '"& Request.QueryString("cid") &"';" End If page = 1 limit = 25 Call dbConnect("prod") Set rsASC = Server.CreateObject("ADODB.Recordset") rsASC.PageSize = limit rsASC.CacheSize = limit rsASC.CursorLocation = adUseClient If request("page") <> "" Then page = CInt(Request("page")) End If rsASC.Open Sql_String, adoCon If Not rsASC.EOF Then i = 0 ' Set pointer at first record rsASC.MoveFirst If Request.QueryString("cid") = "" Then abspage = rsASC.AbsolutePage pagecnt = rsASC.PageCount If Len(Request("page")) = 0 Then rsASC.AbsolutePage = 1 Else If CInt(Request("page")) <= rsASC.PageCount Then rsASC.AbsolutePage = Request("page") Else rsASC.AbsolutePage = 1 End If End If Send("
("& rsASC.RecordCount &" total entries)" & getPaginationString(page, rsASC.RecordCount, rsASC.PageSize, 2, "entries.asp?") & "
") %>
<% ' Iterate through records While Not rsASC.EOF And i < rsASC.pageSize If i Mod 2 = 0 Then cls = "even" Else cls = "odd" End If %> <% i = i + 1 rsASC.MoveNext Wend %>
Confirmation # Name Facility (City, State, Zip) Phone # Entry Date
"><%=rsASC("Confirmation")%> "><%=rsASC("Name")%> <%If rsASC("Facility") <> "" Then Response.Write(rsASC("Facility") & "
")%> <%If rsASC("Address") <> "NULL" Then Response.Write(rsASC("Address") & ",
")%> <%=rsASC("City")%>, <%=rsASC("State")%>
<%=rsASC("Zip")%>
<%=rsASC("Phone")%> <%=FormatDatetime(rsASC("DateStamp"), vbShortDate)%>
<%=FormatDatetime(rsASC("DateStamp"), vbLongTime)%>
<% Else%>
Confirmation # <%=rsASC("Confirmation")%>
Name <%=rsASC("Name")%>
Email "><%=rsASC("Email")%>
Facility <%=rsASC("Facility")%>
Address <%=rsASC("Address")%>
City <%=rsASC("City")%>
State <%=rsASC("State")%>
Zip <%=rsASC("Zip")%>
Phone <%=rsASC("Phone")%>
Entry Date <%=rsASC("DateStamp")%>
<% End If Else Response.Write("No registrations existing or error location confirmation number.") End If rsASC.Close Set rsASC = Nothing Call dbDisconnect End If %>