<%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - 'What's New' Edit" %> <% PageID=504 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%WhatsNewEdit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub WhatsNewEdit error = "" OpenConnection1 SET rs=Server.CreateObject("ADODB.Recordset") EntryID=Request.QueryString("EID") If Request.ServerVariables ("REQUEST_METHOD") = "POST" Then txtHeading=TRIM(Request.Form("txtHeading")) txtDescription=TRIM(Request.Form("txtDescription")) datInstall=Trim(Request.Form("datInstall")) If datInstall="" Then datInstall="empty" If txtHeading<>"" And txtDescription<>"" And IsDate(datInstall) Then SEL="SELECT * FROM WhatsNew WHERE EntryID=" & EntryID rs.Open SEL,DB,1,3 If rs.EOF Then rs.Close Response.Redirect("WhatsNew_List.asp") End If rs("txtHeading")=dbReplace(txtHeading) rs("txtDescription")=dbReplace(txtDescription) rs("datInstall")=datInstall rs.Update rs.Close Response.Redirect ("WhatsNew_List.asp") Else error = "A 'What's New' entry cannot be saved without:
" If txtHeading="" Then error=error & "...a Heading.
" End If If txtDescription="" Then error=error & "...a Description.
" End If If datInstall="empty" Then error=error & "...an Installation Date.
" ElseIf Not IsDate(datInstall) Then error=error & "...a valid date format.
Format example: mm/dd/yy
" End If End If If txtHeading<>"" Then txtHeading=DisPrepText(txtHeading) If txtDescription<>"" Then txtDescription=DisPrepText(txtDescription) If datInstall="empty" Then datInstall="" Else Sel="SELECT * FROM WhatsNew WHERE EntryID=" & EntryID rs.Open Sel,DB,1,3 If rs.EOF Then rs.Close Response.Redirect("WhatsNew_List.asp") End If txtHeading=DisPrepText(rs("txtHeading")) txtDescription=DisPrepText(rs("txtDescription")) datInstall=rs("datInstall") rs.Close End If%>

<%= FormatDateTime(Date,1)%>

<%If error<>"" Then%>

<%=error%>

<%error="" End If%>
Edit What's New Entry:

Heading:
Description:
Installation Date:

(mm/dd/yy)

<%End Sub%>