<%
"==============================================================================================================
'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
anders
chkpost = true
Endif
Endfunktion
'****************************************
'Ip 过滤
'****************************************
FunctionMatchip (IP)
onErrorresumeNext
Matchip = false
Dimsip, Splitip
foreachsipinfilterip
Sip = ersetzen (sip, "*", "/d*")
Splitp = Split (SIP, ".")
Dimre, Strmatchs, Streifen
Setre = newRegexp
re.Innorecase = true
re.global = true
re.Pattern = "(" & splitp (0) & "|)." & "(" & Split (1) & "|).
SetStrMatchs = re.execute (IP)
Strip = Strmatchs (0) .SubMatches (0) & "." & Strmatchs (0) .Submatches (1) & "."
ifstrip = ipthenmatchip = true: exitFunction
SetStrMatchs = nichts
Setre = nichts
nächste
Endfunktion
'****************************************
'获得注册码
'****************************************
FunctionGetcode ()
getCode = "<imgsrc =" "Common/getCode.asp" "Alt =" "" "style =" "margin-right: 40px;" "/>"
Endfunktion
'****************************************
'限制上传文件类型
'****************************************
FunctionIsValidFile (Datei_Type)
Isvalidfile = false
Dimgname
ForeachNameInup_filetype
IFFILE_TYPE = gnamethen
Isvalidfile = true