最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 列出数据并且根据权限删除记录代码
时间:2022-07-02 23:01:19 编辑:袖梨 来源:一聚教程网
连接程序
set rs=server.CreateObject("adodb.recordset")
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="provider=microsoft.jet.oledb.4.0; data source="&server.mappath("datasource/hhinfo.mdb")
显示出数据表中的所有数据
| 用户名 | 用户类型 | 添加时间 | 删除用户 |
| :return confirm('确实删除该用户!')">删除 |
deluse.asp删除记录的功能
"超级管理员" then
response.redirect"login.html"
end if
dim id,sql
id=cint(html_encode(request.QueryString("id")))
if not isnumeric(id) or len(id)=0 then
response.Redirect("login.html")
else
sql="delete * from mange_user where id="&id
sql1="select * from mange_user where id="&id
call opendb()
rs.open sql1,conn,1,1
if not rs.eof then
if rs("use_name")=session("username") or session("use_type")"超级管理员" then
response.write("对不起,不能删除自己或你不是超级管理员")
response.end()
end if
else
response.Write("删除失败")
end if
conn.execute(sql)
if err=0 then
response.Redirect("add_use.asp")
else
response.Write("删除失败")
end if
end if
call closedb()
%>
本站原创 转载注明来源于本站
相关文章
- 原神2025最新兑换码有哪些 限时前瞻福利领取 11-16
- 百炼英雄2025兑换码大全 最新礼包福利领取合集 11-16
- 寻道大千2025兑换码 最新可用的礼包码合集 11-16
- 蛋仔派对2025兑换码 最新礼包码合集 11-16
- 元气骑士2025兑换码大全 最新可用礼包码合集 11-16
- 明日方舟终末地测试资格查询入口 官方验证方法一览 11-16