<% 'open data connection Call OpenConn() %> <%'Include Utility Scripts%> <% 'close data connection Call CloseConn() %> <% If Request.QueryString("mode") = "delete" Then 'BEGIN: DELETE POSTING 'dim strMode - The strMode variable is defined in the header_inc.asp file. dim intPostingId intPostingId = Trim(Request.QueryString("id")) strMode = Trim(Request.QueryString("mode")) 'open data connection Call OpenConn() 'delete the selected subscriber 'Call DeletePosting(intPostingId) 'close data connection Call CloseConn() '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" Response.Write("") Response.Write("") 'END: DELETE POSTING Else 'BEGIN: DISPLAY POSTING INDEX dim bolAdminView dim intPostingTypeId dim strPostingTypeName dim bolPostingTypeIdIsValid dim strCurrentModule dim intSelectedYear 'open the data connection Call openConn() 'get posting type id intPostingTypeId = Trim(Request.QueryString("type_id")) 'get selected year intSelectedYear = Trim(Request.QueryString("year")) 'if the submitted query string value for the intPostingTypeId variable is not of correct data type... If Not IsNumeric(intPostingTypeId) Or Not Trim(intPostingTypeId) <> "" Then 'set the bolPostingTypeIdIsValid variable to false bolPostingTypeIdIsValid = False 'if the submitted query string value for the intPostingTypeId variable is of correct data type... Else 'get the validity of the posting type id into the bolPostingTypeIdIsValid variable (true/false) bolPostingTypeIdIsValid = PostingTypeIdIsValid(intPostingTypeId) End If 'if the intCurrentPage variable numeric value is not valid... If Not bolPostingTypeIdIsValid Then 'redirect the user to the posting type index page Response.Redirect("/admin/content.asp") End If 'get posting type name strPostingTypeName = GetPostingTypeName(intPostingTypeId) %>

Post a new <%=strPostingTypeName%>    Back to Posting Type Index

<% dim strPostingPath 'set the strPostingPath with admin path strPostingPath = "/admin/posting.asp" 'set the strCurrentModule variable with the current module name strCurrentModule = "posting" 'write the page number menu system Response.Write GetYearMenu(CInt(intPostingTypeId), intSelectedYear, strPostingPath) %>

<% 'set bolAdminView to true since this display is for Admin purposes bolAdminView = True 'set the strPostingPath with admin path strPostingPath = "/admin/posting_edit.asp?mode=edit&id=" 'if the selected year is valid then... If SelectedYearIsValid(intPostingTypeId, intSelectedYear) Then 'write list of postings for the selected year Response.Write ManagePostings(intPostingTypeId, intSelectedYear, strPostingPath, bolAdminView) Else 'write list of most recent (year) postings Response.Write ManageRecentPostings(intPostingTypeId, strPostingPath, bolAdminView) End If %>
<% 'close the data connection Call CloseConn() 'END: DISPLAY POSTING INDEX End If %>