📄 chklogin.asp
字号:
<!--#include file="function/dbconn.asp"-->
<!--#include file="function/chkLogin.asp"-->
<!--#include file="function/Function.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
Dim userName,PassWord,LoginPara
UserName = Request.Form("User_Name")
PassWord = Request.Form("Pass_Word")
If Len(UserName) = 0 Then
ShowMessage "请输入登陆名!",1
End If
If Len(PassWord) = 0 Then
ShowMessage "请输入登陆密码!",1
End If
LoginPara = Chk_Login(UserName,PassWord)
LoginInfo = ReturnLoginValue(LoginPara)
ShowMessage LoginInfo,LoginPara
Private Function ReturnLoginValue(ByVal Value)
'返回登陆消息
'使用方法: Response.Write ReturnLoginValue(chkLogin返回值)
Select Case Value
Case -1
ReturnLoginValue = "您输入的用户不存在,请点击返回重新输入!"
Case 0
ReturnLoginValue = "您输入的密码不正确,请点击返回重新输入!"
Case 1
ReturnLoginValue = "登陆成功!"
Case 2
ReturnLoginValue = "您的帐号还没有通过审核,请电话联系我们!"
End Select
End Function
Private Sub ShowMessage(strValue,IsBack)
With Response
.Write "<script>" & vbcrlf
.Write "alert('" & strValue & "');" & vbcrlf
if IsBack=1 Then
.Write "top.location.href='products.asp'" & vbcrlf
Else
.Write "history.back();" & vbcrlf
End if
.Write "</script>" & vbcrlf
End with
Response.End
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -