<!--#include file="conn.asp"-->
<%
username=Request.Cookies("esung")("username")
password=Request.Cookies("esung")("password")
bid=cint(request.querystring("bid"))
  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



action=request.querystring("action")
id=request.querystring("id")
url=Request.ServerVariables("HTTP_REFERER")

if action="gd" then
conn.execute("update book set gd=2 where id="&id&"") 
response.write"<script language='javascript'>alert('固顶操作成功！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"

elseif action="nogd" then
conn.execute("update book set gd=0 where id="&id&"") 
response.write"<script language='javascript'>alert('取消固顶成功！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
elseif action="lock" then
conn.execute("update book set lock=1 where id="&id&"") 
response.write"<script language='javascript'>alert('帖子锁定成功！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
elseif action="nolock" then
conn.execute("update book set lock=0 where id="&id&"") 
response.write"<script language='javascript'>alert('取消锁定成功！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"

elseif action="jh" then
conn.execute("update book set good=1 where id="&id&"") 
response.write"<script language='javascript'>alert('设置精华成功！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"

elseif action="nojh" then
conn.execute("update book set good=0 where id="&id&"") 
response.write"<script language='javascript'>alert('取消精华成功！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
end if

else 
response.write"<script language='javascript'>alert('你没有权限进行操作！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end

end if
%> 
