% dim lgname,lgpwd,lguserid,lgcook,lgtype,usertype,bd,id,ip,adminbd,grade,totable,getadminbd,i,idtopic,idrs,idtype,idtop,idhits,idrenum,bn,allbbs,allthebbs,style,plugin dim thebbslink,thebbslink2 dim Cssstyleid,styleid ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") if ip = "" then ip=Request.ServerVariables("remote_addr") end if if instr(ip,"'")>0 then ip="0.0.0.0" end if lockedIpCheck() dim rec,passpwd Function checkpwd(str) checkpwd=true If str <> "" Then set rec = New RegExp rec.Global = True rec.IgnoreCase = True rec.Pattern="[^A-Za-z#0-9]" passpwd=rec.Test(str) end if if len(str)<>16 then checkpwd=false if passpwd then checkpwd=false end function function checkname(str) checkname=true if Instr(str,"=")>0 or Instr(str,"%")>0 or Instr(str,chr(32))>0 or Instr(str,"?")>0 or Instr(str,"&")>0 or Instr(str,";")>0 or Instr(str,",")>0 or Instr(str,"'")>0 or Instr(str,".")>0 or Instr(str,chr(34))>0 or Instr(str,chr(9))>0 or Instr(str,"")>0 or Instr(str,"$")>0 or Instr(str,chr(255))>0 or Instr(str,":") or instr(str,"|")>0 or instr(str,"#")>0 or instr(str,"`")>0 or instr(str,"\")>0 or instr(str,"(")>0 or instr(str,"[")>0 or instr(str,"-")>0 or instr(str,"~") then checkname=false end if end function lgname=replace(Request.Cookies(prefix)("lgname"),"'","''") lgpwd=replace(request.cookies(prefix)("lgpwd"),"'","''") lgcook=checknum(Request.Cookies(prefix)("lgcook")) lgtype=checknum(Request.Cookies(prefix)("lgtype")) lguserid=checknum(session(prefix&"lguserid")) if lguserid<>"" and instr(application(prefix&"deluser"),"|"&lguserid&"|")>0 then session(prefix&"lguserid")="":response.cookies(prefix)("lgname")="":response.cookies(prefix)("lgpwd")="":response.redirect"login.asp" ''' If isnumeric(lguserid) and lguserid<>"" then if conn.execute("select top 1 name from [user] where userid="&lguserid&"").eof then Response.End elseif lcase(conn.execute("select top 1 name from [user] where userid="&lguserid&"")(0))<>lcase(lgname) then Response.End end if end if '''' if (isnull(lguserid) or lguserid="") and lgname<>"" then 'response.end if checkpwd(lgpwd)=false or checkname(lgname)=false then response.cookies(prefix)("lgname")="":response.cookies(prefix)("lgpwd")="":response.redirect"login.asp" set rs = server.createobject("adodb.recordset") dim usersql usersql="select top 1 userid,mark,grade,type,lasttime from [user] where name='"&lgname&"' and password='"&lgpwd&"' and not del" rs.open usersql,conn,0,2 if rs.eof or rs.bof then response.cookies(prefix)("lgname")="":response.cookies(prefix)("lgpwd")="":response.redirect"login.asp" session(prefix&"lguserid")=rs("userid") lguserid=checknum(session(prefix&"lguserid")) 'conn.execute("update [user] set mark=mark+1,lasttime=now()+"×et&"/24 where userid="&lguserid&"") rs("mark")=rs("mark")+1 rs("lasttime")=now()+timeset/24 rs.update grade=rs("grade") session(prefix&"usergrade")=grade session(prefix&"usertype2")=rs("type") adminbd="0" usertype=1 if grade=13 then usertype=2 if grade=14 then usertype=3 set getadminbd=conn.execute("select bd from admin where name='"&lgname&"' and password='"&lgpwd&"'") do while not getadminbd.eof adminbd=adminbd&"|"&getadminbd("bd")&"|" getadminbd.movenext loop set getadminbd=nothing end if if grade=15 then usertype=4 if grade=16 then usertype=5 session(prefix&"usertype")=usertype session(prefix&"adminbd")=adminbd set rs=nothing end if bn=checknum(request.querystring("bn")) bd=checknum(request.querystring("bd")) id=checknum(request.querystring("id")) usertype=checknum(session(prefix&"usertype")) adminbd=session(prefix&"adminbd") dim bbsname,bbsinfo,usetable,offbbsinfo bbsname=application(prefix&"bbsname") allthebbs=application(prefix&"allthebbs") style=application(prefix&"style") plugin=application(prefix&"plugin") thebbslink=application(prefix&"thebbslink") if isnull(bbsname) or bbsname="" then set rs=conn.execute("select * from [config]") bbsinfo=split(rs("bbsinfo"),"|") application(prefix&"bbsname")=bbsinfo(0) application(prefix&"automode")=bbsinfo(14) '论坛默认显示模式 application(prefix&"picnum")=bbsinfo(1) application(prefix&"picw")=bbsinfo(2) application(prefix&"pich")=bbsinfo(3) application(prefix&"autopicw")=bbsinfo(4) application(prefix&"autopich")=bbsinfo(5) application(prefix&"headpicset")=bbsinfo(6) application(prefix&"bbslinktype")=bbsinfo(7) application(prefix&"canupload")=bbsinfo(8) application(prefix&"uploadsize")=bbsinfo(9) application(prefix&"uploadnum")=bbsinfo(10) application(prefix&"voten")=bbsinfo(11) application(prefix&"topiclistpage")=bbsinfo(12) application(prefix&"showbbspage")=bbsinfo(13) usetable=rs("usetable") usetable=split(usetable,"-") application(prefix&"autotable")=usetable(0) application(prefix&"usedtable")=usetable(1) application(prefix&"uploadtype")=rs("uploadtype") application(prefix&"badwords")=rs("badwords") application(prefix&"badcontent")=rs("badcontent") application(prefix&"offbbsinfo")=rs("offbbsinfo") bbsname=application(prefix&"bbsname") set rs=nothing end if offbbsinfo=application(prefix&"offbbsinfo") if offbbsinfo<>"" then response.write offbbsinfo response.end end if totable=checknum(request.querystring("totable")) if isnull(totable) or totable="" or instr(application(prefix&"usedtable")&"|","|"&totable&"|")=0 then totable=checknum(application(prefix&"autotable")) sub down response.write"