<%@ Language=VBScript %> <% Response.Buffer = True %> <% '************************************** ' Edit Faculty Page ' April 2001 '**************************************%> <% Dim FacID, bInit, bExecuted, blnEdit, Title adLockOptimistic = 3 InitializePage() %> <% Function InitializePage() bInit = CBool(Cint(Request.Querystring ("init"))) Dim message If Request.Form("selFac") = "0" AND Not bInit Then message = "You must select a faculty member." Response.Clear Response.Redirect "error.asp?mess=" + Server.URLEncode(message) Response.End End If If bInit <> Cint(False) then FacID = Cint(0) else If Request.QueryString("FacID") <> "" Then FacID = Request.QueryString("FacID") Else FacID = Request.Form("selFac") End If End If If Request.QueryString("mode") <> "edit" Then blnEdit = False Title = "Delete Faculty" Else blnEdit = True Title = "Edit Faculty" End If End Function %> <% Dim rsFacs Set rsFacs = Server.CreateObject("ADODB.Recordset") Dim rsFaculty Set rsFaculty = Server.CreateObject("ADODB.Recordset") Dim rsDivs Set rsDivs = Server.CreateObject("ADODB.Recordset") Dim messages 'get the faculty members for the form... GetFaculty rsFacs If rsFacs.EOF Then messages = "There are no faculty members to edit.
Please add faculty members before trying to edit them.
Please click the BACK button." Response.Clear Response.Redirect "error.asp?mess=" + Server.URLEncode(messages) Response.End End If %> NVS Admin - <%=Title%>
   
<% If blnEdit Then %> <% Else %> <% End If %> <% If blnEdit Then %> <% Else %> <% End If %> <% If blnEdit Then %> <% Else %> <% End If %> <% dbNVS.Close If Not bInit Then 'get the selected faculty member... GetFac rsFaculty, FacID End If %> <% If Not bInit Then 'this looks wierd, but I have to close the connection and reopen to get the next recordset for some reason... 'so I'll put the rest of the rsFaculty values in variables to populate the page... blnSEX = Clng(rsFaculty.Fields("SEX").Value) lngDIV_ID = Clng(rsFaculty.Fields("DIV_ID").Value) blnTENURE = Clng(rsFaculty.Fields("TENURE").Value) blnACTIVE = rsFaculty.Fields("ACTIVE_VOTER").Value blnADMIN = rsFaculty.Fields("ADMIN_ACCESS").Value dbNVS.Close End If 'get the divisions for the form... GetDivisions rsDivs If rsDivs.EOF Then messages = "There are no divisions to use for faculty members.
Please add divisions before editing faculty members.
Please click the BACK button." Response.Clear Response.Redirect "error.asp?mess=" + Server.URLEncode(messages) Response.End End If %> <% Else %> <%If blnSEX <> CLng(False) Then %> Male Female <% Else %> Male Female <% End If %> <% End If %> <% Else %> <%If blnTENURE <> CLng(False) Then %> Yes No <% Else %> Yes No <% End If %> <% End If %> <% Else %> <%If blnACTIVE <> CLng(False) Then %> Yes No <% Else %> Yes No <% End If %> <% End If %> <% Else %> <%If blnADMIN <> CLng(False) Then %> Yes No <% Else %> Yes No <% End If %> <% End If %> <% Else %> <% End If%> <% End If %>
 Add |  Edit | Delete| Change Password  Add |  Edit | Delete
 * required  
 
    
 
 *SNC ID #:   <% If Not bInit Then %> value="<%=Trim(rsFaculty.Fields("USER_ID").Value) %>"<% End If %>> "> <% Else %> <% End If %>
 *Network Login:   <% If Not bInit Then %> value="<%=Trim(rsFaculty.Fields("LOGIN_ID").Value) %>"<% End If %>> "> <% Else %> <% End If %>
 
 *First Name:   <% If Not bInit Then %> value="<%=Trim(rsFaculty.Fields("F_Name").Value) %>"<% End If %>> <% Else %> <% End If %>
 *Last Name:   <% If Not bInit Then %> value="<%=Trim(rsFaculty.Fields("L_Name").Value) %>"<% End If %>> <% Else %> <% End If %>
 
 *Email:   <% If Not bInit Then %> value="<%=Trim(rsFaculty.Fields("EMAIL").Value) %>"<% End If %>> <% Else %> <% End If %>
 *Division:  
 *Gender:   <% If bInit Then %> Male Female
 *Tenure:   <% If bInit Then %> Yes No
 *Active Voter:   <% If bInit Then %> Yes No
 *Admin Access:   <% If bInit Then %> Yes No
 
<% If Not bInit Then %> <% If blnEdit Then %>
 
   
   
<% '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If Request.QueryString("confirm") = "yes" Then Response.write "" ElseIf Request.QueryString("confirmdelete") = "yes" Then Response.write "" End If '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %> <% Set dbNVS = Nothing Set rsFacs = Nothing Set rsFaculty = Nothing Set rsDivs = Nothing Response.End %>