%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - New Product Categories" %> <% PageID=304 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%SCategoryAdd%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub SCategoryAdd OpenConnection1 If Request.QueryString("DC")<>"" then Del="DELETE FROM SCategories 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 SCategories" 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 Supply Categories: | |
| No Supply 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"> |