check.asp
来自「日记本(多用户版)V3.0 主要功能: 1、日记本基本功能:添加、修改日记等。」· ASP 代码 · 共 58 行
ASP
58 行
<!--#include file="conn.asp"-->
<%
'=========================================================
' 随然日记本(多用户版) Version:3.0
' Date: 2004-11-15
' Script Written by 随然(dampure)
' 随然日记本演示地址:http://www.suiran.cn
'=========================================================
' Copyright (C) 2003,2004 真露无香. All rights reserved.
' Web: www.yongzi.com
' Diary:http://www.suiran.cn
'=========================================================
if trim(request.form("username"))="" or trim(request.form("passwd"))="" then
%>
<script language=vbscript>
MsgBox "呵呵~~~!不填写完也想登陆?用户名,密码必须填写!"
location.href = "javascript:history.back()"
</script>
<%
else
username=LCase(trim(request.form("username")))
passwd=trim(request.form("passwd"))
set TmpRs=server.createobject("adodb.recordset")
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
TmpRs.open "Select * from admin where user='"&username&"'",conn,1,3
if tmprs.bof and tmprs.eof then %>
<script language=vbscript>
MsgBox "哇塞! 别吓我哦! 自己的用户名都记不注啊!该用户不存在!"
location.href = "javascript:history.back()"
</script>
<% elseif passwd<>tmprs("pwd") then %>
<script language=vbscript>
MsgBox "哈哈! 密码错误了哦^o^ 呵呵~~~"
location.href = "javascript:history.back()"
</script>
<%
else
session("diary")=true
session("username")=username
session("userid")=tmprs("userid")
'关闭数据连接
tmprs.close
Set TmpRs=nothing
conn.close
set conn=nothing
response.redirect("cover.asp")
end if
end if
end if
%>
<html></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?