<%@ Language=VBScript %> <% Response.Buffer = True '************************************** ' Vote ' March 21, 2001 '************************************** %> <% 'Local Variables to be used in the page... Dim ComId, bInit, bExecuted, lMaxVoteCount, messages Dim strIDS Dim objBallot adLockOptimistic = 3 Session.Contents("VOTE_COMID") = comid 'Initialize the Page for each server request... InitializePage() 'get dictionary object from x_vote.asp... If IsObject(Session.Contents("sdBallot")) then Set objBallot = Session.Contents("sdBallot") End if '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %> Nomination and Voting System - Committee Voting <% Title = "Committee Voting" %> <% Set rsCOMM = Server.CreateObject("ADODB.Recordset") bExecuted = GetCommsForVote(rsCOMM) %> <%If rsCOMM.EOF then%>




Currently there are no committees that you may vote for.

<%Else%>
<% dbNVS.Close End If%> <% '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'THIS DISPLAYS A MESSAGE BOX...WILL USE TO CONFIRM A SUCCESSFULL VOTE... If Request.QueryString("confirm") = "yes" Then Response.write "" End If '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %> <% 'Only show this part of the screen when a committe has been selected. 'If user is coming in for the first time, make them select a committee first. If bInit <> True then Set rsFac = Server.CreateObject("ADODB.Recordset") Set rsBallot = Server.CreateObject("ADODB.Recordset") Set rsComInfo = Server.CreateObject("ADODB.Recordset") LoadBallotIdsForQuery GetCommittee rsComInfo %>
<% dbNVS.Close Dim lngMAX_VOTE lngMAX_VOTE = GetVacancies() %>
Voting deadline:  <%=rsComInfo.Fields("ENDVOTE").Value%> Need instructions? 
Maximum committee nominees you may vote for:   <%=lngMAX_VOTE%>

<% Set rsProfile = Server.CreateObject("ADODB.Recordset") GetProfile rsProfile %> <%If IsNull(rsProfile.fields("MEMDESC").value) Then%> <%Else%> <% Set mems = Server.CreateObject("ADODB.Recordset") GetMember mems, ComID %>
Membership Description
There is no description for this committee

<%=rsProfile.fields("MEMDESC").value%> <%End If %>

"> <% GetFacultyForVote rsFac %> <% dbNVS.Close GetUsersForBallot %>
ADD to ballot
 
 
 
REMOVE from ballot

<%'Can't put this in the selection box, because the text gets written outside of the box, 'will have to loop again to get the right values in the hidden field... 'only load hidden values if there are faculty to put in them... If strIDS <> "" Then Dim ct ct = 1 rsBallot.MoveFirst While Not rsBallot.EOF%> "> <% ct = ct + 1 rsBallot.MoveNext Wend End If %>

Notice:  After you click the "Save Vote" button you will NOT be able to vote for this committee again.
 

<%End If%> <% 'clean up objects... Set rsComInfo = Nothing Set objBallot = Nothing Set dbNVS = Nothing Set rsCOMM = Nothing Set rsFac = Nothing Response.End %>