<%@ Language=VBScript%> <%Response.Buffer = True%> <% 'get post'ed variables Dim ComID, strSQL, res If request.form("hdComId") then ComID = request.form("hdComId") 'response.write "
Got the ComID" + CStr(ComID) end if If request.form("KillElec") = "on" then 'cancel the election in the comm1 table strSQL = "UPDATE COMM1 SET APPROVE_STATUS = " + CStr(Cint(true)) + " WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) strSQL = "UPDATE [COMM1] SET [ELECTION_TYPE] = " & Cstr(Cint(true)) & " WHERE" strSQL = strSQL + " [COMID] = " & Cint(ComID) res = PerformExecute(strSQL) 'delete from the voting results table strSQL = "DELETE * FROM VOTING_RESULTS WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) 'delete from the voted table strSQL = "DELETE * FROM VOTED WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) 'response.write "
We got kill elect" end if If request.form("VoteResults") = "on" then 'delete from the voting results table strSQL = "DELETE * FROM VOTING_RESULTS WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) 'delete from the voted table strSQL = "DELETE * FROM VOTED WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) end if If request.form("NomResults") = "on" then strSQL = "DELETE * FROM Nominated WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) 'response.write "
Kill nom results" end if If request.form("UndoClosed") = "on" then strSQL = "UPDATE COMM1 SET APPROVE_STATUS = " + CStr(Cint(false)) + " WHERE COMID = " + CStr(ComID) res = PerformExecute(strSQL) end if If request.form("AddtoSlate")= "on" then if Not request.form("FacId") = "" then strSQL = "INSERT INTO VOTING_RESULTS(USER_ID, COMID, VOTES) VALUES(" + CStr(request.form("FacId")) + ", " + CStr(ComID) + ", 0)" res = PerformExecute(strSQL) 'response.write "
Add a fac, the id is: " + CStr(request.form("FacId")) end if end if If request.form("RemoveFromSlate") = "on" then if Not request.form("RemFacId") = "" then strSQL = "DELETE * FROM VOTING_RESULTS WHERE USER_ID = " + CStr(request.form("RemFacId")) + " AND COMID = " + CStr(ComID) 'strSQL = "INSERT INTO VOTING_RESULTS(USER_ID, COMID, VOTES) VALUES(" + CStr(request.form("FacId")) + ", " + CStr(ComID) + ", 0)" res = PerformExecute(strSQL) 'response.write "
Add a fac, the id is: " + CStr(request.form("FacId")) end if end if Response.Redirect "committee_edit.asp?init=1&confirmmaint=yes" Function PerformExecute(mystr)%> <% PerformExecute = false Dim CmdObj Dim message dbNVS.Open Set CmdObj = Server.CreateObject("ADODB.Command") CmdObj.ActiveConnection = dbNVS CmdObj.CommandText = Cstr(mystr) CmdObj.Execute message = "Error in performing committee maintenace. Please contact system administrator
" 'error checking If Err.Number > 0 then dbNVS.rollback Response.Clear Response.Redirect "error.asp?" + Server.URLEncode(message) Response.End end if dbNVS.Close Set CmdObj = Nothing Set dbNVS = Nothing PerformExecute = true End Function %>