%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Used Product Categories" %> <% PageID=253 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%UCategoryAdd%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub UCategoryAdd OpenConnection1 pointer=Request.QueryString("P") If Request.QueryString("DC")<>"" then Del="DELETE FROM UCategories 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 UCategories" rs.Open SEL,DB,1,3 rs.AddNew rs("txtCategory")=dbReplace(txtCategory) rs.Update rs.Close End If End If %>
<%= FormatDateTime(Date,1) %>
Used Products cannot be entered without a Product Category.
Please add a Product Category to the database first.
<%=error%>
<%End If%>| Current 'Used Product' Categories: | |
| No 'Used 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"> |