成人性生交大片免费看视频r_亚洲综合极品香蕉久久网_在线视频免费观看一区_亚洲精品亚洲人成人网在线播放_国产精品毛片av_久久久久国产精品www_亚洲国产一区二区三区在线播_日韩一区二区三区四区区区_亚洲精品国产无套在线观_国产免费www

主頁 > 知識庫 > 推薦下天楓常用ASP函數(shù)封裝,推薦大家使用

推薦下天楓常用ASP函數(shù)封裝,推薦大家使用

熱門標(biāo)簽:調(diào)度系統(tǒng)外呼 電銷機器人教育 電銷機器人源碼網(wǎng)盤下載 宜賓語音外呼系統(tǒng)軟件 中國辦理電信400電話 河北智能外呼系統(tǒng)軟件 福建外呼增值業(yè)務(wù)線路 伊春外呼業(yè)務(wù)系統(tǒng) 綿陽防封電銷卡價格
復(fù)制代碼 代碼如下:

%
'-------------------------------------
'天楓ASP class v1.0,集常用asp函數(shù)于一體
'天楓版權(quán)所有http://www.52515.net
'QQ:76994859 EMAIL:Chenshaobo@gmail.com

'所有功能函數(shù)名如下:
' StrLength(str) 取得字符串長度
' CutStr(str,strlen) 字符串長度切割
' CheckIsEmpty(tstr) 檢測是否為空
' isInteger(para) 整數(shù)檢驗
' CheckName(str) 名字字符校驗
' CheckPassword(str) 密碼檢驗
' CheckEmail(email) 郵箱格式檢驗
' Alert(msg,goUrl) 彈出對話框提示
' GoBack(Str1,Str2,isback) 出錯信息提示
' Suc(str1,str2,url) 操作成功信息提示
' ChkPost() 檢測是否站外提交表單
' PSql() 防止sql注入
' FiltrateHtmlCode(Str) 防止生成HTML
' HtmlCode(str) 過濾HTML
' Replacehtml(tstr) 清濾HTML
' GetIP() 獲取客戶端IP
' GetBrowser 獲取客戶端瀏覽器信
' GetSystem 獲取客戶端操作系統(tǒng)
' GetUrl() 獲取當(dāng)前頁面URL包含參數(shù)
' CUrl()   獲取當(dāng)前頁面URL
' GetExtend 取得文件擴展名
' CheckExist(table,fieldname,fieldcontent,isblur) 檢測某個表中某個字段的內(nèi)容是否存在
' GetNum(table,fieldname,resulttype,args) 檢測某個表某個字段有多少條,最大值 ,最小值等
' GetFolderSize(Folderpath) 計算某個文件夾的大小
' GetFileSize(Filename) 計算某個文件的大小
' IsObjInstalled(strClassString) 檢測組件是否安裝
' SendMail JMAIL發(fā)送郵件
' ResponseCookies 寫入cookies
' CleanCookies 清除cookies
' GetTimeover 取得程序頁面執(zhí)行時間
' FormatSize 大小格式化
' FormatTime 時間格式化
' Zodiac 取得生肖
' Constellation   取得星座
'-------------------------------------

Class Cls_fun

'--------字符處理--------------------------

    '****************************************************
    '函數(shù)名:StrLength
    '作  用:取得字符串長度(漢字為2)
    '參  數(shù):str ----字符串內(nèi)容
    '返回值:字符串長度
    '****************************************************
    Public function StrLength(str)
            Dim Rep,lens,i
            Set rep=new regexp
            rep.Global=true
            rep.IgnoreCase=true
            rep.Pattern="[\u4E00-\u9FA5\uF900-\uFA2D]"
            For each i in rep.Execute(str)
                lens=lens+1
            Next
            Set Rep=Nothing
            lens=lens + len(str)
            strLength=lens
        End Function

    '****************************************************
    '函數(shù)名:CutStr
    '作  用:字符串長度切割,超過顯示省略號
    '參  數(shù):str    ----字符串內(nèi)容
    '       strlen ------要顯示的長度
    '返回值:切割后字符串內(nèi)容
    '****************************************************
    Public Function CutStr(str,strlen)
           Dim l,t,i,c
           If str="" Then
              cutstr=""
              Exit Function
           End If
           str=Replace(Replace(Replace(Replace(Replace(str,"nbsp;"," "),"quot;",Chr(34)),"gt;",">"),"lt;",""),"#124;","|")
           l=Len(str)
           t=0
           For i=1 To l
              c=Abs(Asc(Mid(str,i,1)))
              If c>255 Then
                t=t+2
              Else
                t=t+1
              End If
              If t>=strlen Then
                cutstr=Left(str,i)  "..."
                Exit For
              Else
                cutstr=str
              End If
           Next
           cutstr=Replace(Replace(Replace(Replace(replace(cutstr," ","nbsp;"),Chr(34),"quot;"),">","gt;"),"","lt;"),"|","#124;")
        End Function

