<% ' 1/ check if logged in and bounce out if not If Session("GivCustomerID") = "" Or Session("UserID") = "" Then 'not logged in strBouncebackURL = "/asp/homepage.asp?error=NotLoggedIn&referral=www.online-supervision.net/asp/search.asp" response.redirect strBouncebackURL End If Set conn = Server.CreateObject("ADODB.Connection") conn.Open connstr ' 2/ load session variables with form data If request.form("FormSubmitted") = "yes" Then Session("SearchConditionsAuthorised") = request.form("SearchConditionsAuthorised") Session("SearchConditionsUserStatus") = request.form("SearchConditionsUserStatus") Session("SearchConditionsAllProfessions") = "" Session("SearchConditionsAllOrientations") = "" Session("includeResearchers") = request.form("includeResearchers") Else Session("SearchConditionsAuthorised") = request.querystring("Authorised") Session("SearchConditionsUserStatus") = request.querystring("UserStatus") Session("SearchConditionsAllProfessions") = "yes" Session("SearchConditionsAllOrientations") = "yes" End If ' 3/ set up various individual search conditions ' 3a/ search conditions for UserStatus and set up of 'all search conditions' If Session("SearchConditionsUserStatus") <> "" Then strAllSearchConditions = "UserStatus = '" & Session("SearchConditionsUserStatus") & "' " If Session("includeResearchers") <> "" Then strAllSearchConditions = "(" & strAllSearchConditions & "OR UserStatus = 'researching') " End If Else strAllSearchConditions = "(UserStatus = 'receiving' OR UserStatus = 'providing') " If Session("includeResearchers") <> "" Then strAllSearchConditions = "(UserStatus = 'receiving' OR UserStatus = 'providing' OR UserStatus = 'researching') " End If End If ' 3a/ search conditions for Authorised If Session("SearchConditionsAuthorised") <> "" Then strSearchConditionsAuthorised = "RegisterInterest.Authorised = '" & Session("SearchConditionsAuthorised") & "' " strAllSearchConditions = strAllSearchConditions & "AND " & strSearchConditionsAuthorised End If ' 3c/ search conditions for professions If Not Session("SearchConditionsAllProfessions") = "yes" Then strSQL = "SELECT ProfessionName FROM Professions" Set rs = conn.Execute(strSQL) do while not rs.eof Session(rs(0)) = request.form(rs(0)) If Session(rs(0)) <> "" Then strSearchConditionVarName = "Profession = '" & rs(0) & "' Or ProfessionName = '" & rs(0) & "' " If strSearchConditionsProfessions <> "" Then strSearchConditionsProfessions = strSearchConditionsProfessions & "OR " & strSearchConditionVarName Else strSearchConditionsProfessions = strSearchConditionVarName End If End If rs.movenext loop rs.Close ' Close recordset Set rs = nothing ' Remove recordset ' 3ciii/ if the resulting variable has any content, ' augment its value with a suitable prefix If strSearchConditionsProfessions <> "" Then strAllSearchConditions = strAllSearchConditions & "AND (" & strSearchConditionsProfessions & ") " End If End If ' 3d/ search conditions for orientations If Not Session("SearchConditionsAllOrientations") = "yes" Then strSQL = "SELECT OrientationName FROM Orientations" Set rs = conn.Execute(strSQL) do while not rs.eof Session(rs(0)) = request.form(rs(0)) ' Session("SearchConditionsAllOrientations") = request.form("SearchConditionsAllOrientations") If Session(rs(0)) <> "" Then strSearchConditionVarName = "Orientation = '" & rs(0) & "' Or OrientationName = '" & rs(0) & "' " If strSearchConditionsOrientations <> "" Then strSearchConditionsOrientations = strSearchConditionsOrientations & "OR " & strSearchConditionVarName Else strSearchConditionsOrientations = strSearchConditionVarName End If End If rs.movenext loop rs.Close ' Close recordset Set rs = nothing ' Remove recordset ' 3diii/ if the resulting variable has any content, ' augment its value with a suitable prefix If strSearchConditionsOrientations <> "" Then strAllSearchConditions = strAllSearchConditions & "AND (" & strSearchConditionsOrientations & ") " End If End If %> www.online-supervision.net
<% If Session("UserID") = "" Then %>click here to login to the secure area of the site<% Else response.write "" End If %> homepage
<% If Session("UserID") = "" Then %> register to provide or receive online clinical supervision<% Else response.write "" End If %> online-supervision.net bulletin boards online supervision research resources & links contact


