chkadmin.asp

来自「一个诚信信息港门户网 功能: 系统设置  企业会员  个人」· ASP 代码 · 共 50 行

ASP
50
字号
<%dbdns="../"%>
<!--#include file="../main.asp"-->
<!--#include file="../inc/md5.asp"-->
<%	nick=replace(trim(request("user")),"'","")
	password=md5(replace(trim(Request("pass")),"'","")) 
	regjm=replace(trim(Request("regjm")),"'","") 
	regjm1=replace(trim(Request("regjm1")),"'","") 

if nick="" then
	response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入用户名');history.go(-1);</Script>"
	Response.End 
elseif password="" then
	response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入用户密码');history.go(-1);</Script>"
	Response.End 
elseif regjm1="" then
	response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入认证码');history.go(-1);</Script>"
	Response.End 
elseif regjm<>regjm1 then
	response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·认证码输入错误');history.go(-1);</Script>"
	Response.End 
end if

	set rs=server.createobject("adodb.recordset")
	sql="select * from SMT_Job_qz where SMT_pwd='"&password&"' and SMT_user='"&nick&"'"
	rs.open sql,conn,1,1
 	if not(rs.bof and rs.eof) then
      if rs("SMT_key1")=0 then
	    response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·您注册的用户名还未经过审核,如有问题请及时和我们联系');window.open('../index.asp','_self');</Script>"
	    Response.End 
      elseif rs("SMT_key2")=0 then
	    response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·您注册的用户名已被管理员关闭,如有问题请及时和我们联系');window.open('../index.asp','_self');</Script>"
	    Response.End 
      else
		session("individualuser")=rs("SMT_user")  
		session("individualid")=rs("SMT_id") 
		Response.Redirect "admin.asp"
	  end if
	else
	response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·用户名或密码错误,请重新输入');history.go(-1);</Script>"
	Response.End 
	end if
	
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

%>

⌨️ 快捷键说明

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