'--------------系列驗證----------------------------

    '****************************************************
    '函數(shù)名:CheckIsEmpty
    '作  用:檢查是否為空
    '參  數(shù):tstr ----字符串
    '返回值:true不為空,false為空
    '****************************************************
    Public Function CheckIsEmpty(tstr)
        CheckIsEmpty=false
        If IsNull(tstr) or Tstr="" Then Exit Function 
        Dim Str,re
        Str=Tstr
        Set re=new RegExp
        re.IgnoreCase =True
        re.Global=True
        str= Replace(str, vbNewLine, "")
        str = Replace(str, Chr(9), "")
        str = Replace(str, " ", "")
        str = Replace(str, "nbsp;", "")
        re.Pattern="img(.[^>]*)>"
        str =re.Replace(Str,"94kk")
        re.Pattern="(.[^>]*)>"
        Str=re.Replace(Str,"")
        Set Re=Nothing
        If Str>"" Then CheckIsEmpty=true
    End Function

    '****************************************************
    '函數(shù)名:isInteger
    '作  用:整數(shù)檢驗
    '參  數(shù):tstr ----字符
    '返回值:true是整數(shù),false不是整數(shù)
    '****************************************************
    Public function isInteger(para)
           on error resume Next
           Dim str
           Dim l,i
           If isNUll(para) then 
              isInteger=false
              exit function
           End if
           str=cstr(para)
           If trim(str)="" then
              isInteger=false
              exit function
           End if
           l=len(str)
           For i=1 to l
               If mid(str,i,1)>"9" or mid(str,i,1)"0" then
                  isInteger=false 
                  exit function
               End if
           Next
           isInteger=true
           If err.number>0 then err.clear
    End Function

    '****************************************************
    '函數(shù)名:CheckName
    '作  用:名字字符檢驗    
    '參  數(shù):str ----字符串
    '返回值:true無誤,false有誤
    '****************************************************
    Public Function CheckName(Str)
        Checkname=true
        Dim Rep,pass
        Set Rep=New RegExp
        Rep.Global=True
        Rep.IgnoreCase=True
        '匹配字母、數(shù)字、下劃線、漢字且必須以字母或下劃線或漢字開始
        Rep.Pattern="^[a-zA-Z_u4e00-\u9fa5][\w\u4e00-\u9fa5]+$"
        Set pass=Rep.Execute(Str)
        If pass.count=0 Then CheckName=false
        Set Rep=Nothing
    End Function

    '****************************************************
    '函數(shù)名:CheckPassword
    '作  用:密碼檢驗
    '參  數(shù):str ----字符串
    '返回值:true無誤,false有誤
    '****************************************************
    Public Function CheckPassword(Str)
        Dim pass
        CheckPassword=true
        If Str > "" Then
            Dim Rep
            Set Rep = New RegExp
            Rep.Global = True
            Rep.IgnoreCase = True
            '匹配字母、數(shù)字、下劃線、點號
            Rep.Pattern="[a-zA-Z0-9_\.]+$"
            Pass=rep.Test(Str)
            Set Rep=nothing
            If not Pass Then CheckPassword=false
            End If
    End Function    

    '****************************************************
    '函數(shù)名:CheckEmail
    '作  用:郵箱格式檢測
    '參  數(shù):str ----Email地址
    '返回值:true無誤,false有誤
    '****************************************************
    Public function CheckEmail(email)
        CheckEmail=true
        Dim Rep
        Set Rep = new RegExp
        rep.pattern="([\.a-zA-Z0-9_-]){2,10}@([a-zA-Z0-9_-]){2,10}(\.([a-zA-Z0-9]){2,}){1,4}$"
        pass=rep.Test(email)
        Set Rep=Nothing
        If not pass Then CheckEmail=false
    End function

