checkpass.asp

来自「网佳网络办公系统(以下简称OA)是一套基于B/S模式的无纸化办公系统。[显著特点」· ASP 代码 · 共 57 行

ASP
57
字号
<!--#include file="bkconn.asp"-->
<% 
'获取数据
            susername=trim(request.form("username"))
            spwd=request.form("pwd")
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m

'检验数据合法性
if Len(susername)<1 or Len(spwd)<1 then%>
<script language=vbscript> 
MsgBox "错误:输入不能有空!"
location.href = "login.asp"
</script>

<%else
set tablelist=conn.execute("select  * from  user where guestname='" &susername &"'")
if tablelist.eof and tablelist.bof then%>
<script language=vbscript> 
MsgBox "错误:非法用户!"
location.href = "login.asp"
</script>
<%else

'校验密码	     
if tablelist("ljl_pwd")<>spwd then%>
<script language=vbscript> 
MsgBox "密码错误!"
location.href = "login.asp"
</script>
<%else
Session("ljl_liujinlu")=susername
Session("ljl_grad")=tablelist("grad")
Session("ljl_add")=tablelist("add")
id=tablelist("id")
'更新登陆时间
conn.execute"update user set denglusj='"&sj&"' where id="&id%>
<script language=vbscript> 
MsgBox "登陆成功,按此进入信息管理系统!"
location.href = "jh.asp"
</script>
<%end if             
end if             
conn.close             
set conn=nothing             
end if             
%>

⌨️ 快捷键说明

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