⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 WAPmo手机网站管理平台是一款创建与管理维护WAP网站的的软件产品
💻 ASP
字号:
<%
Class ImplMocomWAPmoManagerLogin
Private blnError
Private strReason

Public Sub main()
    If MyIO.Env("REQUEST_METHOD") = "POST" Then
        Call doPost
    Else
        Call doGet
    End If
End Sub

Private Sub doGet()
    Dim tmp
    tmp = GetFileString(GetMapPath("templet/manager/login.html"), LOCAL_CHARSET)
    tmp = Replace(tmp, "${SiteName}", MyKernel.Config("SiteName"))
    MyIO.Echo tmp
End Sub

Private Sub doPost()
    Dim strName, strPass
    Dim strCode
    Dim objCmd, strSQL
    strName = Trim(MyIO.Form("UserId"))
    strPass = Trim(MyIO.Form("Passwd"))
    strCode = Trim(MyIO.Form("Code"))
    blnError = True
    If strName = "" Then
        strReason = "请输入管理员帐号"
    ElseIf strPass = "" Then
        strReason = "请输入管理员密码"
    ElseIf strCode = "" Then
        strReason = "请输入验证码"
    ElseIf strCode <> Session.Contents("Code") Then
        strReason = "验证码错误"
    Else
        Set objCmd = MyKernel.Command(T_ADMIN)
        objCmd.CommandType = "SELECT"
        objCmd.Where = "NAME='" & SafeString(strName) & "'"
        If Not objCmd.Exec Then
            strReason = "错误的帐号或密码"
        ElseIf objCmd("Passwd") <> MD5(strPass) Then
            strReason = "错误的帐号或密码"
        ElseIf objCmd("Forbid") = 1 Then
            strReason = "该帐号已被超级管理员禁用"
        Else
            blnError = False
            strReason = "登录成功"
            objCmd.CommandType = "UPDATE"
            objCmd.Where = "SEQID=" & objCmd("SeqId")
            objCmd.Add "LoginCount", objCmd("LoginCount") + 1
            objCmd.Add "Outime", GetTime(Now())
            objCmd.Exec
            Dim objCookie
            Set objCookie = vbsre.mocom.util.Cookie
            objCookie("WM_Admin").Column = "Name|Passwd|Power"
            objCookie("WM_Admin")("Name") = strName
            objCookie("WM_Admin")("Passwd") = strPass
            objCookie("WM_Admin")("Power") = MyKernel.DB.GetRow(MyKernel.DB.GetLimitSQL(1, "Power", T_ADMIN_GROUP, "SEQID=" & objCmd("GroupId"), "", ""))
            Set objCookie = Nothing
        End If
        Set objCmd = Nothing
    End If
    Session.Contents.Remove "Code"
    MyIO.Echo "<html>"
    MyIO.Echo "<head>"
    MyIO.Echo "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />"
    MyIO.Echo "<meta http-equiv=""Cache-Control"" content=""no-cache, max-age=0"" />"
    If Not blnError Then
        MyIO.Echo "<meta http-equiv=""refresh"" content=""1;url=admin.asp"" />"
    End If
    MyIO.Echo "<title>" & MyKernel.Config("SiteName") & " - 管理员登录</title>"
    MyIO.Echo "<link rel=""stylesheet"" href=""images/xw.css"" />"
    MyIO.Echo "</head>"
    MyIO.Echo "<body class=""system"">"
    MyIO.Echo "<table border=""0"" cellpadding=""0"" cellspacing=""0"" style=""width:100%;height:100%"">"
    MyIO.Echo "<tr>"
    MyIO.Echo "<td align=""center"" valign=""middle"">"
    MyIO.Echo "<table width=""300"" border=""1"" cellpadding=""2"" cellspacing=""0"" bordercolor=""#000000"" style=""border-collapse:collapse"">"
    MyIO.Echo "<tr>"
    MyIO.Echo "<td class=""winT0""><b>" & MyKernel.Config("SiteName") & " 管理员登录</b></td>"
    MyIO.Echo "</tr>"
    If Not blnError Then
        MyIO.Echo "<tr class=""winT1"">"
        MyIO.Echo "<td align=""center"">"
        MyIO.Echo "<font color=""#0000FF"">" & strReason & "</font><br/>"
        MyIO.Echo "如果您的浏览器不支持重定向,请<a href=""admin.asp"" target=""_top"">点此进入</a>"
        MyIO.Echo "</td>"
        MyIO.Echo "</tr>"
    Else
        MyIO.Echo "<tr class=""winT1"">"
        MyIO.Echo "<td align=""center""><font color=""#FF0000"">登录失败:" & strReason & "</font></td>"
        MyIO.Echo "</tr>"
        MyIO.Echo "<tr class=""winT1"">"
        MyIO.Echo "<td align=""center""><input type=""button"" value=""返  回"" class=""btn"" onclick=""location.replace('" & MyIO.Env("SCRIPT_NAME") & "')"" /></td>"
        MyIO.Echo "</tr>"
    End If
    MyIO.Echo "</table>"
    MyIO.Echo "</td>"
    MyIO.Echo "</tr>"
    MyIO.Echo "</table>"
    MyIO.Echo "</body>"
    MyIO.Echo "</html>"
End Sub

Public Function newInstance()
    Set newInstance = New ImplMocomWAPmoManagerLogin
End Function
End Class
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -