www.gusucode.com > 翼动留言板 2.1源码程序 > inc/Manage.asp
<% '************************************************************************************ '开发组 翼动工作室 '姓名 郑景德 '网名 旭日 'QQ 3178920 '个人网站 http://www.wingroom.com '本页: '系统管理函数 ' '************************************************************************************ Class Manage '管理员用户和密码验证 Public Function Check_Power(strUserName,strPassWord) Dim Rs,Sql,Msg Msg="" Db.Open() Sql = "select * from wr_Power where Power='"& strUserName &"'" Set Rs = Db.ExeCute(Sql) If Rs.Eof And Rs.Bof Then Rs.Close Set Rs = Nothing Db.Close Flib.Alert "该用户不存在,请查看输入是否有误!","BACK",0 Exit Function End If Sql = "select * from wr_Power where Power='"& strUserName &"' and Pwd='"& strPassWord &"'" Set Rs = Db.ExeCute(Sql) If Rs.Eof And Rs.Bof Then Msg = "密码输入有误,请重新登录!" Else Session("Power") = Rs("Power") Session("UserName") = "管理员" Session("Flag") = "Logined" End If Rs.Close Set Rs = Nothing Db.Close() If Msg <> "" Then Flib.Alert Msg,"BACK",1 Response.End Else Response.Redirect("Book_Manage.asp") End If End Function End Class %>