%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - New Product Category" %> <% PageID=203 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%PCategoryAdd%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub PCategoryAdd OpenConnection1 If Request.QueryString("DC")<>"" then Del="DELETE FROM PCategories WHERE CatID=" & Request.QueryString("DC") DB.Execute(Del) End If error = "" SET rs = Server.CreateObject("ADODB.Recordset") If Request.Form("hidSave")="true" then txtCategory=Trim(Request.Form("txtCategory")) If txtCategory="" then error="Enter the new category and press Save." If error="" then SEL = "SELECT * FROM PCategories" rs.Open SEL,DB,1,3 rs.AddNew rs("txtCategory")=dbReplace(txtCategory) rs.Update rs.Close End If End If %>
<%= FormatDateTime(Date,1) %>
Products cannot be entered without a Product Category.
Please add a Product Category to the database first.
<%=error%>
<%End If%>| Current 'New Product' Categories: | |
| No 'New Product' Categories in database. | |
| " title="Click here to edit this Category"> |
<%=rs("txtCategory")%>
<%If CatEmpty(rs("CatID")) then%>
" title="Click here to delete this empty Category"> |