%@ Language=VBScript%>
<% Response.Buffer = True %>
<%
ComId = Clng(Session.Contents("VOTE_COMID"))
'used to refresh the page each time it is called by a button click...
If Request.QueryString("refreshed") = "" Then
Response.Redirect "comm_desc_popup.asp?refreshed=yes&comid=" + Cstr(ComId)
Response.End
End If
'Local Variables to be used in the page..
Dim ComId, bExecuted, messages, strComName, strComDesc
ComId = Clng(Request.QueryString("comid"))
Dim rsComm
Set rsComm = Server.CreateObject("ADODB.Recordset")
Dim rsMember
Set rsMember = Server.CreateObject("ADODB.Recordset")
GetCom rsComm, ComId
strComName = Cstr(rsComm.Fields("COMNAME").Value)
strComDesc = rsComm.fields("COMDESC").value
dbNVS.Close
GetMember rsMember
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Function GetMember(rsMember)%>
<%
On Error Resume Next
GetMember = False
Dim StrSQL, message
StrSQL = "SELECT [FACULTY].[F_NAME], [FACULTY].[L_NAME], [MEMBER].[TERM],"
StrSQL = StrSQL + " [DIVISION].[DIVISION]"
StrSQL = StrSQL + " FROM [FACULTY], [MEMBER], [COMM1], [DIVISION]"
StrSQL = StrSQL + " WHERE [COMM1].[COMID] = [MEMBER].[COMID]"
StrSQL = StrSQL + " AND [FACULTY].[USER_ID] = [MEMBER].[USER_ID]"
StrSQL = StrSQL + " AND [FACULTY].[DIV_ID] = [DIVISION].[DIV_ID]"
StrSQL = StrSQL + " AND [COMM1].[COMID] = " + Cstr(ComId)
StrSQL = StrSQL + " ORDER BY [MEMBER].[TERM]"
dbNVS.Open
rsMember.ActiveConnection = dbNVS
rsMember.Open StrSQL, dbNVS, adOpenKeyset ', adLockOptimistic
If Not rsMember.EOF Then
rsMember.Movefirst
End If
'Error Handling in a small way...
If Err.Number > 0 then
message = "A system error occured with the function GetMember." + _
"
Please contact the Nominations and Election Committee to resolve this problem." + _
"
Please click the back button."
'something is wrong...
Response.Clear
Response.Redirect "error.asp?mess=" + Server.URLEncode(message)
Response.End
GetMember = False
End if
'everything went ok...
GetMember = True
End Function
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%>