%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Edit New Product" %> <% PageID=204 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%ProductEdit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub ProductEdit%>
<%= FormatDateTime(Date,1) %>
<% ProdID = Request.QueryString("PID") Response.Buffer=True error = "" OpenConnection1 SET rs=Server.CreateObject("ADODB.Recordset") If Request.Form("hidSave")="true" then If TRIM(Request.Form("txtDescription"))<>"" AND TRIM(Request.Form("txtProduct"))<>"" then nCatID = Request.Form("selCat") txtProduct = dbReplace(Trim(Request.Form("txtProduct"))) txtTeaser=dbReplace(Trim(Request.Form("txtTeaser"))) txtDescription = dbReplace(Trim(Request.Form("txtDescription"))) txtManufacturer = dbReplace(Trim(Request.Form("txtManufacturer"))) txtManURL = dbReplace(Trim(Request.Form("txtManURL"))) SQL="SELECT * FROM Products WHERE ProductID=" & ProdID rs.Open SQL,DB,1,3 If rs.EOF then rs.Close Response.Redirect("Product_Details.asp?PID=" & ProdID) Else rs("nCatID") = nCatID rs("txtProduct") = txtProduct rs("txtTeaser")=txtTeaser rs("txtDescription") = txtDescription rs("txtManufacturer") = txtManufacturer rs("txtManURL") = txtManURL rs.Update rs.Close Response.Redirect("Product_Details.asp?PID=" & ProdID) End If End If If TRIM(Request.Form("txtProduct"))="" then error = "A Product Name is required.<%=error%>
<% error="" End If %>