<% 'open data connection OpenConn() %> <%'Include Utility Scripts%> <% 'close data connection CloseConn() %> <% 'dim strMode - The strMode variable is defined in the header_inc.asp file. 'dim strLanguage - The strLanguage variable is defined in the common_utils.asp file. dim intPostingId dim intPostingTypeId dim intContentTypeId dim datPostingDate dim intOpenInNewWindow dim strPostingTitle dim strPostingBody 'if form elements have been submitted then... If Request.Form <> "" Then 'set the posting info variables with the relevant form element values strMode = Trim(Request.Form("txtMode")) intPostingId = Trim(Request.Form("txtId")) intPostingTypeId = Trim(Request.Form("txtPostingTypeId")) Select Case True Case Trim(Request.Form("selDynamicContentType")) <> "" intContentTypeId = Trim(Request.Form("selDynamicContentType")) Case Trim(Request.Form("txtContentTypeId")) <> "" intContentTypeId = Trim(Request.Form("txtContentTypeId")) End Select datPostingDate = Trim(Request.Form("txtPostingDate")) intOpenInNewWindow = Trim(Request.Form("chkOpenInNewWindow")) strPostingTitle = Trim(Request.Form("txtPostingTitle")) strPostingBody = Trim(Request.Form("txtPostingBody")) 'if the intContentTypeId = 3 (is an uploaded file) If intContentTypeId = 3 Then strPostingBody = Replace(strPostingBody, Chr(92), "/") End If 'if the chkOpenInNewWindow form element does not contain a value (chkOpenInNewWindow was not checked) then... If intOpenInNewWindow = "" Then 'set the intOpenInNewWindow variable value to zero (0) intOpenInNewWindow = 0 End If 'if form elements have not been submitted then... Else 'redirect the user to the posting type index Response.Redirect("/admin/posting.asp") End If %>
<% 'evaluate the user's selection of content type for the current posting... Select Case True 'if the current posting's content is a URL or an Uploaded document then... Case (intContentTypeId = 1 Or intContentTypeId = 3) 'output the URL or the Uploaded document into the inline frame (iframe) Response.Write "" 'if the current posting's content is HTLM text and images then... Case (intContentTypeId = 2) 'output the HTML text and images Response.Write "

" & datPostingDate & "

" & "

" & strPostingTitle & "

" & "

" & strPostingBody & "

" End Select %>
Update<%Else%>Add<%End If%>" onclick="if(this.form.txtMode.value=='continue'){if(this.form.txtId.value==''){this.form.txtMode.value='add';}else{this.form.txtMode.value='edit';}}">      ">