<%
'=========================================================================.
'Functionforpjblog2
'更新时间: 2006-6-2
'=========================================================================.
'*************************************
'防止外部提交
'*************************************
functionchkpost ()
dimServer_v1, server_v2
chkpost = false
server_v1 = cstr (request.servervariables ("http_referer")))
server_v2 = cstr (request.servervariables ("server_name"))
Ifmid (server_v1,8, Len (server_v2)) <> server_v2Then
chkpost = false
autre
chkpost = true
endire
finition de fin
'*************************************
'Ip 过滤
'*************************************
functionmatchip (ip)
onerrorresumenext
MatchIp = False
Dimsip, Spripip
foreachsipinfilterip
Sip = remplacer (sip, "*", "/ d *")
SplipIP = Split (SIP, ".")
Dimre, strmatchs, bande
SetRe = newRegexp
re.ignorecase = true
re.global = true
re.Pattern = "(" & SpdipIP (0) & "|)." & "(" & SpripIP (1) & "|)." & "(" & SplipIP (2) & "|)." & "(" & Spripip (3) & "|)"
Setstrmatchs = re.execute (ip)
strip = strmatchs (0) .submatches (0) & "." & strmatchs (0) .submatches (1) & "." & strmatchs (0) .submatches (2) & "." & strmatchs (0) .submatches (3)
ifstrip = ipthenmatchip = true: exitFunction
Setstrmatchs = rien
Setdre = rien
suivant
finition de fin
'*************************************
'获得注册码
'*************************************
FunctionGetcode ()
getcode = "<imgsrc =" "Common / Getcode.asp" "alt =" "" "style =" "margin-droite: 40px;" "/>"
Finition de fin
'*************************************
'限制上传文件类型
'*************************************
FunctionIsValidFile (file_type)
IsValidFile = false
Dimgame
Foreachgnameinup_filetype
IFFILE_TYPE = GNAMETHEN
IsValidFile = true