日期:2014-05-16 浏览次数:20861 次
<%
if Session("adminid")="admin" then '我在数据库建了个authority(权限)字段,数据类型是数字,想通过0和1判断是否可以执行删除权限
if request("id")<>"" then
set rs=conn.execute("delete from light where id="&request("id"))
response.write "<script language='javascript'>"
response.write "alert('删除成功!');"
response.write "window.location.href='importlist.asp';"
response.write "</script>"
else
conn.execute "delete from light where id in("&request("chkOne")&")"
response.write "<script language='javascript'>"
response.write "alert('删除成功!');"
response.write "window.location.href='importlist.asp';"
response.write "</script>"
end if
else
response.write "<script language='javascript'>"
response.write "alert('对不起,您没有权限删除记录!');"
response.write "window.location.href='importlist.asp';"
response.write "</script>"
end if
%>