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

📄 user_come.asp

📁 红金羚v1.5办公自动化软件是基于大型数据库系统开发的应用系统
💻 ASP
字号:
<%Response.Expires=0%>
<!--#include file="error.asp"-->
<%
'检查输入内容是否是数字
function check_str(inputstr)
	dim result,i,letter
	result=true
	for i=1 to len(inputstr)
		letter=mid(inputstr,i,1)
		if asc(letter)<48 or asc(letter)>57 then
			result=false
			exit for
		end if
	next
	check_str=result
end function

'检查表单内容是否正确
function check_form(hm,mm)
	dim err_info
	err_info=""
	if hm="" then
		err_info=err_info&"*^_^*号码不能为空!\n"
	else
		if not check_str(hm) then
			err_info=err_info&"*^_^*号码只能输入0~9的数字!\n"
		end if
	end if
	if mm="" then
		err_info=err_info&"*^_^*密码不能空!\n"
	end if
	check_form=err_info
end function

dim hm,mm,error_info
hm=trim(Request.Form("hm"))
mm=trim(Request.Form("mm"))
error_info=""
error_info=check_form(hm,mm)
if error_info<>"" then
	call disp_error(error_info,"")
else
%>
<!--#include file="conn.asp"-->
<!--#include file="function.asp"-->
<%
	set rs=server.CreateObject("adodb.recordset")
	rs.Open "select * from register_user_info where number='"&hm&"' or id="&hm,conn,1,1
	if rs.EOF or rs.BOF then
		rs.Close
		conn.close
		call disp_error("*^_^*对不起,没有这个号码!","")
	else
		rs.close
		set rs=server.CreateObject("adodb.recordset")
		rs.open "select * from register_user_info where (number='"&hm&"'or id="&hm&") and password='"&mm&"'",conn,1,1
		if rs.eof or rs.bof then
			rs.close
			conn.close
			call disp_error("*^_^*对不起,密码错误!","")
		else
			application.lock
			yhm=trim(rs("userlc"))
			faceid=rs("faceid")
			onlineuser=application("onlineuser"&session("siteid"))
			killflag=0
			dimsums=ubound(onlineuser)
			for i=0 to dimsums
				if instr(onlineuser(i),cstr(session.sessionID)&"$")>0 then
					infostr=split(onlineuser(i),"$")
					infostr(1)=yhm
					if session("manager")<>"1" then
						infostr(2)="2"
					end if
					infostr(5)=faceid
					onlineuser(i)=infostr(0)&"$"&infostr(1)&"$"&infostr(2)&"$"&infostr(3)&"$"&infostr(4)&"$"&infostr(5)
					killflag=1
					exit for
				end if
			next
			application("onlineuser"&session("siteid"))=onlineuser
			if session("manager")="1" then
				onlinemanager=application("onlinemanager")
				killflag1=0
				dimsums=ubound(onlinemanager)
				for i=0 to dimsums
					if instr(onlinemanager(i),cstr(session.sessionID)&"$")>0 then
						infostr=split(onlinemanager(i),"$")
						infostr(2)=yhm
						infostr(7)=faceid
						onlinemanager(i)=infostr(0)&"$"&infostr(1)&"$"&infostr(2)&"$"&infostr(3)&"$"&infostr(4)&"$"&infostr(5)&"$"&infostr(6)&"$"&infostr(7)
						killflag1=1
						exit for
					end if
				next
			application("onlinemanager")=onlinemanager
			end if
			if isempty(session("manager")) or session("manager")="" then
				session("manager")="2"
			end if 
			session("username")=yhm
			if killflag=0 then
				call write_online_user(session("siteid"),faceid)
			end if
			application.unlock
			Response.Write("<script language=""javascript"">")
			Response.Write("parent.faceid.value="&chr(34)&rs("faceid")&chr(34)&";")
			Response.Write("parent.username.value="&chr(34)&yhm&chr(34)&";")
			if rs("number")<>"" then
				Response.Write("parent.usernoid.value="&chr(34)&rs("number")&chr(34)&";")
			else
				Response.Write("parent.usernoid.value="&chr(34)&cstr(rs("id"))&chr(34)&";")
			end if
			Response.Write("parent.refflag.value=""1"";")
			Response.Write("parent.pageflag.value=""1"";")
			Response.Write("parent.userdlflag.value=""1"";")
			Response.Write("location.href=""disp_online_user.asp"";")
			Response.Write("</script>")
			rs.close
			conn.close
		end if
	end if
	
end if
%>

⌨️ 快捷键说明

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