%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Edit Used Product" %> <% PageID=254 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%UProductEdit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub UProductEdit%>
<%= 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 UProducts WHERE ProductID=" & ProdID rs.Open SQL,DB,1,3 If rs.EOF then rs.Close Response.Redirect("UProduct_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("UProduct_Details.asp?PID=" & ProdID) End If End If If TRIM(Request.Form("txtProduct"))="" then error = "A Product Name is required.<%=error%>
<% error="" End If %>