<% 'Include Security Server.Execute("/admin/includes/popup_security.asp") %> <%'Include Data Connection%> <%'Include ADO constants include file for VBScript%> <% 'open data connection OpenConn() %> <%'Include Utility Scripts%> <% 'dim strMode - The strMode variable is defined in the header_inc.asp file. dim strPostingTypeName dim intPostingTypeId If Request.Form <> "" Then 'begin add/edit (db transactions) dim strUserFeedback 'get form elements values strMode = Request.Form("txtMode") strPostingTypeName = Request.Form("txtName") intPostingTypeId = Request.Form("txtId") 'if the application is in 'edit' mode If LCase(strMode) = "edit" Then 'modify Posting Type Name Call ModifyPostingTypeName(intPostingTypeId, strPostingTypeName) 'if the application is in 'add' mode Else 'add Posting Type Name intPostingTypeId = AddPostingTypeName(strPostingTypeName) End If 'give the user feedback with regards to the success of the delete database transaction Session("FeedbackMode") = LCase(strMode) Session("FeedbackError") = err.number Session("FeedbackModule") = "posting_type" Server.Execute("/admin/feedback.asp") 'end add/edit (db transactions) Else 'begin input (add/edit) strMode = Trim(Request.QueryString("mode")) 'if application is in edit mode then... If LCase(strMode) = "edit" Then 'begin get current Posting Type info to be edited dim rsPostingType intPostingTypeId = Trim(Request.QueryString("type_id")) 'if intPostingTypeId is not a valid value then... If Not IsNumeric(intPostingTypeId) or Not (intPostingTypeId <> "") Then 'close the window Response.write("") 'if intPostingTypeId is a valid value then... Else 'get the related Posting Type information Set rsPostingType = GetSelectedPostingType(CInt(intPostingTypeId)) End If 'if intPostingTypeId does not relate to an existing Posting Type id then... If rsPostingType.EOF Then 'release the recordset from memory rsPostingType.Close set rsPostingType = Nothing 'release the connection object from memory before closing the window conn.Close Set conn = Nothing 'close the window Response.write("") 'if intPostingTypeId does relate to an existing Posting Type id then... Else 'get the posting type name in the appropriate language strPostingTypeName = rsPostingType("POSTING_TYPE_NAME_" & strLanguage) 'release the recordset from memory rsPostingType.Close set rsPostingType = Nothing End If 'end get current posting type info to be edited 'if application is in add mode then... Else strPostingTypeName = "" End If %>

Posting Type Name:

(Enter the Posting Type's Name.)

Update<%Else%>Add<%End If%>">   <% If LCase(strMode) = "edit" Then %> <% End If %>
<% End If %> <% 'close data connection CloseConn() %>