<% If z1_AccessLevel <> 3 Then Response.Redirect "ui_index.asp?msg=You do not have access to that page" End If Dim zintCatID,zblnEditCat zintCatID = Trim(Request.QueryString("catid")) If zintCatID <> "" And IsNumeric(zintCatID) Then zblnEditCat = True End If %> kaos news - update area
<% Dim zobjRS,zobjRS1,zstrCatName,zstrUpdateType zstrUpdateType = "add" Set zobjRS1 = Server.CreateObject("ADODB.Recordset") If zblnEditCat Then zstrSQL = "SELECT CategoryName FROM categories WHERE Category LIKE " & zintCatID zobjRS1.Open zstrSQL, zobjConn, adOpenForwardOnly, adLockReadOnly, adCmdText If Not zobjRS1.EOF Then zstrCatName = zobjRS1("CategoryName") zstrUpdateType = "edit" Response.Write "edit category details:" Else Response.Write "category requested could not be found. enter new category details:" End If zobjRS1.Close Else Response.Write "enter new category details:" End If %>
category name

click here to submit these changes.

existing categories: <% zstrSQL = "SELECT * FROM categories ORDER BY Category ASC" zobjRS1.Open zstrSQL, zobjConn, adOpenForwardOnly, adLockReadOnly, adCmdText If Not zobjRS1.EOF Then zobjRS = zobjRS1.GetRows() End If zobjRS1.Close Set zobjRS1 = Nothing If IsArray(zobjRS) Then Dim zobjComm Set zobjComm = Server.CreateObject("ADODB.Command") zobjComm.ActiveConnection = zobjConn zobjComm.CommandType = adCmdText Dim bgcol,i,ii ii = UBound(zobjRS,2) bgcol = "eeeeee" For i = 0 To ii zobjComm.CommandText = "SELECT COUNT(*) As rscount FROM news WHERE news.Category LIKE " & zobjRS(0,i) Set zobjRS1 = zobjComm.Execute Response.Write "" Set zobjRS1 = Nothing If bgcol = "eeeeee" Then bgcol = "dddddd" Else bgcol = "eeeeee" End If Next Erase zobjRS Set zobjComm = Nothing End If zobjConn.Close Set zobjConn = Nothing %>
 category name number of posts contained delete
" & zobjRS(1,i) & "" & zobjRS1("rscount") & "" & _ "