<% if session("access")="ok" then if lock="yes" then //封版移至訊息0 response.redirect "msg.asp?msg=0" //封版則停止解析ASP response.end end if //刪除主題 titleid = request.querystring("titleid") DATAS = server.mappath("sql/dismdb.mdb") set conn = server.createobject("adodb.connection") conn.open "Driver={Microsoft Access Driver (*.mdb)};dbq=" & DATAS & ";" set rs = server.CreateObject("ADODB.RecordSet") sql="select * from title where id=" & titleid & " " //檢驗主題是否存在 rs.open sql,conn,1,3 if rs.BOF then response.redirect "msg.asp?msg=9" rs.close conn.close response.end end if //刪除 rs.delete rs.update rs.close conn.close //刪除主題內容 titleid = request.querystring("titleid") DATAS = server.mappath("sql/dismdb.mdb") set conn = server.createobject("adodb.connection") conn.open "Driver={Microsoft Access Driver (*.mdb)};dbq=" & DATAS & ";" set rs = server.CreateObject("ADODB.RecordSet") sql="select * from main where titleid=" & titleid & " " rs.open sql,conn,1,3 //總筆數 howfws = rs.recordcount //刪除 for n=0 to howfws rs.movenext if rs.EOF then exit for end if rs.delete rs.update next rs.close conn.close %>

..::刪除完成::..


刪除完成

八秒後自動回到首頁或按此回到首頁

<% response.end end if response.redirect "login.html" response.end %>