<%
'==================================================================
'FunctionForPJBlog2
'更新时间: 2006-6-2
'==================================================================
'**************************************
'防止外部提交
'**************************************
functionChkPost ()
dimServer_v1, server_v2
chkpost = falso
server_v1 = cstr (request.serverVariAbles ("http_referer"))
server_v2 = cstr (request.serverVariAbles ("server_name"))
Ifmid (server_v1,8, len (server_v2)) <> server_v2then
chkpost = falso
demás
chkpost = verdadero
endif
Función final
'**************************************
'IP 过滤
'**************************************
functionMatchip (IP)
onerrorResumEnext
Matchip = falso
Dimsip, splitip
foreachsipinfilterip
Sip = reemplazar (sip, "*", "/d*")
Splitip = Split (SIP, ".")
Dimre, strmatchs, strip
Setre = newregexp
re.ignorecase = True
re.global = verdadero
re.pattern = "(" & Splitip (0) & "|)." & "(" & Splitip (1) & "|)." & "(" & Splitip (2) & "|)." & "(" & Splitip (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 = nada
Setre = nada
próximo
Función final
'**************************************
'获得注册码
'**************************************
FunctetCode ()
getCode = "<imgsrc =" "común/getcode.asp" "alt =" "" "style =" "margin-right: 40px;" "/>"
Función final
'**************************************
'限制上传文件类型
'**************************************
FunctionIsValidFile (file_type)
IsValidFile = falso
Dimgname
Foreachgnameinup_filetype
Iffile_type = gnamethen
IsValidFile = True