-
-
'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
อื่น
chkpost = true
endif
endfunction
-
'IP 过滤
-
functionMatchip (IP)
onerrorresumenext
matchip = false
Dimsip, Splitip
foreachsipinfilterip
SIP = แทนที่ (sip, "*", "/d*")
splitip = split (sip, ".")
dimre, strmatchs, แถบ
setre = newregexp
re.ignorecase = true
re.global = true
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 = ไม่มีอะไร
setre = ไม่มีอะไร
ต่อไป
endfunction
-
'获得注册码
-
functiongetCode ()
getCode = "<imgsrc =" "Common/getCode.asp" "alt =" "" style = "" margin-right: 40px; ""/> "
endfunction
-
'限制上传文件类型
-
functionisvalidfile (file_type)
isValidFile = false
หรี่
foreachGnameInup_FileType
iffile_type = gnamethen
isValidFile = true