<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% ' *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers="userEdit,webmaster" MM_authFailedURL="/Bookings/Secure/sorryAccess.asp" MM_grantAccess=false If Session("MM_Username") <> "" Then If (false Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% Dim users Dim users_cmd Dim users_numRows Set users_cmd = Server.CreateObject ("ADODB.Command") users_cmd.ActiveConnection = MM_trevs_STRING users_cmd.CommandText = "SELECT * FROM users ORDER BY uPrefName ASC" users_cmd.Prepared = true Set users = users_cmd.Execute users_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 users_numRows = users_numRows + Repeat1__numRows %> Rhydd Covert New Leader OK



Manage Leaders / Users

Clicking "User" Enables editing of personal details, Name, Phone, 1st Aid Dates etc.
Clicking "Actvty" Views the Rhdd Activity Permissions page for that leader, if any.

<% While ((Repeat1__numRows <> 0) AND (NOT users.EOF)) %> <%'========================================================================================= ' Trev's Get values from Database for use in table IDusers = (users.Fields.Item("IDusers").Value) uName = (users.Fields.Item("uName").Value) uAccess = "-" If (users.Fields.Item("uAccess").Value) <> "" then uAccess = (users.Fields.Item("uAccess").Value) uPW = "hidden" If Session("MM_UserAuthorization") = "webmaster" then uPW = (users.Fields.Item("uPW").Value) If Session("MM_UserAuthorization") = "userEdit" then If uAccess <> "webmaster" then uPW = (users.Fields.Item("uPW").Value) end If end If uFullname = "-" If (users.Fields.Item("uFullname").Value) <> "" then uFullname = (users.Fields.Item("uFullname").Value) uPrefName = "-" If (users.Fields.Item("uPrefName").Value) <> "" then uPrefName = (users.Fields.Item("uPrefName").Value) u1stAid = "-" class1stAid = "tableRep" If (users.Fields.Item("1stAidEnd").Value) <> "" then u1stAid = (users.Fields.Item("1stAidEnd").Value) If (u1stAid - Date()) < 30 then class1stAid = "dateRED" ' date near or gone end If end If uName = "-" If (users.Fields.Item("uName").Value) <> "" then uName = (users.Fields.Item("uName").Value) u1stAidType = "-" If (users.Fields.Item("1stAidType").Value) <> "" then u1stAidType = (users.Fields.Item("1stAidType").Value) ucrbTo = "-" classCRB = "tableRep" If (users.Fields.Item("crbTo").Value) <> "" then ucrbTo = (users.Fields.Item("crbTo").Value) If (ucrbTo - Date()) < 30 then classCRB = "dateRED" end IF end If umembNum = "-" If (users.Fields.Item("membNum").Value) <> "" then umembNum = (users.Fields.Item("membNum").Value) ' =========================================================================================%> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 users.MoveNext() Wend %>
Edit
Delete
Display
User Login
Full Name
RATS
1st Aid
Date
1st Aid
Type
CRB to
Date
Member Number
User / Actvty
<%=uPrefName%>
<%=uName%>
<%=uFullname%>
<%=uAccess%>
<%=dateShort(u1stAid)%>
<%=u1stAidType%>
<%=dateShort(ucrbTo)%>
<%=umembNum%>

Add New Users / Leader
Please ensure not already listed above

 

 

 

 

 

 

<% users.Close() Set users = Nothing %> <% 'Returns the date formatted to Medium length ie "27 Jun 57" function dateMed(dt) dateMed=Day(dt) dateMed=dateMed & " " & MonthName(Month(dt),true) dateMed=dateMed & " " & Right(Year(dt),2) end function %> <% Function dateShort(x) If Not IsDate(x) Then Exit Function dateShort="" dateShort = Day(x) & "/" dateShort=dateShort & Month(x) & "/" dateShort=dateShort & Right(Year(x),2) End Function %>