📄 chkuser_login.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="mdb.asp" -->
<!--#include file="Inc/MD5.asp"-->
<!--#include file="Inc/MsgBox.asp"-->
<!--#include file="Inc/FormChk.asp"-->
<%
'****************************************************
' 多多校园电子商务工作室 Power by ddtaobao.com
' Email:kayvin@sohu.com OICQ:6334278 站长:小羽
' Web: http://www.ddtaobao.com 淘宝旺旺:qq63334278
' Copyright (C) 2006 ddtaobao.com All Rights Reserved
'****************************************************
if request("username")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('用户名不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
end if
if request("password")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('密码不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
end if
if request("GetCode")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('验证码不能为空!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
end if
username=request("username")
password=MD5(Encodestr(request.Form("PassWord")),16)
GetCode=Encodestr(Request.Form("GetCode"))
IF Cstr(GetCode)<>Cstr(Session("GetCode")) Then
Call MsgBox("客服MM提醒您:验证码不正确","Back","")
Response.End()
End IF
sql="select * from dduser where user_name='"&username&"' and user_password='"&password&"' "
set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('用户名或密码或验证码不正确!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
else
session("user_id")=rs("user_id")
session("user_name")=rs("user_name")
session("user_password")=rs("user_password")
response.redirect "user.asp"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -