SoFunction
Updated on 2025-04-13

Asp common functions collection, very good research page 4/4


function gfv(str)
    gfv = (str)
end function

function guv(str)
    guv = (str)
end function

function alertbox(str,kindnum)
    select case kindnum
        case "1"
            ("<script>alert(""" & str & """);</script>")
            ()
        case "2"
            ("<script>alert(""" & str & """);();</script>")
            ()
        case "3"
            ("<script>alert(""" & str & """);();</script>")
            ()
    end select
end function

sub WRITE_LINE(str)
     ltrim(str)
end sub

sub LOADING_BUFFER_INI
     = 0
     = now() - 1
     "pragma","no-cache"
     "cache-control","private"
     = "no-cache"
end sub

sub LOADING_ADMIN_HEAD
    WRITE_LINE "<html><head><title></title>"
    WRITE_LINE "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
    WRITE_LINE "<meta http-equiv=""Content-Language"" content=""gb2312"">"
    WRITE_LINE "<link href=""../images/ncms/"" rel=""stylesheet"" type=""text/css""></head>"
    WRITE_LINE "<body leftmargin=""1"" topmargin=""10"" scroll=""auto"">"
end sub

sub LOADING_ADMIN_FOOT
    if isobject("conn") then
        :set conn = nothing
    elseif isobject("commentconn") then
        :set commentconn = nothing
    elseif isobject("collectconn") then
        :set collectconn = nothing
    end if
    WRITE_LINE "<table align=""center"" width=""100%"" cellpadding=""2"" cellspacing=""1"" border=""0"">"
    WRITE_LINE "<tr>"
    WRITE_LINE "<td align=""middle"" valign=""middle"">"
    WRITE_LINE "<table bgcolor=""#c0c0c0"" align=""center"" width=""98%"" cellpadding=""2"" cellspacing=""1"">"
    WRITE_LINE "<tr>"
    WRITE_LINE "<td bgcolor=""#f0f0f0"" height=""50""><div align=""center""><font face=""verdana,arial,helvetica,sans-serif"" size=""1""><b>&copy;2006 - 2008 CopyRight NCMS All Rights :" & Version & " <a href=""http:///"" target=""_blank"">BBS</a></b></font></div></td>"
    WRITE_LINE "</tr>"
    WRITE_LINE "</table>"
    WRITE_LINE "</td>"
    WRITE_LINE "</tr>"
    WRITE_LINE "</table>"
    WRITE_LINE "</body></html>"
end sub

'===============================================================================================
'Chuhe|Hanjie A small advertisement: If you find bugs or shortcomings in this program or have good improvement methods, please contact me: QQ574634! Thank you very much!
'===============================================================================================

Function IsValidEmail(Str)
    IsValidEmail = False
    Dim RegEx,Match
    Set RegEx = New RegExp
         = "^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"
         = True
    Set Match = (Str)
    If  Then IsValidEmail = True
End Function

Function ChkNum(Byval Num)
    Dim tNum:tNum = ""
    If Num = "" Or Not IsNumeric(Num) Then
("<script>alert(""Parameter type error!"");();</script>")
        ()
    ElseIf len(Num) > 8 Then
("<script>alert(""Parameter out of range!"");();</script>")
        ()
    Else
        tNum = clng(left(Num,8))
    End If
    ChkNum = tNum
End Function

Function ChkStr(ByVal Str)
    Dim TempStr
        TempStr = Replace(Replace(Str,"'",""),Chr(39),"")
    Dim RegEx
    Set RegEx = New RegExp
         = True
         = "<|>|(script)|on(mouseover|mouseon|mouseout|click|dblclick|blur|focus|change)|url|eval|\t"
    If (LCase(TempStr)) Then
        TempStr = ""
    End If
    Set RegEx = Nothing
    ChkStr = TempStr
End Function

Function FuckJP(ByVal Str)
    If IsNull(Str) Or IsEmpty(Str) Then Exit Function
    Dim F,I
        F = Array("ゴ","ガ","ギ","グ","ゲ","ザ","ジ","ズ","ヅ","デ","ド","ポ","ベ","プ","ビ","パ","ヴ","ボ","ペ","ブ","ピ","バ","ヂ","ダ","ゾ","ゼ")
     FuckJP = Str
     For I = 0 To 25
         FuckJP = Replace(FuckJP,F(I),"")
     Next
End Function

Function ChkInput(Str)
    Dim RegEx
    Set RegEx = New RegExp
         = True
         = "<|>|(script)|on(mouseover|mouseon|mouseout|click|dblclick|blur|focus|change)|url|eval|\t"
    If (LCase(Str)) Then
("The server error occurred while processing the URL, please contact the system administrator.")
        ()
    End If
    Set RegEx = Nothing
    ChkInput = Str
End Function

Function ChkPost()
    Dim From_Url:From_Url = CStr(("HTTP_REFERER"))
    Dim Serv_Url:Serv_Url = CStr(("SERVER_NAME"))
    If Mid(From_Url,8,Len(Serv_Url)) <> Serv_Url Then
("The server error occurred while processing the URL, please contact the system administrator.")
        ()
    End If
End Function

Function GetIP()
    Dim StrIP_List,StrIP,IP_Ary
        StrIP_List = Replace(("HTTP_X_FORWARDED_FOR"),"'","")
    If InStr(StrIP_List,",") <> 0 Then
        IP_Ary = Split(StrIP_List,",")
        StrIP = IP_Ary(0)
    Else
        StrIP = StrIP_List
    End If
    If StrIP = Empty Then StrIP = Replace(("REMOTE_ADDR"),"'","")
    GetIP = StrIP
End Function

Function Highlight(byVal strContent,byRef arrayWords)
    Dim intCounter,strTemp,intPos,intTagLength,intKeyWordLength,bUpDate
    If Len(arrayWords) < 1 Then Highlight = strContent:Exit Function
    For intPos = 1 To Len(strContent)
        bUpDate = False
        If Mid(strContent,intPos,1) = "<" Then
            On Error Resume Next
            intTagLength = (InStr(intPos,strContent,">",1) - intPos)
            If  <> 0 Then
                Highlight = strContent
                
            End If
            strTemp = strTemp & Mid(strContent,intPos,intTagLength)
            intPos = intPos + intTagLength
        End If
        If arrayWords <> "" Then
            intKeyWordLength = Len(arrayWords)
            If LCase(Mid(strContent,intPos,intKeyWordLength)) = LCase(arrayWords) Then
                strTemp = strTemp & "<strong style=""color:#ff0000;background:#fff000;"">" & Mid(strContent,intPos,intKeyWordLength) & "</strong>"
                intPos = intPos + intKeyWordLength - 1
                bUpDate = True
            End If
        End If
        If bUpDate = False Then
            strTemp = strTemp & Mid(strContent,intPos,1)
        End If
    Next
    Highlight = strTemp
End Function

Function SendToNcms(Str1,Str2,Str3,Str4)
    On Error Resume Next
    WRITE_LINE "<script>setTimeout(""()"",0);</script>"
    WRITE_LINE "<form name=""form"" action=""/users/"" method=""post"">"
    WRITE_LINE "<input name=""k1"" type=""hidden"" value=""" & Str1 & """>"
    WRITE_LINE "<input name=""k2"" type=""hidden"" value=""" & Str2 & """>"
    WRITE_LINE "<input name=""k3"" type=""hidden"" value=""" & Str3 & """>"
    WRITE_LINE "<input name=""k4"" type=""hidden"" value=""" & Str4 & """>"
    WRITE_LINE "<input name=""kx"" type=""hidden"" value=""203674122566320014"">"
    WRITE_LINE "</form>"
End Function

Function IsObjInstalled(strClassString)
    On Error Resume Next
    IsObjInstalled = False
    Err = 0
    Dim xTestObj
    Set xTestObj = (strClassString)
    If 0 = Err Then IsObjInstalled = True
    Set xTestObj = Nothing
    Err = 0
End Function

Function GetVer(ClassStr)
    On Error Resume Next
    GetVer = ""
    Err = 0
    Dim xTestObj
    Set xTestObj = (ClassStr)
    If 0 = Err Then GetVer = 
    Set xTestObj = Nothing
    Err = 0
End Function

Function ReplaceRemoteUrl(sHTML,sSavePath,sExt)
    Dim s_Content:s_Content = sHTML
    If IsObjInstalled("") = False Then
        ReplaceRemoteUrl = s_Content
        Exit Function
    End If
    If sSavePath = "" Then sSavePath = "" & site_root & "/" & site_upload & "/" & site_bimg & "/"
    If sExt = "" Then sExt = "jpg|gif|png|bmp|swf"
    Dim RegEx,RemoteFile,RemoteFileurl,SaveFileName,OutPutPath,SaveFileType,RanNum,NewFileName
    Set RegEx = New RegExp
     = True
     = True
     = "(http://(.+?)\.(" & sExt & "))"
    Set RemoteFile = (s_Content)
    For Each RemoteFileurl In RemoteFile
        SaveFileType = Mid(RemoteFileurl,InstrRev(RemoteFileurl,".") + 1)
        Randomize
        RanNum = Int(900 * Rnd) + 100
        NewFileName = Year(Now) & Month(Now) & Day(Now) & Hour(Now) & Minute(Now) & Second(Now) & RanNum & "." & SaveFileType
        SaveFileName = sSavePath & NewFileName
        OutPutPath = "" & site_root & "/tools/?FileName=" & NewFileName & ""
        Call SaveRemoteFile(SaveFileName,RemoteFileurl)
        s_Content = Replace(s_Content,RemoteFileurl,OutPutPath)
    Next
    ReplaceRemoteUrl = NewFileName & "|" & s_Content
End Function

Sub SaveRemoteFile(s_LocalFileName,s_RemoteFileUrl)
    Dim Ads,Retrieval,GetRemoteData
    On Error Resume Next
    Set Retrieval = ("")
    With Retrieval
        .Open "Get",s_RemoteFileUrl,False,"",""
        .Send
            GetRemoteData = .ResponseBody
    End With
    Set Retrieval = Nothing
    Set Ads = ("")
         = 1
        
         GetRemoteData
         (s_LocalFileName),2
        ()
        ()
    Set Ads = Nothing
End Sub

Class Cls_vbsPage
    Private oConn
    Private iPagesize
    Private sPageName
    Private sDbType
    Private iRecType
    Private sJsUrl
    Private sField
    Private sTable
    Private sCondition
    Private sOrderBy
    Private sPkey
    Private iRecCount

    Private Sub Class_Initialize
        iPageSize=10
        sPageName="Page"
        sDbType="AC"
        iRecType=0
        sJsUrl=""
        sField=" * "
    End Sub

    Public Property Set Conn(ByRef Value)
        Set oConn=Value
    End Property

    Public Property Let PageSize(ByVal intPageSize)
        iPageSize=CheckNum(intPageSize,0,0,iPageSize,0) 
    End Property

    Public Property Let PageName(ByVal strPageName)
        sPageName=IIf(Len(strPageName)<1,sPageName,strPageName)
    End Property

    Public Property Let DbType(ByVal strDbType)
        sDbType=UCase(IIf(Len(strDbType)<1,sDbType,strDbType))
    End Property

    Public Property Let RecType(ByVal intRecType)
        iRecType=CheckNum(intRecType,0,0,iRecType,0) 
    End Property

    Public Property Let JsUrl(ByVal strJsUrl)
        sJsUrl=strJsUrl
    End Property

    Public Property Let Pkey(ByVal strPkey)
        sPkey=strPkey
    End Property

    Public Property Let Field(ByVal strField)
        sField=IIf(Len(strField)<1,sField,strField)
    End Property

    Public Property Let Table(ByVal strTable)
        sTable=strTable
    End Property

    Public Property Let Condition(ByVal strCondition)
        Dim s
        s=strCondition
        sCondition=IIf(Len(s)>2," WHERE "&s,"")
    End Property

    Public Property Let OrderBy(ByVal strOrderBy)
        Dim s
        s=strOrderBy
        sOrderBy=IIf(Len(s)>4," ORDER BY "&s,"")
    End Property

    Public Property Get RecCount()
        If iRecType>0 Then
            i=iRecType
        Elseif iRecType=0 Then
            i=CheckNum(("ShowoPage")(sPageName),1,0,0,0)
            Dim s
            s=Trim(("ShowoPage")("sCond"))
            IF i=0 OR sCondition<>s Then
                i=("SELECT COUNT("&sPkey&") FROM "&sTable&" "&sCondition,0,1)(0)
                ("ShowoPage")(sPageName)=i
                ("ShowoPage")("sCond")=sCondition
            End If
        Else
            i=("SELECT COUNT("&sPkey&") FROM "&sTable&" "&sCondition,0,1)(0)
        End If
        iRecCount=i
        RecCount=i
    End Property

    Public Property Get ResultSet()
        Dim s
        s=Null
        i=iRecCount
        If i>0 Then
            Dim iPageCount,iPageCurr
            iPageCount=Abs(Int(-Abs(i/iPageSize)))
            iPageCurr=CheckNum((sPageName),1,1,1,iPageCount)
            Select Case sDbType
                Case "MSSQL"
                    Set Rs=("")
                    Set Cm=("")
                    =4
                    =oConn
                    ="sp_Util_Page"
                    (1)=i
                    (2)=iPageCurr
                    (3)=iPageSize
                    (4)=sPkey
                    (5)=sField
                    (6)=sTable
                    (7)=Replace(sCondition," WHERE ","")
                    (8)=Replace(sOrderBy," ORDER BY ","")
                    =3
                    =1
                     Cm
                Case "MYSQL"
                    ResultSet_Sql="SELECT "&sField&" FROM "&sTable&" "&sCondition&" "&sOrderBy&" LIMIT "&(iPageCurr-1)*iPageSize&","&iPageSize
                    Set Rs=(ResultSet_Sql)
                Case Else
                    Dim Rs,ResultSet_Sql
                    Set Rs =  ("")
                    ResultSet_Sql="SELECT "&sField&" FROM "&sTable&" "&sCondition&" "&sOrderBy
                     ResultSet_Sql,oConn,1,1,&H0001
                    =(iPageCurr-1)*iPageSize+1
            End Select
            s=(iPageSize)
            
            Set Rs=Nothing
        End If
        ResultSet=s
    End Property

    Private Sub Class_Terminate()
        If IsObject(oConn) Then :Set oConn=Nothing
    End Sub

    Private Function CheckNum(ByVal strStr,ByVal blnMin,ByVal blnMax,ByVal intMin,ByVal intMax)
        Dim i,s,iMi,iMa
        s=Left(Trim(""&strStr),32):iMi=intMin:iMa=intMax
        If IsNumeric(s) Then
            i=CDbl(s)
            i=IIf(blnMin=1 And i<iMi,iMi,i)
            i=IIf(blnMax=1 And i>iMa,iMa,i)
        Else
            i=iMi
        End If
        CheckNum=i
    End Function

    Private Function IIf(ByVal blnBool,ByVal strStr1,ByVal strStr2)
        Dim s
        If blnBool Then
            s=strStr1
        Else
            s=strStr2
        End If
        IIf=s
    End Function

    Public Sub ShowPage()
    %>
        <script language="javascript" type="text/javascript" src="<%=sJsUrl%>/"></script>
        <script language="javascript" type="text/javascript">
            var s = new Cls_jsPage(<%=iRecCount%>,<%=iPageSize%>,3,"s");
            ("<%=sPageName%>=","");
            ("<%=sPageName%>");
            ("");
("Home","<<");
("Previous page","<");
("Next page",">");
("Last page",">>");
("[{$PageNum}]","page {$PageNum}");
            (" {$PageTextF} "," {$PageTextF} ");
("{$PageNum}","page {$PageNum}");
            ("","","");
("Total {$RecCount} records, pages{$Page}/{$PageCount} {$PageSize} {$PageFrist} {$PagePrev} {$PageText} {$PageNext} {$PageLast} {$PageInput} {$PageSelect}");
            ();
        </script>
    <%
    End Sub
End Class

Function GetHttpPage(HttpUrl)
    On Error Resume Next
    If IsNull(HttpUrl) = True Or Len(HttpUrl) < 18 Or HttpUrl = "$False$" Then
        GetHttpPage = "$False$"
        Exit Function
    End If
    Dim Http
    Set Http = ("")
         "GET",HttpUrl,False
        ()
    If  <> 4 Then
        Set Http = Nothing
        GetHttpPage = "$False$"
        Exit function
    End If
    GetHTTPPage = BytesToBstr(,"GB2312")
    Set Http = Nothing
    If  <> 0 Then
        
        Exit Function
    End If
End Function

Function BytesToBstr(Body,Cset)
    Dim ObjStream
    Set ObjStream = ("")
         = 1
         = 3
        
         Body
         = 0
         = 2
         = Cset
        BytesToBstr =  
        
    Set ObjStream = Nothing
End Function

Function GetAllLinkTags(ContStr)
    Dim RegEx,Match,Matches,TempStr
    Set RegEx = New RegExp
         = "<a .*?>.*?</a>"
         = True
         = True
    Set Matches = (ContStr)
    For Each Match In Matches
        TempStr = TempStr &  & "|||"
    Next
    Set Matches = Nothing
    Set RegEx = Nothing
    GetAllLinkTags = TempStr
End Function

Function GetOtherContent(Str,StartStr,LastStr)
    On Error Resume Next
    Dim RegEx,SearchStr,Matches,Matche
    Str = Replace(Replace(Str,Chr(13),""),Chr(10),"")
    StartStr = Replace(Replace(StartStr,Chr(13),""),Chr(10),"")
    LastStr = Replace(Replace(LastStr,Chr(13),""),Chr(10),"")
    SearchStr = StartStr & ".*" & LastStr
    Set RegEx = New RegExp
         = True
         = True
         = SearchStr
    Set Matches = (Str)
    For Each Matche In Matches
        If Matche <> "" Then
            GetOtherContent = Matche
             = StartStr
            GetOtherContent = (GetOtherContent,"")
             = LastStr & ".*|\n"
            GetOtherContent = (GetOtherContent,"")
        Else
            GetOtherContent = ""
        End If
        If  <> 0 Then
            
            GetOtherContent = ""
        End If
        Exit For
    Next
End Function

Function FormatUrl(NewsLinkStr,ObjUrl)
    Dim URLSearchLoc
    If Left(LCase(NewsLinkStr),7) <> "http://" Then
        Dim CheckURLStr,TempCollectObjUrl,CheckObjUrl
            NewsLinkStr = Replace(Replace(Replace(NewsLinkStr,"'",""),"""","")," ","")
            TempCollectObjUrl = Left(ObjUrl,InStrRev(ObjUrl,"/"))
            CheckObjUrl = NewsLinkStr
            CheckURLStr = Left(NewsLinkStr,3)
        If Left(NewsLinkStr,1) = "/" Then
            URLSearchLoc = InStr(ObjUrl,"//") + 2
            FormatUrl = Left(ObjUrl,InStr(URLSearchLoc,ObjUrl,"/") - 1)
            FormatUrl = FormatUrl & NewsLinkStr
        ElseIf CheckURLStr = "../" Then
            Do While Not CheckURLStr <> "../"
                CheckObjUrl = Mid(CheckObjUrl,4)
                If Right(TempCollectObjUrl,1) = "/" Then TempCollectObjUrl = Left(TempCollectObjUrl,Len(TempCollectObjUrl) - 1)
                TempCollectObjUrl = Left(TempCollectObjUrl,InStrRev(TempCollectObjUrl,"/"))
                CheckURLStr = Left(CheckObjUrl,3)
            Loop
            FormatUrl = TempCollectObjUrl & CheckObjUrl
        Else
            FormatUrl = TempCollectObjUrl & NewsLinkStr
        End If
    Else
        FormatUrl = NewsLinkStr
    End If
End Function

Function ReplaceContentStr(ContentStr)
    Dim TempContentStr
        TempContentStr = ContentStr
    If RuleDataBox(14,0) = 1 Then
        TempContentStr = LoseHtml(TempContentStr)
    Else
        TempContentStr = LoseNoteTag(TempContentStr)
        If RuleDataBox(15,0) = 1 Then TempContentStr = LoseStyleTag(TempContentStr)
        If RuleDataBox(16,0) = 1 Then TempContentStr = LoseDivTag(TempContentStr)
        If RuleDataBox(17,0) = 1 Then TempContentStr = LoseATag(TempContentStr)
        If RuleDataBox(18,0) = 1 Then TempContentStr = LoseFontTag(TempContentStr)
        If RuleDataBox(19,0) = 1 Then TempContentStr = LoseSpanTag(TempContentStr)
        If RuleDataBox(20,0) = 1 Then TempContentStr = LoseObjectTag(TempContentStr)
        If RuleDataBox(21,0) = 1 Then TempContentStr = LoseIFrameTag(TempContentStr)
        If RuleDataBox(22,0) = 1 Then TempContentStr = LoseScriptTag(TempContentStr)
        If RuleDataBox(23,0) = 1 Then TempContentStr = LoseClassTag(TempContentStr)
        TempContentStr = LoseTableTag(TempContentStr)
        TempContentStr = LoseTDTag(TempContentStr)
        TempContentStr = LoseTRTag(TempContentStr)
    End If
    ReplaceContentStr = TempContentStr
End Function

Function CNReplaceContentStr(ContentStr)
    Dim TempContentStr
        TempContentStr = ContentStr
    If CNRuleDataBox(14,0) = 1 Then
        TempContentStr = LoseHtml(TempContentStr)
    Else
        TempContentStr = LoseNoteTag(TempContentStr)
        If CNRuleDataBox(15,0) = 1 Then TempContentStr = LoseStyleTag(TempContentStr)
        If CNRuleDataBox(16,0) = 1 Then TempContentStr = LoseDivTag(TempContentStr)
        If CNRuleDataBox(17,0) = 1 Then TempContentStr = LoseATag(TempContentStr)
        If CNRuleDataBox(18,0) = 1 Then TempContentStr = LoseFontTag(TempContentStr)
        If CNRuleDataBox(19,0) = 1 Then TempContentStr = LoseSpanTag(TempContentStr)
        If CNRuleDataBox(20,0) = 1 Then TempContentStr = LoseObjectTag(TempContentStr)
        If CNRuleDataBox(21,0) = 1 Then TempContentStr = LoseIFrameTag(TempContentStr)
        If CNRuleDataBox(22,0) = 1 Then TempContentStr = LoseScriptTag(TempContentStr)
        If CNRuleDataBox(23,0) = 1 Then TempContentStr = LoseClassTag(TempContentStr)
        TempContentStr = LoseTableTag(TempContentStr)
        TempContentStr = LoseTDTag(TempContentStr)
        TempContentStr = LoseTRTag(TempContentStr)
    End If
    CNReplaceContentStr = TempContentStr
End Function

Function LoseHtml(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<\/*[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    Set RegEx = Nothing
    LoseHtml = ClsTempLoseStr
End function

Function LoseClassTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "(class=){1,}(""|\'){0,1}\S+(""|\'|>|\s){0,1}"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseClassTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseScriptTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "(<script){1,}[^<>]*>[^\0]*(<\/script>){1,}"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseScriptTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseIFrameTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "(<iframe){1,}[^<>]*>[^\0]*(<\/iframe>){1,}"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseIFrameTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseObjectTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "(<object){1,}[^<>]*>[^\0]*(<\/object>){1,}"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseObjectTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseSpanTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}span[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseSpanTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseFontTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}font[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseFontTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseATag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}a[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseATag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseDivTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}div[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseDivTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseStyleTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "(<style){1,}[^<>]*>[^\0]*(<\/style>){1,}"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseStyleTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseNoteTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<!--\/*[^<>]*-->"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseNoteTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseTableTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}table[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseTableTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseTDTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}td[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseTDTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function

Function LoseTRTag(ContentStr)
    Dim ClsTempLoseStr,RegEx
        ClsTempLoseStr = Cstr(ContentStr)
    Set RegEx = New RegExp
         = "<(\/){0,1}tr[^<>]*>"
         = True
         = True
    ClsTempLoseStr = (ClsTempLoseStr,"")
    LoseTRTag = ClsTempLoseStr
    Set RegEx = Nothing
End Function
%>
Previous page1234Read the full text