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

📄 check_index.asp

📁 日记本(多用户版)V3.0 主要功能: 1、日记本基本功能:添加、修改日记等。 2、日记加密:当日记添加时
💻 ASP
字号:
<!--#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("index.asp")
				end if
		end if
end if
%>

<html></html>

⌨️ 快捷键说明

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