%@ Language=VBScript %>
<% Response.Buffer = True
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Nominations Screen
' March 2001
' This screen allows the user to select a committee to
' nominate and denominate faculty members to.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim messages
%>
<%
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Variable Declaration and Intitilization
Dim ComId, bInit, bExecuted
adLockOptimistic = 3
InitializePage()
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Function GetProfile(rsProfile)%>
<%
On Error Resume Next
GetProfile = False
Dim StrSQL
StrSQL = "SELECT * FROM [COMM1]"
StrSQL = StrSQL + " WHERE [COMID]= " + Cstr(ComId)
dbNVS.Open
rsProfile.ActiveConnection = dbNVS
rsProfile.Open Cstr(StrSQL), dbNVS, adOpenKeyset ', adLockOptimistic
If Not rsProfile.EOF Then
rsProfile.Movefirst
End If
GetProfile = True
If Err.Number <> 0 Then
GetProfile = False
End If
End Function
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%>
Faculty Voting and Nomination System - Nomination Screen
<% Title = "Nominations" %>
<%
Set rsCOMM = Server.CreateObject("ADODB.Recordset")
bExecuted = GetCommsForNom(rsCOMM)
%>
<%If rsCOMM.EOF then%>
Currently there are no committees in an open nomination period.
<%Else%>
<%
End If
%>
<%
dbNVS.Close
If bInit <> True then
Set rsFac = Server.CreateObject("ADODB.Recordset")
Set rsComInfo = Server.CreateObject("ADODB.Recordset")
Set rsFacNom = Server.CreateObject("ADODB.Recordset")
'get committee info to display...
GetCommittee rsComInfo
%>
<%
Set rsProfile = Server.CreateObject("ADODB.Recordset")
GetProfile rsProfile
%>
<%End If %>
<%
Set mems = Server.CreateObject("ADODB.Recordset")
GetMember mems, ComID
%>
<%
dbNVS.Close
'get available faculty to nominate...
GetFacultyForNom rsFac
%>
<%
dbNVS.Close
'get faculty nominated by the current user...
NominatedFaculty rsFacNom
%>
<% 'begin server-side code
set accnoms = Server.CreateObject("ADODB.Recordset")
set nodecnoms = Server.CreateObject("ADODB.Recordset")
'Call our function, lets see if this bombs
RetNominees accnoms, nodecnoms, ComID
%>
<%
dim havenoms
havenoms = 0
if not accnoms.EOF then
havenoms = 1
%>
Nominees Who've Accepted Nomination
Nominees Who've Not Yet Accepted Nomination
<%
end if
if not nodecnoms.EOF then
havenoms = 1
%>
<%
end if
if havenoms = 0 then
%>
There are currently no nominees for this committee
<%
end if
dbNVS.Close
%>
<%
%>
<%End If%>
<%
Set dbNVS = Nothing
Set rsCOMM = Nothing
Set rsFac = Nothing
Set rsFacNom = Nothing
Response.End
%>