'--------------信息提示----------------------------        
    '****************************************************
    '函數(shù)名:Alert
    '作  用:彈出對話框提示
    '參  數(shù):msg   ----對話框信息
    '       gourl ----提示后轉(zhuǎn)向哪里
    '返回值:無
    '****************************************************
    Public Function Alert(msg,goUrl)
        msg = replace(msg,"'","\'")
          If goUrl="" Then
              goUrl="history.go(-1);"
        Else
            goUrl="window.location.href='"goUrl"'"
        End IF
        Response.Write ("script language=""JavaScript"" type=""text/javascript"">"vbNewLine"alert('"  msg  "');"goUrlvbNewLine"/script>")
        Response.End
    End Function

    '****************************************************
    '函數(shù)名:GoBack
    '作  用:錯誤信息提示
    '參  數(shù):str1   ----信息提示標(biāo)題
    '       str2   ----信息提示內(nèi)容
    '       isback ----是否顯示返回
    '返回值:無
    '****************************************************
    Public Function GoBack(Str1,Str2,isback)
        If Str1="" Then Str1="錯誤信息"
        If Str2="" Then Str2="請?zhí)顚懲暾靥铐椖?
        If isback="" Then 
            Str2=Str2" a href=""javascript:history.go(-1)"">返回重填/a>/li>"
        else
            Str2=Str2
        end if
        Response.Write"div style=""margin-left:5px;border:1px solid #0066cc;width:98%"">div style=""height:22px;font-weight:bold;color ?1 white;font-size:14px;background:#799AE1;background:url(images/th.gif);;text-align:left;line-height:20px;padding:3px;"">"Str1" /div>div style=""line-height:50px;background:#F7F7F7;vertical-align:middle;font-size:14px;width:100%"">div  style=""color:red;font:50px/50px 宋體;float:left;width:5%"">×/div>div  style=""margin-top:8px;float:right;width:90%;text-align:left;padding-left:3px;"">"str2"/div>/div>/div>"
        response.end
    End Function

    '****************************************************
    '函數(shù)名:Suc
    '作  用:成功提示信息
    '參  數(shù):str1   ----信息提示標(biāo)題
    '       str2   ----信息提示內(nèi)容
    '       url    ----返回地址
    '返回值:無
    '****************************************************
    Public Function Suc(str1,str2,url)
        If str1="" Then Str1="操作成功"
        If str2="" Then Str2="成功的完成這次操作!"
        If url="" Then url="javascript:history.go(-1)"
        str2=str2"nbsp;nbsp;a href="""url""" >返回繼續(xù)管理/a>"
        Response.Write"div style=""margin-left:5px;border:1px solid #0066cc;width:98%"">div style=""height:22px;font-weight:bold;color ?1 white;font-size:14px;background:#799AE1;background:url(images/th.gif);;text-align:left;line-height:20px;padding:3px;"">"Str1" /div>div style=""line-height:50px;background:#F7F7F7;vertical-align:middle;font-size:14px;width:100%"">div  style=""color:red;font:50px/50px 宋體;float:left;width:5%"">√/div>div  style=""margin-top:8px;float:right;width:90%;text-align:left;padding-left:3px;"">"str2"/div>/div>/div>"
    End Function

'--------------安全處理----------------------------    

    '****************************************************
    '函數(shù)名:ChkPost
    '作  用:禁止站外提交表單
    '返回值:true站內(nèi)提交,flase站外提交
    '****************************************************
    Public Function ChkPost()
        Dim url1,url2
        chkpost=true
        url1=Cstr(Request.ServerVariables("HTTP_REFERER"))
        url2=Cstr(Request.ServerVariables("SERVER_NAME"))
        If Mid(url1,8,Len(url2))>url2 Then
             chkpost=false
             exit function
        End If
    End function

    '****************************************************
    '函數(shù)名:PSql
    '作  用:防止SQL注入
    '返回值:為空則無注入,不為空則注入并返回注入的字符
    '****************************************************
    public Function PSql()
        Psql=""
        badwords= "'防''防;防and防exec防insert防select防update防delete防count防*防%防chr防m(xù)id防m(xù)aster防truncate防char防declare防|"
        badword=split(badwords,"防")
        If Request.Form>"" Then
            For Each TF_Post In Request.Form
                For i=0 To Ubound(badword)
                    If Instr(LCase(Request.Form(TF_Post)),badword(i))>0 Then
                        Psql=badword(i)
                        exit function
                    End If
                Next
            Next
        End If
        If Request.QueryString>"" Then
            For Each TF_Get In Request.QueryString
                For i=0 To Ubound(badword)
                    If Instr(LCase(Request.QueryString(TF_Get)),badword(i))>0 Then
                        Psql=badword(i)
                        exit function
                    End If
                Next
            Next
        End If
    End Function

    '****************************************************
    '函數(shù)名:FiltrateHtmlCode
    '作  用:防止生成html代碼    
    '參  數(shù):str ----字符串
    '****************************************************
    Public Function FiltrateHtmlCode(Str)
        If Not isnull(str) And str>"" then
            Str=Replace(Str,Chr(9),"")
            Str=replace(Str,"|","#124;")
            Str=replace(Str,chr(39),"#39;")
            Str=replace(Str,"","lt;")
            Str=replace(Str,">","gt;")
            Str = Replace(str, CHR(13),"")
            Str = Replace(str, CHR(10),"")
            FiltrateHtmlCode=Str
        End If
    End Function

    '****************************************************
    '函數(shù)名:HtmlCode
    '作  用:過濾Html標(biāo)簽
    '參  數(shù):str ----字符串
    '****************************************************
    Public function HtmlCode(str)
        If Not isnull(str) And str>"" then
            str = replace(str, ">", "gt;")
            str = replace(str, "", "lt;")
            str = Replace(str, CHR(32), " ")
            str = Replace(str, CHR(9), "nbsp;")
            str = Replace(str, CHR(34), "quot;")
            str = Replace(str, CHR(39), "#39;")
            str = Replace(str, CHR(13), "")
            str = Replace(str, CHR(10), "")
            str = Replace(str, "script", "#115cript")
            HtmlCode = str
        End If
    End Function

    '****************************************************
    '函數(shù)名:Replacehtml
    '作  用:清理html
    '參  數(shù):tstr ----字符串
    '****************************************************
    Public Function Replacehtml(tstr)
        Dim Str,re
        Str=Tstr
        Set re=new RegExp
            re.IgnoreCase =True
            re.Global=True
            re.Pattern="(p|/p|br)>"
            Str=re.Replace(Str,vbNewLine)
            re.Pattern="img.[^>]*src(=| )(.[^>]*)>"
            str=re.replace(str,"[img]$2[/img]")
            re.Pattern="(.[^>]*)>"
            Str=re.Replace(Str,"")
            Set Re=Nothing
            Replacehtml=Str
    End Function


'---------------獲取客戶端和服務(wù)端的一些信息-------------------

    '****************************************************
    '函數(shù)名:GetIP
    '作  用:獲取客戶端IP地址
    '返回值:客戶端IP地址
    '****************************************************
    Public Function GetIP()
        Dim Temp
        Temp = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
        If Temp = "" or isnull(Temp) or isEmpty(Temp) Then Temp = Request.ServerVariables("REMOTE_ADDR")
        If Instr(Temp,"'")>0 Then Temp="0.0.0.0"
        GetIP = Temp
    End Function

    '****************************************************
    '函數(shù)名:GetBrowser
    '作  用:獲取客戶端瀏覽器信息
    '返回值:客戶端瀏覽器信息
    '****************************************************
    Public Function GetBrowser()
           info=Request.ServerVariables(HTTP_USER_AGENT) 
        if Instr(info,"NetCaptor 6.5.0")>0 then
            browser="NetCaptor 6.5.0"
        elseif Instr(info,"MyIe 3.1")>0 then
            browser="MyIe 3.1"
        elseif Instr(info,"NetCaptor 6.5.0RC1")>0 then
            browser="NetCaptor 6.5.0RC1"
        elseif Instr(info,"NetCaptor 6.5.PB1")>0 then
            browser="NetCaptor 6.5.PB1"
        elseif Instr(info,"MSIE 5.5")>0 then
            browser="Internet Explorer 5.5"
        elseif Instr(info,"MSIE 6.0")>0 then
            browser="Internet Explorer 6.0"
        elseif Instr(info,"MSIE 6.0b")>0 then
            browser="Internet Explorer 6.0b"
        elseif Instr(info,"MSIE 5.01")>0 then
            browser="Internet Explorer 5.01"
        elseif Instr(info,"MSIE 5.0")>0 then
            browser="Internet Explorer 5.00"
        elseif Instr(info,"MSIE 4.0")>0 then
            browser="Internet Explorer 4.01"
        else
            browser="其它"
        end if
    End Function

    '****************************************************
    '函數(shù)名:GetSystem
    '作  用:獲取客戶端操作系統(tǒng)
    '返回值:客戶端操作系統(tǒng)
    '****************************************************
    Function GetSystem()
        info=Request.ServerVariables(HTTP_USER_AGENT) 
        if Instr(info,"NT 5.1")>0 then
            system="Windows XP"
        elseif Instr(info,"Tel")>0 then
            system="Telport"
        elseif Instr(info,"webzip")>0 then
            system="webzip"
        elseif Instr(info,"flashget")>0 then
            system="flashget"
        elseif Instr(info,"offline")>0 then
            system="offline"
        elseif Instr(info,"NT 5")>0 then
            system="Windows 2000"
        elseif Instr(info,"NT 4")>0 then
            system="Windows NT4"
        elseif Instr(info,"98")>0 then
            system="Windows 98"
        elseif Instr(info,"95")>0 then
            system="Windows 95"
        elseif instr(info,"unix") or instr(info,"linux") or instr(info,"SunOS") or instr(info,"BSD") then
            system="類Unix"
        elseif instr(thesoft,"Mac") then
            system="Mac"
        else
            system="其它"
        end if
    End Function

    '****************************************************
    '函數(shù)名:GetUrl
    '作  用:獲取url包括參數(shù)
    '返回值:獲取url包括參數(shù)
    '****************************************************
    Public Function GetUrl()   
        Dim strTemp     
        strTemp=Request.ServerVariables("Script_Name")      
        If  Trim(Request.QueryString)> "" Then
            strTemp=strTemp"?"
            For Each M_item In Request.QueryString
                strTemp=strTempM_item"="Server.UrlEncode(Trim(Request.QueryString(""M_item"")))
            next
        end if
        GetUrl=strTemp   
    End Function 

    '****************************************************
    '函數(shù)名:CUrl
    '作  用:獲取當(dāng)前頁面URL的函數(shù)
    '返回值:當(dāng)前頁面URL的函數(shù)
    '****************************************************
    Function CUrl()
        Domain_Name = LCase(Request.ServerVariables("Server_Name"))
        Page_Name = LCase(Request.ServerVariables("Script_Name"))
        Quary_Name = LCase(Request.ServerVariables("Quary_String"))
        If Quary_Name ="" Then
            CUrl = "http://"Domain_NamePage_Name
        Else
            CUrl = "http://"Domain_NamePage_Name"?"Quary_Name
        End If
    End Function

    '****************************************************
    '函數(shù)名:GetExtend
    '作  用:取得文件擴展名
    '參  數(shù):filename ----文件名
    '****************************************************
    Public Function GetExtend(filename)
        dim tmp
        if filename>"" then
            tmp=mid(filename,instrrev(filename,".")+1,len(filename)-instrrev(filename,"."))
            tmp=LCase(tmp)
            if instr(1,tmp,"asp")>0 or instr(1,tmp,"php")>0 or instr(1,tmp,"php3")>0 or instr(1,tmp,"aspx")>0 then
                getextend="txt"
            else
                getextend=tmp
            end if
        else
            getextend=""
        end if
    End Function
'------------------數(shù)據(jù)庫的操作-----------------------

    '****************************************************
    '函數(shù)名:CheckExist
    '作  用:檢測某個表中某個字段是否存在某個內(nèi)容
    '參  數(shù):table        ----表名
    '       fieldname    ----字段名
    '       fieldcontent ----字段內(nèi)容
    '       isblur       ----是否模糊匹配
    '返回值:false不存在,true存在
    '****************************************************
    Function CheckExist(table,fieldname,fieldcontent,isblur)
        CheckExist=false
        If isblur=1 Then
            set rsCheckExist=conn.execute("select * from "table" where "fieldname" like '%"fieldcontent"%'")
        else
            set rsCheckExist=conn.execute("select * from "table" where "fieldname"= '"fieldcontent"'")
        End if
        if not (rsCheckExist.eof and rsCheckExist.bof) then CheckExist=true
        rsCheckExist.close
        set rsCheckExist=nothing
    End Function

    '****************************************************
    '函數(shù)名:GetNum
    '作  用:檢測某個表某個字段的數(shù)量或最大值或最小值
    '參  數(shù):table      ----表名
    '       fieldname  ----字段名
    '       resulttype ----還回結(jié)果(count/max/min)
    '       args       ----附加參加(order by ...)
    '返回值:數(shù)值
    '****************************************************
    Function GetNum(table,fieldname,resulttype,args)
        GetFieldContentNum=0
        if fieldname="" then fieldname="*"
        sqlGetFieldContentNum="select "resulttype"("fieldname") from "table args
        set rsGetFieldContentNum=conn.execute(sqlGetFieldContentNum)    
        if not (rsGetFieldContentNum.eof and rsGetFieldContentNum.bof) then GetFieldContentNum=rsGetFieldContentNum(0)
        rsGetFieldContentNum.close
        set rsGetFieldContentNum=nothing
    End Function

    '****************************************************
    '函數(shù)名:UpdateValue
    '作  用:更新表中某字段某內(nèi)容的值
    '參  數(shù):table      ----表名
    '        fieldname  ----字段名
    '        fieldvalue ----更新后的值
    '        id         ----id
    '        url        -------更新后轉(zhuǎn)向地址
    '返回值:無
    '****************************************************
    Public Function UpdateValue(table,fieldname,fieldvalue,id,url)
        conn.Execute("update "table" set "fieldname"="fieldvalue" where id="CLng(trim(id)))
        if url>"" then response.redirect url
    End Function

'---------------服務(wù)端信息和操作-----------------------

    '****************************************************
    '函數(shù)名:GetFolderSize
    '作  用:計算某個文件夾的大小
    '參  數(shù):FileName ----文件夾路徑及文件夾名稱
    '返回值:數(shù)值
    '****************************************************
    Public Function GetFolderSize(Folderpath)
        dim fso,d,size,showsize
        set fso=server.createobject("scripting.filesystemobject")         
        drvpath=server.mappath(Folderpath)     
        if fso.FolderExists(drvpath) Then
            set d=fso.getfolder(drvpath)         
            size=d.size
            GetFolderSize=FormatSize(size)
        Else
            GetFolderSize=Folderpath"文件夾不存在"
        End If 
    End Function

    '****************************************************
    '函數(shù)名:GetFileSize
    '作  用:計算某個文件的大小
    '參  數(shù):FileName ----文件路徑及文件名
    '返回值:數(shù)值
    '****************************************************
    Public Function GetFileSize(FileName)
        Dim fso,drvpath,d,size,showsize
        set fso=server.createobject("scripting.filesystemobject")
        filepath=server.mappath(FileName)
        if fso.FileExists(filepath) then
            set d=fso.getfile(filepath)    
            size=d.size
            GetFileSize=FormatSize(size)
        Else
            GetFileSize=FileName"文件不存在"
        End If
        set fso=nothing
    End Function

    '****************************************************
    '函數(shù)名:IsObjInstalled
    '作  用:檢查組件是否安裝
    '參  數(shù):strClassString ----組件名稱
    '返回值:false不存在,true存在
    '****************************************************
    Public Function IsObjInstalled(strClassString)
        On Error Resume Next
        IsObjInstalled=False
        Err=0
        Dim xTestObj
        Set xTestObj=Server.CreateObject(strClassString)
        If 0=Err Then IsObjInstalled=True
        Set xTestObj=Nothing
        Err=0
    End Function

    '****************************************************
    '函數(shù)名:SendMail
    '作  用:用Jmail組件發(fā)送郵件
    '參  數(shù):ServerAddress ----服務(wù)器地址
    '       AddRecipient  ----收信人地址
    '       Subject       ----主題
    '       Body          ----信件內(nèi)容
    '       Sender        ----發(fā)信人地址
    '****************************************************
    Public function SendMail(MailServerAddress,AddRecipient,Subject,Body,Sender,MailFrom)
        on error resume next
        Dim JMail
        Set JMail=Server.CreateObject("JMail.SMTPMail")
        if err then
            SendMail= "沒有安裝JMail組件"
            err.clear
            exit function
        end if
        JMail.Logging=True
        JMail.Charset="gb2312"
        JMail.ContentType = "text/html"
        JMail.ServerAddress=MailServerAddress
        JMail.AddRecipient=AddRecipient
        JMail.Subject=Subject
        JMail.Body=MailBody
        JMail.Sender=Sender
        JMail.From = MailFrom
        JMail.Priority=1
        JMail.Execute 
        Set JMail=nothing 
        if err then 
            SendMail=err.description
            err.clear
        else
            SendMail="OK"
        end if
    end function

    '****************************************************
    '函數(shù)名:ResponseCookies
    '作  用:寫入COOKIES
    '參  數(shù):Key ----cookie名
    '        value ----cookie值
    '        expires ---- cookie過期時間
    '****************************************************
    Public Function ResponseCookies(Key,Value,Expires)
        DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
        Response.Cookies(Key)=""Value""
        if Expires>0 then Response.Cookies(Key).Expires=date+Expires
        Response.Cookies(Key).Path=DomainPath
    End Function

    '****************************************************
    '函數(shù)名:CleanCookies
    '作  用:清除COOKIES
    '****************************************************
    Public Function CleanCookies()
        DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
        For Each objCookie In Request.Cookies
            Response.Cookies(objCookie)= ""
            Response.Cookies(objCookie).Path=DomainPath
        Next
    End Function

    '****************************************************
    '函數(shù)名:GetTimeOver
    '作  用:清除COOKIES
    '參  數(shù):flag ---顯示時間單位1=秒,否則毫秒
    '****************************************************
    Public Function GetTimeOver(flag)
        Dim EndTime
        If flag = 1 Then
            EndTime=FormatNumber(Timer() - StartTime, 6, true)
            getTimeOver = " 本頁執(zhí)行時間?1 "  EndTime  " 秒"
        Else
            EndTime=FormatNumber((Timer() - StartTime) * 1000, 3, true)
            getTimeOver =" 本頁執(zhí)行時間?1 "  EndTime  " 毫秒"
        End If
    End function
'-----------------系列格式化------------------------

    '****************************************************
    '函數(shù)名:FormatSize
    '作  用:大小格式化
    '參  數(shù):size ----要格式化的大小
    '****************************************************
    Public Function FormatSize(dsize)
        if dsize>=1073741824 then
            FormatSize=Formatnumber(dsize/1073741824,2)  " GB"
        elseif dsize>=1048576 then
            FormatSize=Formatnumber(dsize/1048576,2)  " MB"
        elseif dsize>=1024 then
            FormatSize=Formatnumber(dsize/1024,2)  " KB"
        else
            FormatSize=dsize  " Byte"
        end if
    End Function

    '****************************************************
    '函數(shù)名:FormatTime
    '作  用:時間格式化
    '參  數(shù):DateTime ----要格式化的時間
    '       Format   ----格式的形式
    '****************************************************
    Public Function FormatTime(DateTime,Format) 
        select case Format
        case "1"
             FormatTime=""year(DateTime)"年"month(DateTime)"月"day(DateTime)"日"
        case "2"
             FormatTime=""month(DateTime)"月"day(DateTime)"日"
        case "3" 
             FormatTime=""year(DateTime)"/"month(DateTime)"/"day(DateTime)""
        case "4"
             FormatTime=""month(DateTime)"/"day(DateTime)""
        case "5"
             FormatTime=""month(DateTime)"月"day(DateTime)"日"FormatDateTime(DateTime,4)""
        case "6"
           temp="周日,周一,周二,周三,周四,周五,周六"
           temp=split(temp,",") 
           FormatTime=temp(Weekday(DateTime)-1)
        case Else
        FormatTime=DateTime
        end select
    End Function

'----------------------雜項---------------------
    '****************************************************
    '函數(shù)名:Zodiac
    '作  用:取得生消
    '參  數(shù):birthday ----生日
    '****************************************************
    public Function Zodiac(birthday)
        if IsDate(birthday) then
            birthyear=year(birthday)
            ZodiacList=array("猴","雞","狗","豬","鼠","牛","虎","兔","龍","蛇","馬","羊")        
            Zodiac=ZodiacList(birthyear mod 12)
        end if
    End Function

    '****************************************************
    '函數(shù)名:Constellation
    '作  用:取得星座
    '參  數(shù):birthday ----生日
    '****************************************************
    public Function Constellation(birthday)
        if IsDate(birthday) then
            ConstellationMon=month(birthday)
            ConstellationDay=day(birthday)
            if Len(ConstellationMon)2 then ConstellationMon="0"ConstellationMon
            if Len(ConstellationDay)2 then ConstellationDay="0"ConstellationDay
            MyConstellation=ConstellationMonConstellationDay
            if MyConstellation  0120 then
                constellation="img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
            elseif MyConstellation  0219 then
                constellation="img src=images/Constellation/h.gif title='水瓶座 Aquarius'>"
            elseif MyConstellation  0321 then
                constellation="img src=images/Constellation/i.gif title='雙魚座 Pisces'>"
            elseif MyConstellation  0420 then
                constellation="img src=images/Constellation/^.gif title='白羊座 Aries'>"
            elseif MyConstellation  0521 then
                constellation="img src=images/Constellation/_.gif title='金牛座 Taurus'>"
            elseif MyConstellation  0622 then
                constellation="img src=images/Constellation/`.gif title='雙子座 Gemini'>"
            elseif MyConstellation  0723 then
                constellation="img src=images/Constellation/a.gif title='巨蟹座 Cancer'>"
            elseif MyConstellation  0823 then
                constellation="img src=images/Constellation/b.gif title='獅子座 Leo'>"
            elseif MyConstellation  0923 then
                constellation="img src=images/Constellation/c.gif title='處女座 Virgo'>"
            elseif MyConstellation  1024 then
                constellation="img src=images/Constellation/d.gif title='天秤座 Libra'>"
            elseif MyConstellation  1122 then
                constellation="img src=images/Constellation/e.gif title='天蝎座 Scorpio'>"
            elseif MyConstellation  1222 then
                constellation="img src=images/Constellation/f.gif title='射手座 Sagittarius'>"
            elseif MyConstellation > 1221 then
                constellation="img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
            end if
        end if
    End Function

    '=================================================
    '函數(shù)名:autopage
    '作  用:長文章自動分頁
    '參  數(shù):id,content,urlact
    '=================================================
    Function AutoPage(content,paramater,pagevar)
            contentStr=split(content,pagevar) 
            pagesize=ubound(contentStr)
            if pagesize>0 then
                If Int(Request("page"))="" or Int(Request("page"))=0 Then 
                    pageNum=1 
                Else 
                    pageNum=Request("page") 
                End if 
                if pageNum-1=pagesize then
                    AutoPage=AutoPagecontentStr(pageNum-1)
                    AutoPage=AutoPage"div style=""margin-top:10px;text-align:right;padding-right:15px;"">font color=blue>頁碼:/font>font color=red>"
                    For i=0 to pagesize 
                        if i=pageNum-1 then 
                            AutoPage=AutoPage"[font color=red>"i+1"/font>] "
                        else 
                            if instr(paramater,"?")>0 then
                                AutoPage=AutoPage"a href="""paramater"page="i+1""">["(i+1)"]/a>"
                            else
                                AutoPage=AutoPage"a href="""paramater"?page="i+1""">["(i+1)"]/a>"
                            end if
                        end if  
                    Next 
                    AutoPage=AutoPage"/font>/div>"
                else
                    AutoPage=AutoPage"非法操作!頁號超出!a href=javascript:history.back(-1)>u>返回/u>/a>"
                end if
            Else
                AutoPage=content
            end if
    End Function
End Class
%>

調(diào)用:set fun=new cls_fun

標(biāo)簽:那曲 優(yōu)質(zhì)小號 電商邀評 蘇州 河池 延邊 銅川 新鄉(xiāng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《推薦下天楓常用ASP函數(shù)封裝,推薦大家使用》,本文關(guān)鍵詞  推薦,下天,楓,常用,ASP,函數(shù),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《推薦下天楓常用ASP函數(shù)封裝,推薦大家使用》相關(guān)的同類信息!
  • 本頁收集關(guān)于推薦下天楓常用ASP函數(shù)封裝,推薦大家使用的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    午夜久久久久久久久久影院| 久久久久免费精品| 欧美成人午夜免费视在线看片| 韩国v欧美v日本v亚洲| 不卡av电影在线观看| 久久精品一偷一偷国产| 亚洲xxxxx| 国产精品∨欧美精品v日韩精品| 久久这里只有精品8| 日本美女视频一区二区| 国产精品久久久久久久久久辛辛| 色青青草原桃花久久综合| 久久天天躁夜夜躁狠狠躁2022| 国产毛片毛片毛片毛片毛片毛片| 久久国产一区二区三区| 亚洲成人在线电影| 这里只有精品免费视频| 极品国产人妖chinesets亚洲人妖| 国产在线欧美| 亚洲欧洲精品一区二区| 国内精品久久久久久| 石原莉奈在线亚洲三区| 欧美精品乱码视频一二专区| 亚洲福利视频网站| 欧美另类一区| 俺去啦俺在线观看| 亚洲黄色一级大片| 欧美日韩中文字幕一区二区三区| 国产精品啊啊啊| 国产精品视频永久免费播放| 亚洲AV无码片久久精品| av网站在线免费| 国模精品娜娜一二三区| 国产精品亚洲专一区二区三区| 欧美日韩在线不卡视频| 久久亚洲成人av| 99tv成人影院| 国产欧美一区二区在线播放| 精品乱码一区内射人妻无码| 欧美视频不卡中文| 欧美亚日韩国产aⅴ精品中极品| 色婷婷视频在线| 亚洲精品中文字幕| 一级片免费在线播放| 曰韩精品一区二区| 欧美黑人巨大xxxx猛交| h视频在线观看网站| 国产无遮挡在线视频免费观看| 欧美日韩亚洲精品内裤| 亚洲视频999| 美女爽到高潮91| 女人裸体免费网站| 色偷偷一区二区三区| 欧美日韩综合色| 亚洲美女性生活| 久久伊人精品| 日本激情视频网站| 成人福利小视频| 国产亚洲精品女人久久久久久| 国产91精品看黄网站在线观看| 欧美一区二区三区视频免费| 亚洲精品乱码久久久久久蜜桃91| 欧美不卡123| 日韩a在线看| 精品综合久久久久| www.色香蕉| 性欧美精品高清| 中文字幕在线看精品乱码| 中文字幕精品—区二区日日骚| 精品91一区二区三区| 国产区精品区| 99久久综合国产精品二区| 亚洲视频一区二区三区四区| 欧美激情视频一区二区三区不卡| 大j8黑人w巨大888a片| 一区二区三区日韩欧美| 日本在线免费观看视频| 天堂av中文在线资源库| 成人福利在线看| 手机av在线看| 色伦专区97中文字幕| 另类一区二区| 在线观看av一区| 国产农村一级特黄α**毛片| 欧美日韩天天操| 国产一区2区在线观看| 日日躁夜夜躁人人揉av五月天| 伊人色综合久久天天五月婷| 五月天免费网站| 久久久久久网址| 国产一区二区| 男女高潮又爽又黄又无遮挡| 影音先锋中文字幕影院| 中文字幕第2页| 欧美日韩在线播放一区二区| 激情综合久久| 女人天堂av在线播放| 国产精品久久久久免费| 狠狠色成人综合网图片区| 国产一区二区三区在线观看视频| 精品视频色一区| 97视频在线播放| 久久大综合网| 韩国福利视频一区| 日本成人在线免费观看| 一级黄色片免费看| 美女少妇全过程你懂的久久| 91九色极品视频| 男人与禽猛交狂配| 欧美日韩国产天堂| 亚洲色图国产精品| 精品xxxxxbbbb欧美中文| 亚洲精品视频在线| 日本熟妇成熟毛茸茸| 欧美另类极品videosbest视频| 成人永久看片免费视频天堂| 黄色在线成人| 麻豆明星ai换脸视频| 国产精品久久久久影院老司| 国产精品偷乱一区二区三区| 日韩午夜在线视频| 爽爽窝窝午夜精品一区二区| 日韩欧美一区二区三区四区| 日韩亚洲欧美一区二区三区| 91麻豆福利| 91精品国产91久久久久久久久| 欧美自拍偷拍第一页| 日韩hd视频在线观看| 精品成在人线av无码免费看| 看黄网站在线| 国产理论片在线观看| 欧美一级片免费在线| 综合一区在线| 国产高清自产拍av在线| 国产美女视频免费看| 91在线直播| 男女啪啪免费观看| ●精品国产综合乱码久久久久| 国产精品videosex性欧美| 97品白浆高清久久久久久| 国产欧美一区二区三区久久| 成人午夜影视| 成人性免费视频| 九色porny丨首页入口在线| 欧美色图亚洲视频| 日本黄色三级大片| 亚洲小说欧美另类激情| 99久久精品国产亚洲| 中文字幕乱码亚洲精品一区| 2021久久国产精品不只是精品| 亚洲综合网站在线观看| 亚洲精品成a人| 日韩一区二区视频在线| 激情综合色播激情啊| 97se视频在线观看| 亚洲春色在线视频| 伊人网av在线| 亚洲精品第二页| 奇米一区二区| 欧美两根一起进3p做受视频| av在线这里只有精品| www.在线成人| 亚洲综合影院| 成人在线观看一区二区| 亚洲综合色噜噜狠狠| 中文网丁香综合网| 操bbb操bbb| 爽好久久久欧美精品| 亚洲最大成人在线视频| 4438x全国最大成人| 成人免费看片载| 国产福利精品视频| 日本精品视频在线观看| 黄色一级大片在线免费看国产一| 天天做天天干天天操| 亚洲影院理伦片| 黄色av免费在线观看| 中文字幕日韩欧美一区二区三区| 成人高清av在线| 同性gay免费| 狂野欧美一区| 亚洲最大的成人网| 91免费版视频| 国产中文在线播放| 在线成人福利| 成年人午夜视频在线观看| 91精品久久久久久蜜臀| 日韩av在线免费看| 在线天堂新版最新版在线8| 99re6在线精品视频免费播放| 欧美91精品久久久久国产性生爱| 成人黄色午夜影院| 你懂的视频一区二区| 极品久久久久久久| 中国极品少妇xxxx| 91香蕉国产视频| 三级在线视频| 国产乱妇乱子| 亚洲欧洲av一区二区三区久久| 亚洲一区二区日韩| 91嫩草国产线观看亚洲一区二区| 日韩三级在线观看视频| 在线观看免费91| 国产午夜亚洲精品理论片色戒| 国产精品视频观看| 99视频在线免费播放| 精品久久久久久无码中文野结衣| 国内成人精品一区| 国产91精品黑色丝袜高跟鞋| 五月天婷婷社区| 国产91久久婷婷一区二区| 久久精品人人做人人爽人人| 国产女主播在线一区二区| 国产 欧美 日本| 99在线精品视频| 99国精产品一二二线| 乱精品一区字幕二区| 欧美成人合集magnet| 成年人午夜免费视频| 国产在线视频综合| 欧美jizz18性欧美| 一区二区三区在线免费看| asian性开放少妇pics| 林ゆな中文字幕一区二区| 狠狠v欧美ⅴ日韩v亚洲v大胸| 亚洲午夜免费| 91精品国产综合久久久久久丝袜| 96sao在线精品免费视频| 欧美丝袜自拍制服另类| 久久亚洲导航| 色呦呦网站一区| 亚洲 欧美 日韩 综合| 伊人久久大香线蕉综合75| 亚洲一区中文字幕在线观看| 国产又大又黄又粗又爽| 宅男噜噜噜66一区二区66| 激情小说激情视频| 欧美在线不卡一区| 欧美理论在线播放| 精品欧美一区二区久久久| 夜夜嗨av一区二区三区| 亚洲成人动漫在线观看| 欧美二区在线视频| 国产三级国产精品国产专区50| 91精品91久久久中77777老牛| 国产精品一卡二卡三卡| 91久久久久久久久| 日韩欧美一区在线观看| 四虎影在永久在线观看| 日韩欧美激情视频| 国产精品欧美性爱| 国产999精品久久| 久久久一区二区三区捆绑**| 三级久久三级久久久| 亚洲色图88| 久久精品一区二区国产| 免费看污片的软件| 美女把尿口扒开让男人桶在线观看| 精品一区二区三区五区六区| 欧美一区二区在线| 丰满熟女人妻一区二区三| 日本中文字幕精品—区二区| 91视频最新地址| 97色婷婷成人综合在线观看| 成视频在线观看免费观看| 久久国产精品久久国产精品| 欧美性少妇18aaaa视频| 久久久久久国产精品三级玉女聊斋| 国产原创中文av| 亚洲精品乱码久久久久久按摩观| 91网站最新网址| 美女欧美视频在线观看免费| 玖玖视频精品| 欧美另类极品| 久久天天综合| 妞干网在线观看视频| 免费一二一二在线视频| 欧美日韩一二三| 日韩精品久久久久久久酒店| 免费在线视频你懂得| 久久国内精品视频| 伊人精品成人久久综合软件| 国产精品福利在线观看播放| 牛牛电影国产一区二区| 日本韩国欧美一区二区三区| 日韩精品中文字幕在线播放| av福利在线观看| 欧美电影完整版在线观看| 97超碰人人模人人人爽人人爱| 亚洲欧美日韩不卡一区二区三区| 久久精品aaaaaa毛片| 精品91福利视频| 亚洲成人tv网| av一区二区在线看| 一区二区不卡视频在线观看| 久久国产精品免费观看| 4438x成人网最大色成网站| 国产三级视频在线播放| jizzjizzjizzjizzjizzjizzjizz| 久久久无码精品亚洲国产| 日韩精品免费在线播放| 999在线免费视频| 黄色特一级视频| 99国产精品免费视频观看| 色94色欧美sute亚洲13| 日本美女一级视频| 98精品在线视频| 亚洲欧美日韩偷拍| 日韩精品中文字幕视频在线| 情趣网站在线观看| av色综合久久天堂av色综合在| 国产精品亚洲片在线播放| 久久久久久久爱| 欧美精品一区二区免费| 波多野结衣久草一区| 亚洲欧美另类一区| 欧美色图亚洲| 天堂网www在线中文天堂| 亚洲高清免费观看| 欧美第一区第二区| 日本不卡免费新一二三区| 成人自拍视频在线| 国产日韩第一页| av二区三区| 日韩高清免费av| 日韩暖暖在线视频| 2020中文字幕在线播放| 一区二区三区精品牛牛|