国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

pjblog2的參數第1/2頁

2020-07-27 13:31:54
字體:
來源:轉載
供稿:網友
<% 
'===============================================================
'  Function For PJblog2
'    更新時間: 2006-6-2
'===============================================================

'*************************************
'防止外部提交
'*************************************
function ChkPost() 
  dim server_v1,server_v2
  chkpost=false
  server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
  server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
  If Mid(server_v1,8,Len(server_v2))<>server_v2 then
    chkpost=False
  else
   chkpost=True
  end If
 end function


'*************************************
'IP過濾
'************************************* 
function MatchIP(IP)
 on error resume next
 MatchIP=false
 Dim SIp,SplitIP
 for each SIp in FilterIP
    SIp=replace(SIp,"*","/d*")
    SplitIP=split(SIp,".")
    Dim re, strMatchs,strIP
     Set re=new RegExp
      re.IgnoreCase =True
      re.Global=True
      re.Pattern="("&SplitIP(0)&"|)."&"("&SplitIP(1)&"|)."&"("&SplitIP(2)&"|)."&"("&SplitIP(3)&"|)"
     Set strMatchs=re.Execute(IP)
      strIP=strMatchs(0).SubMatches(0) & "." & strMatchs(0).SubMatches(1)& "." & strMatchs(0).SubMatches(2)& "." & strMatchs(0).SubMatches(3)
     if strIP=IP then MatchIP=true:exit function
     Set strMatchs=Nothing
     Set re=Nothing
 next 
end function

'*************************************
'獲得注冊碼
'*************************************  
Function getcode() 
    getcode= "<img src=""common/getcode.asp"" alt="""" style=""margin-right:40px;""/>"        
End Function

'*************************************
'限制上傳文件類型
'*************************************  
Function IsvalidFile(File_Type)
    IsvalidFile = False
    Dim GName
    For Each GName in UP_FileType
        If File_Type = GName Then
            IsvalidFile = True
            Exit For
        End If
    Next
End Function


'*************************************
'限制插件名稱
'*************************************  
Function IsvalidPlugins(Plugins_Name) 
 dim NoAllowNames,NoAllowName
 NoAllowNames="user,bloginfo,calendar,comment,search,links,archive,category,contentlist"
 NoAllowName=split(NoAllowNames,",")
    IsvalidPlugins = true
    Dim GName
    Plugins_Name=trim(lcase(Plugins_Name))
    For Each GName in NoAllowName
        If Plugins_Name = GName Then
             IsvalidPlugins = false
            Exit For
        End If
    Next
End Function


'*************************************
'檢測是否只包含英文和數字
'************************************* 
Function IsValidChars(str)
    Dim re,chkstr
    Set re=new RegExp
    re.IgnoreCase =true
    re.Global=True
    re.Pattern="[^_/.a-zA-Z/d]"
    IsValidChars=True
    chkstr=re.Replace(str,"")
    if chkstr<>str then IsValidChars=False
    set re=nothing
End Function

'*************************************
'檢測是否只包含英文和數字
'************************************* 
Function IsvalidValue(ArrayN,Str)
    IsvalidValue = false
    Dim GName
    For Each GName in ArrayN
        If Str = GName Then
             IsvalidValue = true
            Exit For
        End If
    Next
End Function 

'*************************************
'檢測是否有效的數字
'*************************************
Function IsInteger(Para) 
    IsInteger=False
    If Not (IsNull(Para) Or Trim(Para)="" Or Not IsNumeric(Para)) Then
        IsInteger=True
    End If
End Function

'*************************************
'用戶名檢測
'*************************************
Function IsValidUserName(byVal UserName)
    on error resume next
    Dim i,c
    Dim VUserName
    IsValidUserName = True
    For i = 1 To Len(UserName)
        c = Lcase(Mid(UserName, i, 1))
        If InStr("$!<>?#^%@~`&*();:+='"" 主站蜘蛛池模板: 萝北县| 虹口区| 安国市| 新乐市| 南城县| 佳木斯市| 临洮县| 康定县| 鄂尔多斯市| 延吉市| 江都市| 五华县| 固镇县| 莱州市| 沙洋县| 固阳县| 贵德县| 虹口区| 遵义市| 安国市| 繁峙县| 武山县| 西林县| 韶关市| 景泰县| 司法| 江安县| 陵川县| 临安市| 莫力| 乐东| 临沭县| 满城县| 乐至县| 新余市| 屏东市| 绥滨县| 建平县| 咸丰县| 射洪县| 景洪市|