%@ Language=VBScript %>
<%Response.Buffer=True%>
<% Updated = Request.QueryString("Updated") %>
<% PageTitle = "SiteManager - Add Whats New" %>
<% PageID=502 %>
<% Header %>
<% Menu PageID %>
<%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %>
<%WhatsNewAdd%>
<%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %>
<% Footer %>
<% Sub WhatsNewAdd
error = ""
OpenConnection1
SET rs=Server.CreateObject("ADODB.Recordset")
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"
rs.Open SEL,DB,1,3
rs.AddNew
rs("txtHeading")=dbReplace(txtHeading)
rs("txtDescription")=dbReplace(txtDescription)
rs("datInstall")=datInstall
rs.Update
EntryID = rs("EntryID")
rs.Close
Response.Redirect ("WhatsNew_Images.asp?EID=" & EntryID)
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=""
End If%>
<%= FormatDateTime(Date,1)%>
<%End Sub%>