checklogin.asp

来自「整合动易2006Sp6+动网8.0+OBLOG4.6+同学录+交友+房产」· ASP 代码 · 共 39 行

ASP
39
字号
<!--#include file=../include/config.asp-->
<!--#include file=../include/conn_view.asp-->
<!--#include file=../include/function.asp-->
<!--#include file="../../inc/hl_md5.asp"--><!--恒浪加密文件---->
<%
	dim user,password,strSql,rsTmp,retValue
	user=request("user")
	password=request("password")
	if user="" then
		out("用户名不能为空!")
		resonse.end
	end if
	if password="" then
		out("密码不能为空!")
		resonse.end
	end if
	set rsTmp=Server.CreateObject("ADODB.RecordSet")
	strSql = "select * from [admin] where username='" & convertsql(user) & "'"
	strSql = strSql & " and userpassword='" & md5(convertsql(password),16) & "'"
	rsTmp.open strSql,conn
	if rsTmp.eof then
		out("该用户不存在,或密码错误!")
		retValue=1
	else
		retValue=0
		'##设置session
		session("adminlogin")="ok"
		session("user_id")=rsTmp("user_id")
	end if
	rsTmp.close
	set rsTmp=nothing
	conn.close
	set conn=nothing
	'##跳转到另一页去
	if retValue=0 then
		response.redirect "../manage.asp"
	end if
%>
<!--#include file=../include/foot.asp-->

⌨️ 快捷键说明

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