<%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Add Used Products" %> <% PageID=252 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%ProductAdd%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub ProductAdd error = "" OpenConnection1 SET rs=Server.CreateObject("ADODB.Recordset") If Request.ServerVariables ("REQUEST_METHOD") = "POST" then txtProduct = TRIM(Request.Form("txtProduct")) txtTeaser=Trim(Request.Form("txtTeaser")) nCatID = Request.Form("selCat") txtDescription = TRIM(Request.Form("txtDescription")) txtManufacturer = TRIM(Request.Form("txtManufacturer")) txtManURL = Trim(Request.Form("txtManURL")) If txtProduct<>"" And txtDescription<>"" And nCatID<>0 then SEL="SELECT * FROM UProducts" rs.Open SEL,DB,1,3 rs.AddNew rs("nCatID")=nCatID rs("txtProduct")=dbReplace(txtProduct) rs("txtTeaser")=dbReplace(txtTeaser) rs("txtDescription")=dbReplace(txtDescription) rs("txtManufacturer")=dbReplace(txtManufacturer) rs("txtManURL")=dbReplace(txtManURL) rs.Update ProdID = rs("ProductID") rs.Close Response.Redirect ("UProduct_Details.asp?PID=" & ProdID) Else If txtProduct="" then error="The Product Name is required.
" End If If txtDescription="" then error=error & "The Product Description is required.
" End If If nCatID=0 then error=error & "Please select a Product Category.
" End If End If End If Sel="Select * FROM UCategories" rs.Open Sel,DB,1,3 If rs.EOF then rs.Close Response.Redirect("UCategory_Add.asp?PA=1") End If %>

<%= FormatDateTime(Date,1)%>

<%If error<>"" then%>

<%=error%>

<%error="" End If%>
Product Category:
Product Name:
Product Teaser:
Product Description:
Manufacturer:
Manufacturer's Website:


<%End Sub%> <% Function IsSelected(value,data) If value=data then IsSelected="Selected" Else IsSelected="" End If End Function %>