|
|
这个是源代码
<%Response.Expires=0
regjm1=request("regjm1")
regjm2=request("regjm2")
call Chkproxy()
if hgjh_myie=1 then call Chkmyie()
function chuser(u)
dim filter,xx,usernameenable,su
for i=1 to len(u)
su=mid(u,i,1)
xx=asc(su)
zhengchu = -1*xx \ 256
yushu = -1*xx mod 256
if (xx>122 or (xx>57 and xx<97) or (xx<-10241 and xx>-10247) or yushu=129 or yushu>192 or (yushu<2 and yushu>-1) or (((zhengchu>1 and zhengchu<8) or (zhengchu>79 and zhengchu<86)) and yushu<96 ) or (xx>-352 and xx<48) or (xx<-22016 and xx>-24321) or (xx<-32448)) then
chuser=true
exit function
end if
next
chuser=false
end function
call chkpost()
if Application("hgjh_room")="" then Response.Redirect "error.asp?id=000"
sername=Request.ServerVariables("SERVER_NAME")
ip=Request.ServerVariables("LOCAL_ADDR")
sip=split(ip,".")
if ubound(sip)<>3 then sip=split("127.0.0.1",".")
for i=0 to ubound(sip)
if not IsNumeric(sip(i)) then sip(i)=0
next
num=cint(sip(0))*256*256*256+cint(sip(1))*256*256+cint(sip(2))*256+cint(sip(3))-1
allhttp=LCase(Request.ServerVariables("ALL_HTTP"))
if hgjh_disproxy=1 then Chkproxy()
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
if y<10 then
sjj=n & "-" & y+3 & "-" & r
else
sjj=n+1 & "-" & y+3-12 & "-" & r
end if
if y<11 then
sjjj=n & "-" & y+2 & "-" & r
else
sjjj=n+1 & "-" & y+2-12 & "-" & r
end if
huiqi=n+1 & "-" & y & "-" & r
userip=Request.ServerVariables("REMOTE_ADDR")
name=Trim(Request.Form("name"))
password=Trim(Request.Form("pass"))
if Application("hgjh_closedoor")="1" and name<>Application("hgjh_user") then Response.Redirect "error.asp?id=100"
hgjh_roominfo=split(Application("hgjh_room"),";")
chatroomnum=ubound(hgjh_roominfo)-1
onlinenow=0
for i=0 to chatroomnum
online=split(trim(Application("hgjh_useronlinename"&i))," ")
onlinenum=ubound(online)+1
onlinenow=onlinenow+onlinenum
next
if onlinenow>Application("hgjh_chat_maxpeople") then Response.Redirect "error.asp?id=101"
if instr(hgjh_disloginname,name)<>0 then Response.Redirect "error.asp?id=130"
if session("hgjh_name")<>"" then
Session.Abandon
Response.End
end if
if session("hgjh_name")<>"" and session("hgjh_name")=name then
Response.Redirect "welcome.asp"
Response.End
end if
hgjh_roominfo=split(Application("hgjh_room"),";")
chatroomnum=ubound(hgjh_roominfo)-1
for i=0 to chatroomnum
ydl=1
if Instr(LCase(Application("hgjh_useronlinename"&i))," "&LCase(name)&" ")=0 then ydl=0
if ydl=1 then
Session.Abandon
Response.Redirect "error.asp?id=140"
Response.End
end if
next
if session("hgjh_name")<>"" then
Response.Redirect "welcome.asp"
Response.End
end if
if len(name)>5 then
Response.Write "<script language=JavaScript>{alert('提示:["&name&"]姓名长度,最多为10个字符!');location.href = 'javascript:history.go(-1)';}</script>"
Response.End
end if
function GetIp()
dim realip,proxy
realip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
proxy = Request.ServerVariables("REMOTE_ADDR")
if realip = "" then
GetIp = proxy
else
GetIp = realip
end if
end function
userip = GetIp()
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs =Server.CreateObject("ADODB.RecordSet")
conn.open Application("hgjh_usermdb")
dieip=hgjh_dieip
ipk=split(userip,".",-1)
if ubound(ipk)<3 then ipk=split("127.0.0.1",".")
if Instr(dieip,"*.*.*.*")<>0 or Instr(dieip,ipk(0)&".*.*.*")<>0 or Instr(dieip,ipk(0)&"."&ipk(1)&".*.*")<>0 or Instr(dieip,ipk(0)&"."&ipk(1)&"."&ipk(2)&".*")<>0 or Instr(dieip,userip)<>0 then Response.Redirect "error.asp?id=111"
iplocktime=int(Application("hgjh_iplocktime"))
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("hgjh_usermdb")
dcz=0
sql="SELECT a FROM i WHERE DateDiff('n',b,#" & sj & "#)>=" & iplocktime
rs.open sql,conn,1,1
if Not(rs.Eof and rs.Bof) then dcz=1
rs.close
if dcz=1 then
conn.Execute "DELETE FROM i WHERE DateDiff('n',b,#" & sj & "#)>=" & iplocktime
end if
sql="SELECT a,b FROM i WHERE a='" & userip & "'"
rs.open sql,conn,1,1
if NOT(rs.Eof and rs.Bof) then
lockdate=rs("b")
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "error.asp?id=110&lockdate=" & server.URLEncode(lockdate)
end if
rs.close
'转换密码:
password=md5(password)
sql="SELECT * FROM 用户 WHERE 姓名='"&name&"'"
rs.open sql,conn,2,2
if rs.Eof and rs.Bof then
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "error.asp?id=423"
response.end
end if
if rs("密码")<>password then
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "error.asp?id=141"
response.end
end if
'=========================================================
' BBSXP6.0SP1 流星蝴蝶梦修改
'=========================================================
'会员提示
rs.close
rs.open "SELECT * FROM 说明 where a='进入'",conn,2,2
banner=rs("c")
mygg=rs("d")
if hgjh_hy>0 then
Response.Write "<script Language=Javascript>alert('"&mygg&"\n\n您上次登陆的时间是:"<ime&"\n您上次登陆的IP是:"&lip&"');</script>"
else
banners=Split(Trim(banner),";",-1)
total=UBound(banners)
randomize timer
x=int(rnd*(total+1))
Response.Write "<script Language=Javascript>alert('"&banners(x)&"\n\n您上次登陆的时间是:"<ime&"\n您上次登陆的IP是:"&lip&"');</script>"
erase banners
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
'Response.Write "<script Language=Javascript>location.href = 'welcome.asp';</script>"
'
%>
我删除了一些,自认为感觉跟IP无关的,现在网页显示的是 您上次登陆的IP是: ::1,不显示我现在真实的IP,192.168.2.2,我上用路由器上的网,这个该怎么修改呢?谢谢了。
|
|