<%@ 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 <% '*********************************************** 'BENNETT GIESLER 3-20-2006 'Gets the profile name and puts it in the header Set rsprofilename = Server.CreateObject("ADODB.Recordset") GetProfile rsprofilename %> <% Title = "Committee Voting
" & rsprofilename.Fields("COMNAME").Value & "" %> <% ' CODE END '*********************************************** %> <% Set rsCOMM = Server.CreateObject("ADODB.Recordset") bExecuted = GetCommsForVote(rsCOMM) %> <% 'BENNETT GIESLER 3-20-2006 'MY CODE STARTS HERE 'Below is the header and headerpage %>

<% dbNVS.Close %> <% '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '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%>
Maximum committee nominees you may vote for:   <%=lngMAX_VOTE%>

<% Set rsProfile = Server.CreateObject("ADODB.Recordset") GetProfile rsProfile %> <%End If %>
"> <% GetFacultyForVote rsFac %> <% dbNVS.Close GetUsersForBallot %>


 
 
<%'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 %>