<% If Session("admin") = False or IsNull(Session("admin")) = True then response.Redirect("login.asp?strMode=edit") End If %> <% Response.Buffer = True Dim rs Dim blog_id Dim numero_commenti Dim i Dim SQL Dim rsdelete Dim commento_id Dim page Dim Block Dim msg page=Request.QueryString("page") Block=Request.QueryString("Block") blog_id = Request.querystring("blog_id") Set rs = Server.CreateObject("ADODB.Recordset") rs.LockType = 3 strSQL = "Select * from blog where blog_id =" & blog_id & "" rs.Open strSQL, strCon If NOT rs.EOF Then rs.Delete rs.Close Set rs = Nothing Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "Select * from commenti where blog_id =" & blog_id & "" rs.CursorType = 3 rs.Open strSQL, strCon numero_commenti = rs.RecordCount For i = 1 to numero_commenti If rs.EOF Then Exit For commento_id = rs("commento_id") SQL="delete FROM commenti where commento_id=" & commento_id set rsdelete=adoCon.execute(SQL) rs.MoveNext Next rs.Close Set rs = Nothing Set adoCon = Nothing Set strCon = Nothing msg = strLangInfoDelBlog response.Redirect("editallblog.asp?page=" & page & "&Block=" & Block & "&msg="& msg &"") %>