<٪
'==============================================================
'FunctionForpjBlog2
'更新时间: 2006-6-2
'==============================================================
'*************************************
'防止外部提交
'*************************************
FunctionChkpost ()
DimServer_v1 ، server_v2
chkpost = خطأ
server_v1 = cstr (request.servervariables ("http_referer")))
server_v2 = cstr (request.servervariables ("server_name")))
IFMID (server_v1،8 ، len (server_v2)) <> server_v2then
chkpost = خطأ
آخر
chkpost = صحيح
Endif
الوظيفية
'*************************************
'IP 过滤
'*************************************
FunctionMatchip (IP)
onerrorresumenext
matchip = خطأ
Dimsip ، Splitip
foreachsipinfilterip
sip = استبدال (sip ، "*" ، "/d*")
Splitip = split (sip ، ".")
Dimre ، Strmatchs ، الشريط
setre = newregexp
re.ignorecase = صحيح
re.global = صحيح
re.pattern = "(" & splitip (0) & "|).
setStrMatchs = re.execute (IP)
Strip = Strmatchs (0) .SubMatches (0) & ".
ifstrip = ipthenmatchip = true: exitfunction
setStrmatchs = لا شيء
setre = لا شيء
التالي
الوظيفية
'*************************************
'获得注册码
'*************************************
دالة code ()
getCode = "<imgsrc =" "common/getCode.asp" "alt =" "" style = "" margin-right: 40px ؛ ""/> "
الوظيفية
'*************************************
'限制上传文件类型
'*************************************
FunctionIsValidFile (file_type)
isValidfile = false
Dimgname
foreachgnameinup_filetype
iffile_type = gnamethen
isValidfile = صحيح