最新下载
热门教程
- 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()
%>
本站原创 转载注明来源于本站
相关文章
- 手机微博网页版如何看热搜 04-19
- 儿歌多多如何查看个人音频 04-19
- 东呈会积分如何抽奖 04-19
- 美图秀秀如何进行调色调光 04-19
- 学习通官方网站首页在哪 04-19
- 电脑版139邮箱登录入口在哪 04-19