📄 check.asp
字号:
<%@ codepage ="936" %>
<!--#include File="password.asp"-->
<%Response.Expires=0
if Application("wsaxhxf_c_chatroomname")="" then Response.Redirect "error.asp?id=000"
sername=Request.ServerVariables("SERVER_NAME")
if InStr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE")=0 then Response.Redirect "error.asp?id=010"
allhttp=LCase(Request.ServerVariables("ALL_HTTP"))
if Application("wsaxhxf_c_disproxy")="1" and (Instr(allhttp,"proxy")<>0 or Instr(allhttp,"http_via")<>0 or Instr(allhttp,"http_pragma")<>0) then Response.Redirect "error.asp?id=011"
if Session("hxf_u_nickname")<>"" then Response.Redirect "welcome.asp"
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
userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if userip="" then userip=Request.ServerVariables("REMOTE_ADDR")
if Application("wsaxhxf_c_closedoor")="1" then Response.Redirect "error.asp?id=100"
if int(Application("wsaxhxf_c_chatrs"))>=int(Application("wsaxhxf_c_maxpeople")) then Response.Redirect "error.asp?id=101"
nickname=Trim(Request.Form("nickname"))
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
password=Trim(Request.Form("password"))
gender=Trim(Request.Form("gender"))
newpass=Trim(Request.Form("newpass"))
killpass=Trim(Request.Form("killpass"))
enter=Trim(Request.Form("enter"))
nickname=CStr(Replace(nickname,chr(13)&chr(10),""))
password=CStr(Replace(password,chr(13)&chr(10),""))
gender=CStr(Replace(gender,chr(13)&chr(10),""))
newpass=CStr(Replace(newpass,chr(13)&chr(10),""))
killpass=CStr(Replace(killpass,chr(13)&chr(10),""))
enter=CStr(Replace(enter,chr(13)&chr(10),""))
if nickname="" then Response.Redirect "error.asp?id=127"
if password="" then Response.Redirect "error.asp?id=128"
if LCase(nickname)=LCase(password) then Response.Redirect "error.asp?id=129"
if server.HTMLEncode(nickname)<>nickname or InStr(nickname,"【")<>0 or InStr(nickname,"】")<>0 or InStr(nickname," ")<>0 or InStr(nickname," ")<>0 or InStr(nickname," ")<>0 then Response.Redirect "error.asp?id=120"
if server.URLEncode(password)<>password then Response.Redirect "error.asp?id=121"
if server.HTMLEncode(gender)<>gender or InStr(gender," ")<>0 then Response.Redirect "error.asp?id=122"
if server.URLEncode(newpass)<>newpass then Response.Redirect "error.asp?id=123"
if server.URLEncode(killpass)<>killpass then Response.Redirect "error.asp?id=124"
namelen=0
for i=1 to len(nickname)
zh=mid(nickname,i,1)
zhasc=asc(zh)
if zhasc<0 then
namelen=namelen+2
else
namelen=namelen+1
if CStr(server.URLEncode(zh))<>CStr(zh) then Response.Redirect "error.asp?id=120"
end if
next
if namelen>10 then Response.Redirect "error.asp?id=125"
namelen=0
for i=1 to len(gender)
zh=mid(gender,i,1)
zhasc=asc(zh)
if zhasc<0 then
namelen=namelen+2
else
namelen=namelen+1
if CStr(server.URLEncode(zh))<>CStr(zh) then Response.Redirect "error.asp?id=122"
end if
next
If Chuser(nickname) Then Response.Redirect "error.asp?id=144"
if chuser(password) or chuser(newpass) then Response.Redirect "error.asp?id=123"
if namelen>4 then Response.Redirect "error.asp?id=126"
Dim saysL, saysfilterstr, sfstr, ubstr
saysL = nickname
saysfilterstr = Application("wsaxhxf_c_disloginname")
sfstr = Split(saysfilterstr, ",")
ubstr = UBound(sfstr)
For i = 0 To ubstr
If InStr(saysL, sfstr(i)) <> 0 Then Response.Redirect "error.asp?id=130"
Next
disloginname = Application("wsaxhxf_c_disloginname")
if InStr(LCase(nickname),LCase(disloginname))<>0 or nickname="大家" or nickname=Application("wsaxhxf_c_automanname") or LCase(nickname)="automan" or nickname="聊天室管理员" or (Instr(nickname,"稻")<>0 or Instr(nickname,"?")<>0) and Instr(nickname,"香")<>0 and nickname<>"稻香居士" then Response.Redirect "error.asp?id=130"
if InStr(LCase(nickname),"fuck")<>0 or(InStr(LCase(nickname),"bzxv")<>0 and InStr(LCase(nickname),"myh")<>0) or InStr(LCase(nickname),"sex")<>0 or InStr(nickname,"奸")<>0 or InStr(nickname,"淫")<>0 or InStr(nickname,"娼")<>0 or InStr(nickname,"嫖")<>0 or InStr(nickname,"性")<>0 and InStr(nickname,"交")<>0 or InStr(nickname,"妓")<>0 or InStr(nickname,"色")<>0 and InStr(nickname,"黄")<>0 or InStr(nickname,"色")<>0 and InStr(nickname,"情")<>0 or InStr(nickname,"日")<>0 and InStr(nickname,"妈")<>0 or InStr(nickname,"日")<>0 and InStr(nickname,"妹")<>0 or InStr(nickname,"日")<>0 and InStr(nickname,"姐")<>0 or InStr(nickname,"日")<>0 and InStr(nickname,"娘")<>0 or InStr(nickname,"日")<>0 and InStr(nickname,"奶")<>0 or InStr(nickname,"乳")<>0 or InStr(nickname,"阴")<>0 or InStr(nickname,"操")<>0 then Response.Redirect "error.asp?id=131"
if InStr(LCase(gender),"fuck")<>0 or InStr(LCase(gender),"sex")<>0 or InStr(gender,"奸")<>0 or InStr(gender,"淫")<>0 or InStr(gender,"娼")<>0 or InStr(gender,"嫖")<>0 or InStr(gender,"性")<>0 and InStr(gender,"交")<>0 or InStr(gender,"妓")<>0 or InStr(gender,"色")<>0 and InStr(gender,"黄")<>0 or InStr(gender,"色")<>0 and InStr(gender,"情")<>0 or InStr(gender,"日")<>0 and InStr(gender,"妈")<>0 or InStr(gender,"日")<>0 and InStr(gender,"妹")<>0 or InStr(gender,"日")<>0 and InStr(gender,"姐")<>0 or InStr(gender,"日")<>0 and InStr(gender,"娘")<>0 or InStr(gender,"日")<>0 and InStr(gender,"奶")<>0 or InStr(gender,"乳")<>0 or InStr(gender,"阴")<>0 or InStr(gender,"操")<>0 then Response.Redirect "error.asp?id=132"
dieip=Application("wsaxhxf_c_dieip")
ipk=split(userip,".",-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("wsaxhxf_c_iplocktime"))*60
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
dcz=0
sql="SELECT ip FROM iplocktemp WHERE DateDiff('s',lockdate,#" & sj & "#)>=" & iplocktime
rs.open sql,conn,1,1
if Not(rs.Eof and rs.Bof) then dcz=1
rs.close
if dcz=1 then
sql="DELETE FROM iplocktemp WHERE DateDiff('s',lockdate,#" & sj & "#)>=" & iplocktime
conn.Execute(sql)
end if
sql="SELECT ip,lockdate FROM iplocktemp WHERE ip='" & userip & "'"
rs.open sql,conn,1,1
if NOT(rs.Eof and rs.Bof) then
lockdate=rs("lockdate")
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=110&lockdate=" & server.URLEncode(lockdate)
end if
rs.close
if NOT(enter="进 入" or enter="修 改" or enter="自 杀") then enter="进 入"
ydl=1
if Instr(LCase(Application("wsaxhxf_c_useronlinename"))," "&LCase(nickname)&" ")=0 then ydl=0
if ydl=1 then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=140"
end if
yzc=0
sql="SELECT username,password,grade,lastkick FROM reginfo WHERE username='" & nickname & "' and kill='0'"
rs.open sql,conn,1,1
if NOT(rs.Eof and rs.Bof) then
yzc=1
regpass=rs("password")
reggrade=rs("grade")
reglastkick=rs("lastkick")
end if
rs.close
mmpassword=md5(password)
if yzc=1 and CStr(mmpassword)<>CStr(regpass) then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=141"
end if
if reggrade="0" then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=142"
end if
if Not(IsNull(reglastkick)) then
if DateDiff("s",CDate(reglastkick),sj)<=int(Application("wsaxhxf_c_kicknamedontlogin"))*60 then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=143&lastkick=" & server.URLEncode(reglastkick)
end if
end if
if Application("wsaxhxf_c_disnewuser")="1" and yzc=0 then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=102"
end if
Select Case enter
Case "进 入"
if yzc=1 then
sql="SELECT grade,times,value,mvalue,hb,lasttime,lastip,shj FROM reginfo WHERE username='" & nickname & "' and kill='0'"
rs.open sql,conn,1,3
grade=int(rs("grade"))
value=int(rs("value"))
prevtime=CDate(rs("lasttime"))
shj=int(rs("shj"))
If shj = 1 Then
if value>=int(Application("wsaxhxf_c_level1to2")) and grade<2 then grade=2
if value>=int(Application("wsaxhxf_c_level2to3")) and grade<3 then grade=3
if value>=int(Application("wsaxhxf_c_level3to4")) and grade<4 then grade=4
if value>=int(Application("wsaxhxf_c_level4to5")) and grade<5 then grade=5
End if
if DateDiff("m",prevtime,sj)<>0 then rs("mvalue")=0
rs("grade")=grade
rs("times")=rs("times")+1
rs("lasttime")=sj
rs("lastip")=userip
rs.update
Session("hxf_u_nickname")=nickname
Session("hxf_u_grade")=int(rs("grade"))
Session("hxf_u_times")=rs("times")
Session("hxf_u_value")=int(value)
Session("hxf_u_mvalue")=rs("mvalue")
Session("hxf_u_hb")=rs("hb")
Session("hxf_u_gender")=gender
rs.close
if grade=12 then
sql="SELECT username,userip FROM ipbt WHERE username='" & nickname & "' and userip='" & userip & "'"
rs.open sql,conn,1,1
if NOT(rs.Eof and rs.Bof) then
session("ipbt")=1
end if
rs.close
end if
if grade=12 then
sql="SELECT username FROM ipbt WHERE username='" & nickname & "' and userip='" & userip & "'"
rs.open sql,conn,1,1
if rs.Eof or rs.Bof then
rs.close
conn.close
set rs=nothing
set conn=nothing
session("ipbt")=0
Response.Redirect "welcome.asp"
end if
rs.close
end if
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "welcome.asp"
Response.End
else
Function SqlStr(data)
SqlStr="'" & Replace(data,"'","''") & "'"
End Function
sql="INSERT INTO reginfo (kill,leave,username,password,grade,times,regtime,regip,lasttime,lastip,shj,info) VALUES ('0','0'," & SqlStr(nickname) & "," & SqlStr(mmpassword) & ",1,1," & SqlStr(sj) & "," & SqlStr(userip) & "," & SqlStr(sj) & "," & SqlStr(userip) & ",'1','{]{]{]{]{]{]{]{]{]{]{]{]{]{]{]{]')"
conn.Execute(sql)
conn.close
set rs=nothing
set conn=nothing
Session("hxf_u_nickname")=nickname
Session("hxf_u_grade")=1
Session("hxf_u_times")=1
Session("hxf_u_value")=0
Session("hxf_u_mvalue")=0
Session("hxf_u_hb")=0
Session("hxf_u_gender")=gender
Session("ipbt")=0
Response.Redirect "welcome.asp"
Response.End
end if
Case "修 改"
if yzc=0 then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=150"
else
if newpass="" then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=151"
end if
if newpass=password then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=152"
end if
if LCase(newpass)=LCase(nickname) then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=153"
end if
mmnewpass=md5(newpass)
sql="SELECT password,mvalue,lasttime,lastip FROM reginfo WHERE username='" & nickname & "' and kill='0'"
rs.open sql,conn,1,3
rs("password")=mmnewpass
prevtime=CDate(rs("lasttime"))
if DateDiff("m",prevtime,sj)<>0 then rs("mvalue")=0
rs("lasttime")=sj
rs("lastip")=userip
rs.update
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "ok.asp?id=100&new="&newpass
end if
Case "自 杀"
if yzc=0 then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=160"
else
if killpass="" then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=161"
end if
if killpass<>password then
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=162"
end if
sql="SELECT leave,kill,mvalue,lasttime,lastip FROM reginfo WHERE username='" & nickname & "' and kill='0'"
rs.open sql,conn,1,3
leave=rs("leave")
if leave="1" then
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "error.asp?id=163"
end if
prevtime=CDate(rs("lasttime"))
if DateDiff("m",prevtime,sj)<>0 then rs("mvalue")=0
rs("kill")="1"
rs("lasttime")=sj
rs("lastip")=userip
rs.update
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "ok.asp?id=101&name="&server.URLEncode(nickname)
end if
End Select%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -