最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 删除用户程序
时间:2022-07-02 22:43:58 编辑:袖梨 来源:一聚教程网
网站管理员可以根据用户在网站的活动与合法性进行管理,如果实现是无法可忍的可以删除用户,这里不到是说是删除用户可以删除文件等,这只是一个简单的文件程序了,看了以后你自己怎么使用是你自己的事喽.
Sub Deleteuser()
Dim Del_Users,i,AllUserID,Del_UserName
Dim Rs
Del_Users = Split(UserName,",")
For i = 0 To UBound(Del_Users)
Del_UserName = Newasp.CheckBadstr(Del_Users(i))
Set Rs = Newasp.Execute("SELECT userid,username FROM [NC_User] WHERE UserName='" & Del_UserName & "'")
If Not (Rs.Eof And Rs.Bof) Then
AllUserID = AllUserID & Rs(0) & ","
Newasp.Execute("UPDATE NC_Message SET delsend=1 WHERE sender='"& Newasp.CheckStr(Rs(1)) &"'")
Newasp.Execute("DELETE FROM NC_Message WHERE flag=0 And incept='"& Newasp.CheckStr(Rs(1)) &"'")
Messenge = Messenge & "
End If
Next
Set Rs = Nothing
If AllUserID <> "" Then
If Right(AllUserID,1) = "," Then AllUserID = Left(AllUserID,Len(AllUserID)-1)
Newasp.Execute ("DELETE FROM NC_User WHERE userid in (" & AllUserID & ")")
Newasp.Execute ("DELETE FROM NC_Favorite WHERE userid in (" & AllUserID & ")")
Newasp.Execute ("DELETE FROM NC_Friend WHERE userid in (" & AllUserID & ")")
End If
Status = 0
End Sub
相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20