?? user_come.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
set rs=nothing
set conn=nothing
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
set rs=nothing
conn.close
set conn=nothing
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
set rs=nothing
set conn=nothing
end if
end if
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -