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

📄 userlogin.asp

📁 数据结构课程设计之最小生成数的K算法的实现 简短 简洁
💻 ASP
字号:
<%
if session("user")="" then
response.redirect "index.asp"
end if
%>
<!--#include file="Conn.asp"-->
<!--#include file="Function/Function.asp"-->
<%
userid=trim(Request("userid"))
password=trim(request("password"))
secruity=replace(trim(request("secruity")),"'","‘")
checksecruity=replace(trim(session("secruity")),"'","‘")

'判断接受的帐号\密码是否符合要求
if userid="" then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得为空!');window.history.go(-1);}</script>"
end if
if instr(1,userid,",")>=1 then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含逗号!');window.history.go(-1);}</script>"
end if
if instr(1,userid,"'")>=1 then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含单引号!');window.history.go(-1);}</script>"
end if
if instr(1,password,",")>=1 then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含逗号!');window.history.go(-1);}</script>"
end if
if instr(1,password,"'")>=1 then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含单引号!');window.history.go(-1);}</script>"
end if
if instr(1,password,"*")>=1 then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含*!');window.history.go(-1);}</script>"
end if
if instr(1,password,"$")>=1 then 
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含$!');window.history.go(-1);}</script>"
end if

if not secruity=checksecruity then
	  Response.Write "<script language=JavaScript>{window.alert('填入的验证码错误,请重新输入!');window.history.go(-1);}</script>"
	  response.end
end if

'判断帐号及密码是否正确 
 set recCheckUser=server.CreateObject("ADODB.recordset")
 uid=trim(Request("userid"))
 upwd=Encrypt(trim(Request("password")))
 strSQL="select * from userinfo where UserId='" & uid & "' and PassWord='" & upwd & "'"
 recCheckUser.Open  strSQL,conn
 
  if not recCheckUser.EOF then
 	'如果用户帐号及密码正确
 	
 	'检测用户帐号是否审核通过或被锁定
 	If CheckUserIdBegin(Uid)=0 Then
 		Response.Write "<script language=JavaScript>{window.alert('此会员帐号尚未通过验证,请确认您已经加纳会费,若是,请尽快与我们联系!');window.history.go(-1);}</script>"
   		response.end
   	ElseIf CheckUserIdBegin(Uid)=3 Then
 		Response.Write "<script language=JavaScript>{window.alert('此帐号因非法运行,已经被锁定,请与系统管理员联系!');window.history.go(-1);}</script>"
   		response.end
   	'ElseIf datediff("d",recCheckUser("enddate"),now()) > 0 then
 		'Response.Write "<script language=JavaScript>{window.alert('此会员账号已服务到期,请续费后继续使用!');window.history.go(-1);}</script>"
   		'response.end
    End If
   	
   	'用户进入
   	call UserEnter(uid,1)
  	Response.Write "<script langge=JavaScript>{woiwo=window.open ('body.asp','woiwo','resizable=yes,scrollbars=no,toolbar=no,menubar=no,fullscreen=no');woiwo.moveTo(0,0); woiwo.resizeTo(screen.availWidth,screen.availHeight);woiwo.outerWidth=screen.availWidth;woiwo.outerHeight=screen.availHeight;}</script>"
 	Response.Write "<script language=JavaScript>{window.history.go(-1);}</script>"
 	Response.End
 else
 	'用户帐号及密码不正确
  	recCheckUser.Close 
  	set recCheckUser=nothing
  	set conn=nothing
	Response.Write "<script language=JavaScript>{window.alert('您输入的帐号及密码错误,请重新输入!');window.history.go(-1);}</script>"
 end if 

%>

⌨️ 快捷键说明

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