<%@ LANGUAGE="VBSCRIPT" %> <% Response.Buffer = True %> <% ID = Request.Querystring("ID") Action = Request("Action") ConnGuestBook_ConnectionString = "DBQ=" & Server.Mappath("..\..\_database2\guestbook2.mdb") & ";DefaultDir=" & Server.Mappath("..\..\_database2") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;" ConnGuestBook_ConnectionTimeout = 15 ConnGuestBook_CommandTimeout = 30 ConnGuestBook_RuntimeUserName = "admin" ConnGuestBook_RuntimePassword = "" %> ASPGuest By CJWSoft <% If Session("ACCESS") = "Yes" Then %> <% If Action = "Delete" Then %> <% Set ConnGuestBook = Server.CreateObject("ADODB.Connection") ConnGuestBook.ConnectionTimeout = ConnGuestBook_ConnectionTimeout ConnGuestBook.CommandTimeout = ConnGuestBook_CommandTimeout ConnGuestBook.Open ConnGuestBook_ConnectionString, ConnGuestBook_RuntimeUserName, ConnGuestBook_RuntimePassword Set cmdTemp = Server.CreateObject("ADODB.Command") Set CmdDeleteListing = Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "DELETE FROM BOOK1 WHERE (ID = " & ID & ")" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = ConnGuestBook CmdDeleteListing.Open cmdTemp, , 0, 1 %> <% Sub TLdelaySec(DelaySeconds) SecCount = 0 Sec2 = 0 While SecCount < DelaySeconds + 1 Sec1 = Second(Time()) If Sec1 <> Sec2 Then Sec2 = Second(Time()) SecCount = SecCount + 1 End If Wend End Sub %> <% TLdelaySec(2) %> <% Response.Redirect ("default.asp") %> <% Else %>

ARE YOU SURE YOU WANT TO DELETE THIS MESSAGE ?

Yes / No

<% End If %> <% Else %>

You Dont Have Access To Delete

Log In And Try Again

<% End If %>