Hello <%=Session("Title") & " " & Session("Firstname") & " " & Session("Lastname")%>. Welcome to the online-supervision.net search facility. Displayed below are the names of those whose registration has either been authorised or is awaiting authorisation following their submission of full professional details, along with some essential details regarding their main profession and orientation.

<% If Session("Authorised") <> "yes" Then %> Once your own registration to use the facilities on the site and participate in the ongoing research project into online supervision has been authorised, all you'll need to do to find out more about anyone listed below is click on the button next to their record marked 'view profile'. In the meantime, as your own registration has not yet been authorised, you will simply be returned to your homepage when you do this. <% Else %> To find out more about anyone listed below, simply click on the button next to their record marked 'view profile'. <% End If %>

You can refine your search for other site users according to three criteria, as detailed in the boxes below, based on their profession, their orientation, and whether they are intending to receive or provide supervision. <% If Session("UserStatus") = "researching" Then %>

If you are registered as a researcher, you are also seeing this paragraph and will be able to specify that you only want to see the listing of those whose registrations are 'pending' - i.e. who have submitted further professional details but have not yet been authorised. Please note, registrations marked with a star () represent the fact that authentication documents have been received and are satisfactory.

Are you looking for just those with authorisations pending, just those with registrations authorised etc., or for everyone?
please list only those with authorisations pending
please list only those with registrations authorised
please list only those who have not yet submitted further professional information
please list only those whose registrations have been declined
please list only those whose registrations are on hold
please list only those whose registrations have been deleted
please list all
<% Response.write "" %>
<% Response.write "" %>
<% Response.write "" %>
<% Response.write "" %>
<% Response.write "" %>
<% Response.write "" %>
<% Response.write "" %>
<% End If %>


<% If Session("UserStatus") = "researching" Then %> <% End If %>
Are you looking for a supervisor or for supervisees?
please list only supervisors
please list only supervisees
please list both
<% Response.write "" %>
<% Response.write "" %>
<% Response.write "" %>
check this box if you want to include researchers in the search <% response.write " "" Then response.write " checked" End If response.write ">" %> (this option only available to those logged in as researchers)

What professions are you interested in?
please include in the listing those whose main professions are checked on the list below
<% strSQL = "SELECT ProfessionName, Authorised" strSQL = strSQL & " FROM Professions" Set rs = conn.Execute(strSQL) %> <% Dim strCount strCount = 1 do while not rs.eof If rs(1) = "Yes" Then response.write "" If strCount = 3 Then response.write "" End If strCount = strCount + 1 If strCount > 3 Then strCount = strCount - 3 End If End If rs.movenext loop rs.Close ' Close recordset Set rs = nothing ' Remove recordset %>
 " & rs(0) & "
<% '
'response.write "
list all available professions
" %>

What orientations are you interested in?
please include in the listing those whose main theoretical orientations are checked on the list below
<% strSQL = "SELECT OrientationName, Authorised" strSQL = strSQL & " FROM Orientations" Set rs = conn.Execute(strSQL) %> <% strCount = 1 do while not rs.eof If rs(1) = "Yes" Then response.write "" If strCount = 3 Then response.write "" End If strCount = strCount + 1 If strCount > 3 Then strCount = strCount - 3 End If End If rs.movenext loop rs.Close ' Close recordset Set rs = nothing ' Remove recordset %>
 " & rs(0) & "
<% '
'response.write "
list all available orientations
" %>

<% 'stuff to discern if user has any groups strSQL = "Select GroupID FROM Groups WHERE OwnerID = '" & Session("UserID") & "'" Set rs = conn.Execute(strSQL) strCounter = 0 Do While Not rs.eof strCounter = strCounter + 1 strGroupID = rs.fields("GroupID") rs.movenext Loop %>
key for contact tools below
Click here to view the profile for the user in question.
 Click here to view the profile for the user in question.
