<%
'==================================================================
'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
outro
chkpost = true
endif
Função final
'*************************************
'IP 过滤
'*************************************
functionMatchip (IP)
OnErrorReSumenext
Matchip = false
Dimsip, dividido
foreachsipinfilterip
Sip = substituir (sip, "*", "/d*")
Dividido = dividido (SIP, ".")
Dimre, strmatchs, tira
Setre = newRegexp
re.IGNORECASE = true
re.global = true
re.pattern = "(" & SPLITIP (0) & "|)." & "(" & SPLITIP (1) & "|)." & "(" & Splitip (2) & "|)." & "(" & Splitip (3) & "|)"
SetStrMatchs = re.execute (IP)
tira = strmatchs (0) .Submatches (0) & "." & strmatchs (0) .Submatches (1) & "." & strMatchs (0) .Submatches (2) & "." & strMatchs (0) .Submatches (3)
ifstrip = ipThenMatchip = true: exitfunction
SetStrMatchs = nada
Setre = nada
próximo
Função final
'*************************************
'获得注册码
'*************************************
FunctionGetCode ()
getCode = "<imgsrc =" "Common/getCode.asp" "alt =" "" "style =" "margem-direita: 40px;" "/>"
Função final
'*************************************
'限制上传文件类型
'*************************************
FunctionIsValidFile (File_type)
IsValidFile = false
Dimgname
Foreachgnameinup_fileType
Iffile_type = gnamethen
IsValidFile = true