%@ Language=VBScript %>
<%Response.Buffer=True%>
<% Updated = Request.QueryString("Updated") %>
<% PageTitle = "SiteManager - Monthly Special Edit" %>
<% PageID=604 %>
<% Header %>
<% Menu PageID %>
<%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %>
<%monthlyedit%>
<%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %>
<% Footer %>
<% Sub monthlyedit
error = ""
OpenConnection1
SET rs=Server.CreateObject("ADODB.Recordset")
If Request.QueryString("MA")<>"" then
SEL="SELECT * FROM Monthly WHERE MonthlyID=" & Request.QueryString("MA")
rs.Open SEL,DB,1,3
If Not rs.EOF then
rs("nDisplay")=1
rs.Update
rs.Close
Response.Redirect("monthly_list.asp")
Else
rs.Close
Response.Redirect("monthly_list.asp")
End If
ElseIf Request.QueryString("MR")<>"" then
SEL="SELECT * FROM Monthly WHERE MonthlyID=" & Request.QueryString("MR")
rs.Open SEL,DB,1,3
If Not rs.EOF then
rs("nDisplay")=0
rs.Update
rs.Close
Response.Redirect("monthly_list.asp")
Else
rs.Close
Response.Redirect("monthly_list.asp")
End If
Else
MonthID=Request.QueryString("MID")
End If
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 WHERE MonthlyID=" & MonthID
rs.Open SEL,DB,1,3
If rs.EOF Then
rs.Close
Response.Redirect("monthly_list.asp")
End If
rs("txtHeading")=dbReplace(txtHeading)
rs("txtDescription")=dbReplace(txtDescription)
rs.Update
rs.Close
Response.Redirect ("monthly_list.asp")
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)
Else
Sel="SELECT * FROM Monthly WHERE MonthlyID=" & MonthID
rs.Open Sel,DB,1,3
If rs.EOF Then
rs.Close
Response.Redirect("monthly_list.asp")
End If
txtHeading=DisPrepText(rs("txtHeading"))
txtDescription=DisPrepText(rs("txtDescription"))
nDisplay=rs("nDisplay")
rs.Close
End If%>
<%= FormatDateTime(Date,1)%>
<%If nDisplay=0 then%>|
This Monthly Special is not available for on-line viewing. |
|
This Monthly Special is available for on-line viewing. |