Click here for email dialogue with the user in question.
 Click here to engage in dialogue with the user in question.
Click here to invite the user in question to join (one of) your group(s) or accept their join request.
 Click here to invite this user to join a group you own.
Click here to request to join (one of) the group(s) of the user in question.
 Click here to  request to join a group this user owns.
<% strSQL = "SELECT DISTINCT " strSQL = strSQL & "RegisterInterest.UserID, RegisterInterest.GivCustomerID, RegisterInterest.UserStatus, " strSQL = strSQL & "RegisterInterest.Orientation, RegisterInterest.Profession, " strSQL = strSQL & "RegisterInterest.AuthenticationDocsSupplied, RegisterInterest.Authorised, " strSQL = strSQL & "Customers.Title, Customers.FirstName, Customers.LastName , Customers.EmailAddress FROM " strSQL = strSQL & "((Customers INNER JOIN RegisterInterest ON Customers.CustomerID=RegisterInterest.GivCustomerID) INNER JOIN (Professions INNER JOIN UsersProfessions ON Professions.ProfessionID=UsersProfessions.ProfessionID) ON RegisterInterest.UserID=UsersProfessions.UserID) INNER JOIN (Orientations INNER JOIN UserOrientations ON Orientations.OrientationID=UserOrientations.OrientationID) ON RegisterInterest.UserID=UserOrientations.UserID " strSQL = strSQL & "WHERE " & strAllSearchConditions ' response.write "" & strSQL ' 2/ Open database connection & submit SQL string Set rs = conn.Execute(strSQL) ' 3/ load variables with data if there is any do while not rs.eof strUserID = rs.Fields("UserID") strGivCustomerID = rs.Fields("GivCustomerID") strUserStatus = rs.Fields("UserStatus") strOrientation = rs.Fields("Orientation") strProfession = rs.Fields("Profession") strAuthorised = rs.Fields("Authorised") strAuthenticationDocsSupplied = rs.Fields("AuthenticationDocsSupplied") strTitle = rs.Fields("Title") strFirstName = rs.Fields("FirstName") strLastName = rs.Fields("LastName") strEmail = rs.Fields("EmailAddress") strPMrecipient = rs.Fields("GivCustomerID") strDialogueURL = "/asp/ContactTypeChoice.asp?PID=" & strUserID & "&Title=" & strTitle & "&Firstname=" & strFirstname & "&Lastname=" & strLastname & "&Email=" & strEmail & "&PMrecipient=" & strPMrecipient '9/ write data into table If (strAuthorised = "yes" Or strAuthorised = "pending" Or Session("UserStatus") = "researching") AND Session("UserID") + 1 <> strUserID + 1 Then ' Or strAuthenticationDocsSupplied = "yes" %> <% End If ' 9/ move to next record and loop back to beginning of process rs.movenext loop rs.Close ' Close recordset Set rs = nothing ' Remove recordset conn.close ' Close open connection Set conn = nothing ' Remove database object %>
name
registration type
main profession
main orientation
contact tools
<% response.write strTitle & " " %> <% response.write strFirstName & " " %> <% response.write strLastName %> <% If Session("UserStatus") = "researching" AND strAuthenticationDocsSupplied = "yes" Then %> <% End If %>
<% response.write strUserStatus & " supervision" %>
<% response.write strProfession %>
<% response.write strOrientation %>
<% If strCounter > 0 Then strSQL = "Select GroupMembershipID FROM GroupMemberships WHERE GroupID = '" & strGroupID & "' AND UserID = '" & strUserID & "' AND DateLeft = 'NA'" 'response.write "" & strSQL & "" Set rsAgain = conn.Execute(strSQL) If Not rsAgain.eof Then strExistingMember = "yes" Else strExistingMember = "" End If If strExistingMember = "" Then strAltText = "Click here to " strSQL = "Select IntroductionID FROM Introductions WHERE InvitorID = '" & strUserID & "' AND InviteeID = '" & Session("UserID") & "' AND InviteeDate = 'NULL'" 'response.write "" & strSQL & "" Set rsIntro = conn.Execute(strSQL) If Not rsIntro.eof Then strRequestMade = "yes" Else strRequestMade = "" End If If strRequestMade = "yes" Then strAltText = strAltText & "accept or decline " & strFirstname & " " & strLastname & "'s request to join " Else strAltText = strAltText & "invite " & strFirstname & " " & strLastname & " to join " End If If strCounter = 1 Then strAltText = strAltText & "your group" End If If strCounter > 1 Then strAltText = strAltText & "one of your groups" End If strInviteURL = "/asp/GroupJoinInvite.asp?PID=" & strUserID & "&Title=" & strTitle & "&Firstname=" & strFirstname & "&Lastname=" & strLastname & "&Email=" & strEmail & "&PMrecipient=" & strPMrecipient & "&NumberOwnedGroups=" & strCounter & "&GroupID=" & strGroupID %><%=strAltText%><% Else strRemoveMember = "/asp/DeleteMember.asp?pid=" & strUserID & "&Title=" & strTitle & "&Firstname=" & strFirstname & "&Lastname=" & strLastname & "&Email=" & strEmail & "&PMrecipient=" & strGivCustomerID & "&GID=" & strSuppliedGID & "&NumberOwnedGroups=" & strCounter %><%=strFirstName%> <%=strLastName%> is already a member of your group! Click here if you wish to delete him.<% End If Else response.write " " End If %>
<% 'stuff to discern if user has any groups strSQL = "Select GroupID FROM Groups WHERE OwnerID = '" & strUserID & "'" Set rs9 = conn.Execute(strSQL) strCounter1 = 0 Do While Not rs9.eof strCounter1 = strCounter1 + 1 strOtherOwnedGroupID = rs9.fields("GroupID") rs9.movenext Loop strJoinRequestURL = "/asp/GroupJoinRequest.asp?PID=" & strUserID & "&Title=" & strTitle & "&Firstname=" & strFirstname & "&Lastname=" & strLastname & "&Email=" & strEmail & "&PMrecipient=" & strPMrecipient & "&NumberOwnedGroups=" & strCounter1 & "&GroupID=" & strOtherOwnedGroupID If strCounter1 > 0 Then strSQL = "Select GroupMembershipID FROM GroupMemberships WHERE GroupID = '" & strOtherOwnedGroupID & "' AND UserID = '" & Session("UserID") & "' AND DateLeft = 'NA'" 'response.write "" & strSQL & "" Set rs3 = conn.Execute(strSQL) If Not rs3.eof Then strExistingMember = "yes" Else strExistingMember = "" End If If strCounter1 > 0 AND strExistingMember = "" Then strAltText = "Click here to " strSQL = "Select IntroductionID FROM Introductions WHERE InvitorID = '" & strUserID & "' AND InviteeID = '" & Session("UserID") & "' AND InviteeDate = 'NULL'" 'response.write "" & strSQL & "" Set rsIntro = conn.Execute(strSQL) If Not rsIntro.eof Then strRequestMade = "yes" Else strRequestMade = "" End If If strRequestMade = "yes" Then strAltText = strAltText & "accept the invitation to join " Else strAltText = strAltText & "ask to join " End If If strCounter1 = 1 Then strAltText = strAltText & strFirstname & " " & strLastname & "'s group" End If If strCounter1 > 1 Then strAltText = strAltText & "one of " & strFirstname & " " & strLastname & "'s groups" End If %><%=strAltText%><% Else strDeleteMember = "/asp/DeleteMember.asp?pid=" & Session("UserID") & "&Title=" & Session("Title") & "&Firstname=" & Session("FirstName") & "&Lastname=" & Session("LastName") & "&Email=" & Session("EmailAddress") & "&PMrecipient=" & Session("GivCustomerID") & "&GID=" & strSuppliedGID %>You are already a member of <%=strFirstName%> <%=strLastName%>'s group! Click here if you wish to leave.<% End If Else response.write " " End If %>

 


Copyright 2002-4, GroupInterVisual Ltd. All rights reserved.