%@ Language=VBScript %>
<%Response.Buffer=True%>
<% Updated = Request.QueryString("Updated") %>
<% PageTitle = "SiteManager - Add Monthly Special" %>
<% PageID=602 %>
<% Header %>
<% Menu PageID %>
<%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %>
<%monthlyadd%>
<%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %>
<% Footer %>
<% Sub monthlyadd
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"))
If txtHeading<>"" And txtDescription<>"" Then
SEL="SELECT * FROM Monthly"
rs.Open SEL,DB,1,3
rs.AddNew
rs("txtHeading")=dbReplace(txtHeading)
rs("txtDescription")=dbReplace(txtDescription)
rs("nDisplay")=0
rs.Update
rs.Close
SEL="SELECT MAX(MonthlyID) AS MID FROM Monthly"
rs.Open SEL,DB,1,3
MonthlyID = rs("MID")
rs.Close
Response.Redirect ("monthly_images.asp?MID=" & MonthlyID)
Else
If txtHeading="" then
error=error & "A blank Heading cannot be saved.
"
End If
If txtDescription="" then
error=error & "A blank Description cannot be saved.
"
End If
End If
If txtHeading<>"" Then txtHeading=DisPrepText(txtHeading)
If txtDescription<>"" Then txtDescription=DisPrepText(txtDescription)
End If%>
<%= FormatDateTime(Date,1)%>
<%End Sub%>