<!--#include file="conn.asp"-->

<%
id=request.querystring("id")
bid=cint(request.querystring("bid"))
if id="" or  not isnumeric(id) then
response.write"错误的请求"
response.end 
end if 


username=Request.Cookies("esung")("username")
password=Request.Cookies("esung")("password")
  set rs1=server.createobject("adodb.recordset")
    sql="select * from member where username='" &username& "'  "
    rs1.open sql,conn,1,1
    if  rs1.eof then
response.write"<script language='javascript'>alert('用户名密码错误！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if
if password<>rs1("password") then
response.write"<script language='javascript'>alert('用户名密码错误！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if
if rs1("manbid")=20000 or rs1("manbid")=bid or rs1("manbid")=8888 then

 
url="list.asp?bid="&bid&""
set rs=server.createobject("adodb.recordset")
sql="select * from book where id=" & id
rs.open sql,conn,3,3
rs.delete
conn.execute "delete from book where type in ("&id&")"
response.redirect url
rs.close
conn.close
set rs=nothing
set conn=nothing
else 
response.write"<script language='javascript'>alert('你没有权限进行操作！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end

end if
%>