龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > asp编程 >

锁定用户函数

时间:2012-12-31 22:56来源:未知 作者:admin 点击:
分享到:
锁定用户函数 我们经常会看到在BBS里面禁止用户发贴,或锁定用户不能登录等,下面我们就来看看这些功能是怎么用程序实现的吧. Sub Lockuser() Dim UserStatus If XmlDoc.documentElement.selectSingleNo

锁定用户函数

我们经常会看到在BBS里面禁止用户发贴,或锁定用户不能登录等,下面我们就来看看这些功能是怎么用程序实现的吧.

Sub Lockuser()
 Dim UserStatus
 If XmlDoc.documentElement.selectSingleNode("userstatus") is Nothing Then
  Messenge = "<li>参数非法,中止请求。</li>"
  Status = 1
  Exit Sub
 ElseIf Not IsNumeric(XmlDoc.documentElement.selectSingleNode("userstatus").text) Then
  Messenge = "<li>参数非法,中止请求。</li>"
  Status = 1
  Exit Sub
 Else
  UserStatus = Clng(XmlDoc.documentElement.selectSingleNode("userstatus").text)
 End If
 If UserStatus = 0 Then
  Newasp.Execute ("UPDATE NC_User SET UserLock=0 WHERE Username='" & UserName & "'")
 Else
  Newasp.Execute ("UPDATE NC_User SET UserLock=1 WHERE Username='" & UserName & "'")
 End If
 Status = 0
End Sub


精彩图集

赞助商链接