<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%>
<!--#include file="../md5.asp"-->
<%dim action,user,userid
action=request.QueryString("action")
userid=request.QueryString("id")
user=trim(request("user"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shjia where shjiaid="&userid,conn,1,3
select case action
'//修改数据
case "edit"
rs("flag")=int(request("flag"))
rs("tj")=int(request("tj"))
rs.Update
response.Write "<script language=javascript>alert('修改成功！');history.go(-1);</script>"
response.End

'//删除数据
case "del"
conn.execute ("delete from shjia where shjiaid="&request.QueryString("id"))
conn.execute ("delete from news where shjiaid="&request.QueryString("id"))
conn.execute ("delete from shop_books where shjiaid="&request.QueryString("id"))
response.Redirect "manageshjia.asp"
end select
rs.Close
set rs=nothing
%>