LOGO OA½Ì³Ì ERP½Ì³Ì Ä£ÇÐ֪ʶ½»Á÷ PMS½Ì³Ì CRM½Ì³Ì ¿ª·¢Îĵµ ÆäËûÎĵµ  
 
ÍøÕ¾¹ÜÀíÔ±

³£ÓÃASPº¯Êý¼¯¡¾¾­Ñé²ÅÊÇ×îÖØÒªµÄ¡¿

admin
2022Äê6ÔÂ27ÈÕ 15:26 ±¾ÎÄÈÈ¶È 503
<%@LANGUAGE="VBscript" CODEPAGE="936"%>
<%
StartTime=timer() '³ÌÐòÖ´ÐÐʱ¼ä¼ì²â

'###############################################################
'----------------- Vibo ASPÕ¾µã¿ª·¢³£Óú¯Êý¿â ------------------
'OpenDB(vdata_url)   -------------------- ´ò¿ªÊý¾Ý¿â
'getIp()  ------------------------------- µÃµ½ÕæʵIP
'getIPAdress(sip)------------------------ ²éÕÒip¶ÔÓ¦µÄÕæʵµØÖ·
'IP2Num(sip) ---------------------------- ÏÞÖÆij¶ÎIPµØÖ·
'chkfrom() ------------------------------ ·ÀÕ¾ÍâÌá½»É趨
'getsys() ------------------------------- ²Ù×÷ϵͳ¼ì²â
'GetBrowser() --------------------------- ä¯ÀÀÆ÷°æ±¾¼ì²â
'GetSearcher() -------------------------- Ê¶±ðËÑË÷ÒýÇæ
'
'---------------------- Êý¾Ý¹ýÂË ¡ý----------------------------
'CheckStr(byVal ChkStr) ----------------- ¼ì²éÎÞЧ×Ö·û
'CheckSql() ----------------------------- ·ÀÖ¹SQL×¢Èë

'UnCheckStr(Str)------------------------- ¼ì²é·Ç·¨sqlÃüÁî
'Checkstr(Str) -------------------------- ASP×îÐÂSQL·À×¢Èë¹ýÂ˺­Êý

'HTMLEncode(reString) ------------------- ¹ýÂËת»»HTML´úÂë
'DateToStr(DateTime,ShowType) ----------- ÈÕÆÚת»»º¯Êý
'Date2Chinese(iDate) -------------------- »ñµÃASPµÄÖÐÎÄÈÕÆÚ×Ö·û´®
'lenStr(str) ---------------------------- ¼ÆËã×Ö·û´®³¤¶È£¨×Ö½Ú£©

'createArr(str) ------------------------- Éú³É¶þάÊý×é
'ShowRsArr(rsArr) ----------------------- Óñí¸ñÏÔʾ¼Ç¼¼¯getrowsÉú³ÉµÄÊý×éµÄ±í½á¹¹

'---------------------- Íâ½Ó×é¼þʹÓú¯Êý¡ý------------------------
'sendMail(to_Email,from_Email,from_Name,mail_Subject,mail_Body,mail_htmlBody) -----'Jmail×é¼þ ·¢ËÍÓʼþ

'-----------------------------------------ϵͳ¼ì²âº¯Êý¡ý------------------------------------------
'IsValidUrl(url) ------------------------ ¼ì²âÍøÒ³ÊÇ·ñÓÐЧ
'getHTMLPage(filename) ------------------ »ñÈ¡ÎļþÄÚÈÝ
'CheckFile(FilePath) -------------------- ¼ì²éijһÎļþÊÇ·ñ´æÔÚ
'CheckDir(FolderPath) ------------------- ¼ì²éijһĿ¼ÊÇ·ñ´æÔÚ
'MakeNewsDir(foldername) ---------------- ¸ù¾ÝÖ¸¶¨Ãû³ÆÉú³ÉĿ¼
'createHTMLPage(filename,FileData,C_mode) Éú³ÉÎļþ

'CheckBadWord(byVal ChkStr) ------------- ¹ýÂËÔà×Ö
'###############################################################

Dim ipData_url
ipData_url="./Ip.mdb"

Response.Write("--------------¿Í»§¶ËÐÅÏ¢¼ì²â------------"&"<br>")
Response.Write(getsys()&"<br>")
Response.Write(GetBrowser()&"<br>")
Response.Write(GetSearcher()&"<br>")
Response.Write("IP:"&getIp()&"<br>")
Response.Write("À´Ô´:"&(getIPAdress(GetIp()))&"<br>")
Response.Write("<br>")

Response.Write("--------------Êý¾ÝÌá½»¼ì²â--------------"&"<br>")
if not chkfrom then
    Response.write("Çë²»Òª´ÓÕ¾ÍâÌá½»ÄÚÈÝ£¡"&"<br>")
    Response.end
else
    Response.write("±¾Õ¾Ìá½»ÄÚÈÝ£¡"&"<br><br>")
End if


function OpenDB(vdata_url)
'------------------------------´ò¿ªÊý¾Ý¿â
'ʹÓÃ:Conn = OpenDB("data/data.mdb")
  Dim vibo_Conn
  Set vibo_Conn= Server.createObject("ADODB.Connection")
  vibo_Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(vdata_url)
  vibo_Conn.Open
  OpenDB=vibo_Conn
End Function

function getIp()
'-----------------------µÃµ½ÕæʵIP
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
getIp=userip
End function

Function getIPAdress(sip)
'---------------------²éÕÒip¶ÔÓ¦µÄÕæʵµØÖ·
Dim iparr,iprs,country,city
If sip="127.0.0.1" then sip= "192.168.0.1"   
iparr=split(sip,".")
sip=cint(iparr(0))*256*256*256+cint(iparr(1))*256*256+cint(iparr(2))*256+cint(iparr(3))-1
Dim vibo_ipconn_STRING
vibo_ipconn_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(ipData_url)
Set iprs = Server.createObject("ADODB.Recordset")
iprs.ActiveConnection = vibo_ipconn_STRING
iprs.Source = "select Top 1 city, country from address where ip1 <=" & sip & " and " & sip & "<=ip2"
iprs.CursorType = 0
iprs.CursorLocation = 2
iprs.LockType = 1
iprs.Open()

If iprs.bof and iprs.eof then
    country="δ֪µØÇø"
    city=""
Else
    country=iprs.Fields.Item("country").Value
    city=iprs.Fields.Item("city").Value
End If
getIPAdress=country&city
iprs.Close()
Set iprs = Nothing
End Function

Function IP2Num(sip)
'--------------------ÏÞÖÆij¶ÎIPµØÖ·
    dim str1,str2,str3,str4
    dim num
    IP2Num=0
    if isnumeric(left(sip,2)) then
        str1=left(sip,instr(sip,".")-1)
        sip=mid(sip,instr(sip,".")+1)
        str2=left(sip,instr(sip,".")-1)
        sip=mid(sip,instr(sip,".")+1)
        str3=left(sip,instr(sip,".")-1)
        str4=mid(sip,instr(sip,".")+1)
        num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
        IP2Num = num
    end if
end function

'userIPnum = IP2Num(Request.ServerVariables("REMOTE_ADDR"))
'if userIPnum > IP2Num("192.168.0.0") and userIPnum < IP2Num("192.168.0.255") then
    'response.write ("<center>ÄúµÄIP±»½ûÖ¹</center>")
    'response.end
'end if


Function chkfrom()
'----------------------------·ÀÕ¾ÍâÌá½»É趨
    Dim server_v1,server_v2, server1, server2
    chkfrom=False
    server1=Cstr(Request.ServerVariables("HTTP_REFERER"))
    server2=Cstr(Request.ServerVariables("SERVER_NAME"))
    If Mid(server1,8,len(server2))=server2 Then chkfrom=True
End Function
'if not chkfrom then
    'Response.write("Çë²»Òª´ÓÕ¾ÍâÌá½»ÄÚÈÝ£¡")
    'Response.end
'End if

function getsys()
'----------------------------------²Ù×÷ϵͳ¼ì²â
vibo_soft=Request.ServerVariables("HTTP_USER_AGENT")
if instr(vibo_soft,"Windows NT 5.0") then
    msm="Win 2000"
elseif instr(vibo_soft,"Windows NT 5.1") then
    msm="Win XP"
elseif instr(vibo_soft,"Windows NT 5.2") then
    msm="Win 2003"
elseif instr(vibo_soft,"4.0") then
    msm="Win NT"
elseif instr(vibo_soft,"NT") then
    msm="Win NT"
elseif instr(vibo_soft,"Windows CE") then
    msm="Windows CE"
elseif instr(vibo_soft,"Windows 9") then
    msm="Win 9x"
elseif instr(vibo_soft,"9x") then
    msm="Windows ME"
elseif instr(vibo_soft,"98") then
    msm="Windows 98"
elseif instr(vibo_soft,"Windows 95") then
    msm="Windows 95"
elseif instr(vibo_soft,"Win32") then
    msm="Win32"
elseif instr(vibo_soft,"unix") or instr(vibo_soft,"linux") or instr(vibo_soft,"SunOS") or instr(vibo_soft,"BSD") then
    msm="ÀàUnix"
elseif instr(vibo_soft,"Mac") then
    msm="Mac"
else
    msm="Other"
end if
getsys=msm
End Function

function GetBrowser()
'----------------------------------ä¯ÀÀÆ÷°æ±¾¼ì²â
dim vibo_soft
vibo_soft=Request.ServerVariables("HTTP_USER_AGENT")
Browser="unknown"
version="unknown"
'vibo_soft="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; .NET CLR 1.1.4322)"    
If Left(vibo_soft,7) ="Mozilla" Then 'Óд˱êʶΪä¯ÀÀÆ÷
            vibo_soft=Split(vibo_soft,";")
            If InStr(vibo_soft(1),"MSIE")>0 Then
                Browser="Microsoft Internet Explorer "
                version=Trim(Left(Replace(vibo_soft(1),"MSIE",""),6))
            ElseIf InStr(vibo_soft(4),"Netscape")>0 Then
                Browser="Netscape "
                tmpstr=Split(vibo_soft(4),"/")
                version=tmpstr(UBound(tmpstr))
            ElseIf InStr(vibo_soft(4),"rv:")>0 Then
                Browser="Mozilla "
                tmpstr=Split(vibo_soft(4),":")
                version=tmpstr(UBound(tmpstr))
                If InStr(version,")") > 0 Then
                    tmpstr=Split(version,")")
                    version=tmpstr(0)
                End If
            End If
ElseIf Left(vibo_soft,5) ="Opera" Then
            vibo_soft=Split(vibo_soft,"/")
            Browser="Mozilla "
            tmpstr=Split(vibo_soft(1)," ")
            version=tmpstr(0)
End If
If version<>"unknown" Then
            Dim Tmpstr1
            Tmpstr1=Trim(Replace(version,".",""))
            If Not IsNumeric(Tmpstr1) Then
                version="unknown"
            End If
End If
GetBrowser=Browser &" "& version
End function

function GetSearcher()
'----------------------ʶ±ðËÑË÷ÒýÇæ
Dim botlist,Searcher
Dim vibo_soft
vibo_soft=Request.ServerVariables("HTTP_USER_AGENT")
Botlist="Google,Isaac,SurveyBot,Baiduspider,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir,TencentTraveler"
Botlist=split(Botlist,",")
  For i=0 to UBound(Botlist)
    If InStr(vibo_soft,Botlist(i))>0  Then
      Searcher=Botlist(i)&" ËÑË÷Æ÷"
      IsSearch=True
      Exit For
    End If
  Next
If IsSearch Then
  GetSearcher=Searcher
else
  GetSearcher="unknown"
End if
End function


'----------------------------------Êý¾Ý¹ýÂË ¡ý---------------------------------------
Function CheckSql() '·ÀÖ¹SQL×¢Èë
    Dim sql_injdata  
    SQL_injdata = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
    SQL_inj = split(SQL_Injdata,"|")
    If Request.QueryString<>"" Then
        For Each SQL_Get In Request.QueryString
            For SQL_Data=0 To Ubound(SQL_inj)
                if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
                    Response.Write "<script Language='javascript'>{alert('Çë²»ÒªÔÚ²ÎÊýÖаüº¬·Ç·¨×Ö·û£¡');history.back(-1)}< /script>"
                    Response.end
                end if
            next
        Next
    End If
    If Request.Form<>"" Then
        For Each Sql_Post In Request.Form
            For SQL_Data=0 To Ubound(SQL_inj)
                if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
                    Response.Write "<script Language='javascript'>{alert('Çë²»ÒªÔÚ²ÎÊýÖаüº¬·Ç·¨×Ö·û£¡');history.back(-1)}     </script>"
                    Response.end
                end if
            next
        next
    end if
End Function

Function CheckStr(byVal ChkStr) '¼ì²éÎÞЧ×Ö·û
    Dim Str:Str=ChkStr
    Str=Trim(Str)
    If IsNull(Str) Then
        CheckStr = ""
        Exit Function
    End If
    Dim re
    Set re=new RegExp
    re.IgnoreCase =True
    re.Global=True
    re.Pattern="(\r\n){3,}"
    Str=re.Replace(Str,"$1$1$1")
    Set re=Nothing
    Str = Replace(Str,"'","''")
    Str = Replace(Str, "select", "select")
    Str = Replace(Str, "join", "join")
    Str = Replace(Str, "union", "union")
    Str = Replace(Str, "where", "where")
    Str = Replace(Str, "insert", "insert")
    Str = Replace(Str, "delete", "delete")
    Str = Replace(Str, "update", "update")
    Str = Replace(Str, "like", "like")
    Str = Replace(Str, "drop", "drop")
    Str = Replace(Str, "create", "create")
    Str = Replace(Str, "modify", "modify")
    Str = Replace(Str, "rename", "rename")
    Str = Replace(Str, "alter", "alter")
    Str = Replace(Str, "cast", "cast")
    CheckStr=Str
End Function

Function UnCheckStr(Str) '¼ì²é·Ç·¨sqlÃüÁî
        Str = Replace(Str, "select", "select")
        Str = Replace(Str, "join", "join")
        Str = Replace(Str, "union", "union")
        Str = Replace(Str, "where", "where")
        Str = Replace(Str, "insert", "insert")
        Str = Replace(Str, "delete", "delete")
        Str = Replace(Str, "update", "update")
        Str = Replace(Str, "like", "like")
        Str = Replace(Str, "drop", "drop")
        Str = Replace(Str, "create", "create")
        Str = Replace(Str, "modify", "modify")
        Str = Replace(Str, "rename", "rename")
        Str = Replace(Str, "alter", "alter")
        Str = Replace(Str, "cast", "cast")
        UnCheckStr=Str
End Function

Function Checkstr(Str) 'SQL·À×¢Èë¹ýÂ˺­Êý
    If Isnull(Str) Then
    CheckStr = ""
    Exit Function
    End If
    Str = Replace(Str,Chr(0),"", 1, -1, 1)
    Str = Replace(Str, """", """", 1, -1, 1)
    Str = Replace(Str,"<","<", 1, -1, 1)
    Str = Replace(Str,">",">", 1, -1, 1)
    Str = Replace(Str, "script", "script", 1, -1, 0)
    Str = Replace(Str, "script", "script", 1, -1, 0)
    Str = Replace(Str, "script", "script", 1, -1, 0)
    Str = Replace(Str, "script", "script", 1, -1, 1)
    Str = Replace(Str, "object", "object", 1, -1, 0)
    Str = Replace(Str, "OBJECT", "OBJECT", 1, -1, 0)
    Str = Replace(Str, "Object", "Object", 1, -1, 0)
    Str = Replace(Str, "object", "Object", 1, -1, 1)
    Str = Replace(Str, "applet", "applet", 1, -1, 0)
    Str = Replace(Str, "APPLET", "APPLET", 1, -1, 0)
    Str = Replace(Str, "Applet", "Applet", 1, -1, 0)
    Str = Replace(Str, "applet", "Applet", 1, -1, 1)
    Str = Replace(Str, "[", "[")
    Str = Replace(Str, "]", "]")
    Str = Replace(Str, """", "", 1, -1, 1)
    Str = Replace(Str, "=", "=", 1, -1, 1)
    Str = Replace(Str, "'", "''", 1, -1, 1)
    Str = Replace(Str, "select", "select", 1, -1, 1)
    Str = Replace(Str, "execute", "execute", 1, -1, 1)
    Str = Replace(Str, "exec", "exec", 1, -1, 1)
    Str = Replace(Str, "join", "join", 1, -1, 1)
    Str = Replace(Str, "union", "union", 1, -1, 1)
    Str = Replace(Str, "where", "where", 1, -1, 1)
    Str = Replace(Str, "insert", "insert", 1, -1, 1)
    Str = Replace(Str, "delete", "delete", 1, -1, 1)
    Str = Replace(Str, "update", "update", 1, -1, 1)
    Str = Replace(Str, "like", "like", 1, -1, 1)
    Str = Replace(Str, "drop", "drop", 1, -1, 1)
    Str = Replace(Str, "create", "create", 1, -1, 1)
    Str = Replace(Str, "rename", "rename", 1, -1, 1)
    Str = Replace(Str, "count", "count", 1, -1, 1)
    Str = Replace(Str, "chr", "chr", 1, -1, 1)
    Str = Replace(Str, "mid", "mid", 1, -1, 1)
    Str = Replace(Str, "truncate", "truncate", 1, -1, 1)
    Str = Replace(Str, "nchar", "nchar", 1, -1, 1)
    Str = Replace(Str, "char", "char", 1, -1, 1)
    Str = Replace(Str, "alter", "alter", 1, -1, 1)
    Str = Replace(Str, "cast", "cast", 1, -1, 1)
    Str = Replace(Str, "exists", "exists", 1, -1, 1)
    Str = Replace(Str,Chr(13),"<br>", 1, -1, 1)
    CheckStr = Replace(Str,"'","''", 1, -1, 1)
End Function

Function HTMLEncode(reString) '¹ýÂËת»»HTML´úÂë
    Dim Str:Str=reString
    If Not IsNull(Str) Then
        Str = UnCheckStr(Str)
        Str = Replace(Str, "&", "&")
        Str = Replace(Str, ">", ">")
        Str = Replace(Str, "<", "<")
        Str = Replace(Str, CHR(32), " ")
        Str = Replace(Str, CHR(9), "    ")
        Str = Replace(Str, CHR(9), "    ")
        Str = Replace(Str, CHR(34),""")
        Str = Replace(Str, CHR(39),"'")
        Str = Replace(Str, CHR(13), "")
        Str = Replace(Str, CHR(10), "<br>")
        HTMLEncode = Str
    End If
End Function

Function DateToStr(DateTime,ShowType)  'ÈÕÆÚת»»º¯Êý
    Dim DateMonth,DateDay,DateHour,DateMinute
    DateMonth=Month(DateTime)
    DateDay=Day(DateTime)
    DateHour=Hour(DateTime)
    DateMinute=Minute(DateTime)
    If Len(DateMonth)<2 Then DateMonth="0"&DateMonth
    If Len(DateDay)<2 Then DateDay="0"&DateDay
    select Case ShowType
    Case "Y-m-d"  
        DateToStr=Year(DateTime)&"-"&DateMonth&"-"&DateDay
    Case "Y-m-d H:I A"
        Dim DateAMPM
        If DateHour>12 Then
            DateHour=DateHour-12
            DateAMPM="PM"
        Else
            DateHour=DateHour
            DateAMPM="AM"
        End If
        If Len(DateHour)<2 Then DateHour="0"&DateHour    
        If Len(DateMinute)<2 Then DateMinute="0"&DateMinute
        DateToStr=Year(DateTime)&"-"&DateMonth&"-"&DateDay&" "&DateHour&":"&DateMinute&" "&DateAMPM
    Case "Y-m-d H:I:S"
        Dim DateSecond
        DateSecond=Second(DateTime)
        If Len(DateHour)<2 Then DateHour="0"&DateHour    
        If Len(DateMinute)<2 Then DateMinute="0"&DateMinute
        If Len(DateSecond)<2 Then DateSecond="0"&DateSecond
        DateToStr=Year(DateTime)&"-"&DateMonth&"-"&DateDay&" "&DateHour&":"&DateMinute&":"&DateSecond
    Case "YmdHIS"
        DateSecond=Second(DateTime)
        If Len(DateHour)<2 Then DateHour="0"&DateHour    
        If Len(DateMinute)<2 Then DateMinute="0"&DateMinute
        If Len(DateSecond)<2 Then DateSecond="0"&DateSecond
        DateToStr=Year(DateTime)&DateMonth&DateDay&DateHour&DateMinute&DateSecond    
    Case "ym"
        DateToStr=Right(Year(DateTime),2)&DateMonth
    Case "d"
        DateToStr=DateDay
    Case Else
        If Len(DateHour)<2 Then DateHour="0"&DateHour
        If Len(DateMinute)<2 Then DateMinute="0"&DateMinute
        DateToStr=Year(DateTime)&"-"&DateMonth&"-"&DateDay&" "&DateHour&":"&DateMinute
    End select
End Function

Function Date2Chinese(iDate) '»ñµÃASPµÄÖÐÎÄÈÕÆÚ×Ö·û´®
¡¡ ¡¡ Dim num(10)
¡¡ ¡¡ Dim iYear
¡¡ ¡¡ Dim iMonth
¡¡ ¡¡ Dim iDay
¡¡ ¡¡ num(0) = "©–"
¡¡ ¡¡ num(1) = "Ò»"
¡¡ ¡¡ num(2) = "¶þ"
¡¡ ¡¡ num(3) = "Èý"
¡¡ ¡¡ num(4) = "ËÄ"
¡¡ ¡¡ num(5) = "Îå"
¡¡ ¡¡ num(6) = "Áù"
¡¡ ¡¡ num(7) = "Æß"
¡¡ ¡¡ num(8) = "°Ë"
¡¡ ¡¡ num(9) = "¾Å"
¡¡ ¡¡ iYear = Year(iDate)
¡¡ ¡¡ iMonth = Month(iDate)
¡¡ ¡¡ iDay = Day(iDate)
¡¡ ¡¡ Date2Chinese = num(iYear \ 1000) + num((iYear \ 100) Mod 10) + num((iYear\ 10) Mod 10) + num(iYear Mod 10) + "Äê"
¡¡ ¡¡ If iMonth >= 10 Then
¡¡ ¡¡ ¡¡ ¡¡ If iMonth = 10 Then
¡¡ ¡¡ ¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + "Ê®" + "ÔÂ"
¡¡ ¡¡ ¡¡ ¡¡ Else
¡¡ ¡¡ ¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + "Ê®" + num(iMonth Mod 10) + "ÔÂ"
¡¡ ¡¡ ¡¡ ¡¡ End If
¡¡ ¡¡ Else
¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + num(iMonth Mod 10) + "ÔÂ"
¡¡ ¡¡ End If
¡¡ ¡¡ If iDay >= 10 Then
¡¡ ¡¡ ¡¡ ¡¡ If iDay = 10 Then
¡¡ ¡¡ ¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese +"Ê®" + "ÈÕ"
¡¡ ¡¡ ¡¡ ¡¡ ElseIf iDay = 20 or iDay = 30 Then
¡¡ ¡¡ ¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + num(iDay \ 10) + "Ê®" + "ÈÕ"
¡¡ ¡¡ ¡¡ ¡¡ ElseIf iDay > 20 Then
¡¡ ¡¡ ¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + num(iDay \ 10) + "Ê®" +num(iDay Mod 10) + "ÈÕ"
¡¡ ¡¡ ¡¡ ¡¡ Else
¡¡ ¡¡¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + "Ê®" + num(iDay Mod 10) + "ÈÕ"
¡¡ ¡¡ ¡¡ ¡¡ End If
¡¡ ¡¡ Else
¡¡ ¡¡ ¡¡ ¡¡ Date2Chinese = Date2Chinese + num(iDay Mod 10) + "ÈÕ"
¡¡ ¡¡ End If
End Function

Function lenStr(str)'¼ÆËã×Ö·û´®³¤¶È£¨×Ö½Ú£©
    dim l,t,c
    dim i
    l=len(str)
    t=0
for i=1 to l
    c=asc(mid(str,i,1))
    if c<0 then c=c+65536
    if c<255 then t=t+1
    if c>255 then t=t+2
next
   lenstr=t
End Function

Function createArr(str) 'Éú³É¶þάÊý×é Êý¾ÝÈ磺"1,a1,b1,c1,d1|2,a2,b2,c2,d2|5,a3,b3,c3,d3|8,a4,b4,c4,d4"
dim arr()
str=split(str,"|")
for i=0 to UBound(str)
    arrstr=split(str(i),",")
    for j=0 to Ubound(arrstr)
        ReDim Preserve arr(UBound(str),UBound(arrstr))
        arr(i,j)=arrstr(j)
    next
next
createArr=arr
End Function

Function ShowRsArr(rsArr) 'Óñí¸ñÏÔʾ¼Ç¼¼¯getrowsÉú³ÉµÄÊý×éµÄ±í½á¹¹
showHtml="<table width=100% border=1 cellspacing=0 cellpadding=0>"
    If Not IsEmpty(rsArr) Then
        For y=0 To Ubound(rsArr,2)
        showHtml=showHtml&"<tr>"
            for x=0 to Ubound(rsArr,1)
                showHtml=showHtml& "<td>"&rsArr(x,y)&"</td>"
            next
        showHtml=showHtml&"</tr>"
        next
    Else
        RshowHtml=showHtml&"<tr>"
        showHtml=showHtml&"<td>No Records</td>"
        showHtml=showHtml&"</tr>"
    End If
        showHtml=showHtml&"</table>"
    ShowRsArr=showHtml
End Function


'-----------------------------------------Íâ½Ó×é¼þʹÓú¯Êý¡ý------------------------------------------

Function sendMail(to_Email,from_Email,from_Name,mail_Subject,mail_Body,mail_htmlBody) 'Jmail ·¢ËÍÓʼþ
  Set vibo_mail = Server.createObject("JMAIL.Message")    '½¨Á¢·¢ËÍÓʼþµÄ¶ÔÏó
  vibo_mail.silent = true                                 'ÆÁ±ÎÀýÍâ´íÎ󣬷µ»ØFALSE¸úTRUEÁ½Öµj
  vibo_mail.logging = true                                'ÆôÓÃÓʼþÈÕÖ¾
  vibo_mail.Charset = "gb2312"                            'ÓʼþµÄÎÄ×Ö±àÂëΪ¹ú±ê

  'vibo_mail.ContentType = "text/html"                     'ÓʼþµÄ¸ñʽΪHTML¸ñʽ
  'vibo_mail.Prority = 1                                   'ÓʼþµÄ½ô¼±³ÌÐò£¬1 Îª×î¿ì£¬5 Îª×îÂý£¬ 3 ÎªÄ¬ÈÏÖµ

  vibo_mail.AddRecipient to_Email                         'ÓʼþÊÕ¼þÈ˵ĵØÖ·
  vibo_mail.from = from_Email                             '·¢¼þÈ˵ÄE-MAILµØÖ·
  vibo_mail.fromName = from_Name                          '·¢¼þÈËÐÕÃû
  vibo_mail.MailServerUserName = "system@aaa.com"       'µÇ¼Óʼþ·þÎñÆ÷ËùÐèµÄÓû§Ãû
  vibo_mail.MailServerPassword = "asdasd"     'µÇ¼Óʼþ·þÎñÆ÷ËùÐèµÄÃÜÂë
  vibo_mail.Subject = mail_Subject                        'ÓʼþµÄ±êÌâ
  vibo_mail.Body = mail_Body                              'ÕýÎÄ
  vibo_mail.HTMLBody = mail_htmlBody                      'HTMLÕýÎÄ
  vibo_mail.ReturnReceipt = True
  vibo_mail.Send("smtp.263xmail.com")                     'Ö´ÐÐÓʼþ·¢ËÍ£¨Í¨¹ýÓʼþ·þÎñÆ÷µØÖ·£©
  vibo_mail.Close()
  set vibo_mail=nothing
End Function

'---------------------------------------³ÌÐòÖ´ÐÐʱ¼ä¼ì²â¡ý----------------------------------------------
EndTime=Timer()
If EndTime<StartTime Then
    EndTime=EndTime+24*3600
End if
runTime=(EndTime-StartTime)*1000
Response.Write("------------³ÌÐòÖ´ÐÐʱ¼ä¼ì²â------------"&"<br>")
Response.Write("³ÌÐòÖ´ÐÐʱ¼ä"&runTime&"ºÁÃë")


'-----------------------------------------ϵͳ¼ì²âʹÓú¯Êý¡ý------------------------------------------
'---------------------¼ì²âÍøÒ³ÊÇ·ñÓÐЧ-----------------------
Function IsValidUrl(url)
        Set xl = Server.createObject("Microsoft.XMLHTTP")
        xl.Open "HEAD",url,False
        xl.Send
        IsValidUrl = (xl.status=200)
End Function
'If IsValidUrl(""&fileurl&"") Then
'    response.redirect fileurl
'Else
'    Response.Write "ÓÉÓÚÏÂÔØÓû§¹ý¶à,³ÌÐò¼ì²âµ½ÎļþÔÝʱÎÞ·¨ÏÂÔØ,Çë¸ü»»ÆäËûÏÂÔصØÖ·!¸ÐлÄú¶Ô±¾Èí¼þÍøÕ¾µÄÖ§³ÖŶ^_^"
'End If

'------------------¼ì²éijһĿ¼ÊÇ·ñ´æÔÚ-------------------
Function getHTMLPage(filename) '»ñÈ¡ÎļþÄÚÈÝ
    Dim fso,file
    Set fso = Server.createObject("scripting.FileSystemObject")
    Set File=fso.OpenTextFile(server.mappath(filename))
    showHtml=File.ReadAll
    File.close
    Set File=nothing
    Set fso=nothing
    getHTMLPage=showHtml 'Êä³ö
End function

Function CheckDir(FolderPath)
    dim fso
    folderpath=Server.MapPath(".")&"\"&folderpath
    Set fso = Server.createObject("scripting.FileSystemObject")
    If fso.FolderExists(FolderPath) then
    '´æÔÚ
        CheckDir = True
    Else
    '²»´æÔÚ
        CheckDir = False
    End if
    Set fso = nothing
End Function

Function CheckFile(FilePath) '¼ì²éijһÎļþÊÇ·ñ´æÔÚ
    Dim fso
    Filepath=Server.MapPath(FilePath)
    Set fso = Server.createObject("scripting.FileSystemObject")
    If fso.FileExists(FilePath) then
    '´æÔÚ
        CheckFile = True
    Else
    '²»´æÔÚ
        CheckFile = False
    End if
    Set fso = nothing
End Function

'-------------¸ù¾ÝÖ¸¶¨Ãû³ÆÉú³ÉĿ¼---------
Function MakeNewsDir(foldername)
    dim fso,f
    Set fso = Server.createObject("scripting.FileSystemObject")
    Set f = fso.createFolder(foldername)
    MakeNewsDir = True
    Set fso = nothing
End Function

Function createHTMLPage(filename,FileData,C_mode) 'Éú³ÉÎļþ
    if C_mode=0 then 'ʹÓÃFSOÉú³É
        Dim fso,txt
        Set fso = createObject("scripting.FileSystemObject")
        Filepath=Server.MapPath(filename)
        if CheckFile(filename) then fso.deleteFile Filepath,True '·ÀÖ¹Ðøд
        Set txt=fso.OpenTextFile(Filepath,8,True)  
        txt.Write FileData
        txt.Close
        Set fso = nothing
    elseif C_mode=1 then 'ʹÓÃStreamÉú³É
        Dim viboStream
        On Error Resume Next
        Set viboStream = Server.createObject("ADODB.Stream")
        If Err.Number=-2147221005 Then
            Response.Write "<div align='center' style=""font-family:Tahoma;"">·Ç³£Òź¶,ÄúµÄÖ÷»ú²»Ö§³Ö ADODB.Stream,²»ÄÜʹÓñ¾³ÌÐò</div>"
            Err.Clear
            Response.End
        End If
        With viboStream
        .Type = 2
        .Open
        .CharSet = "GB2312"
        .Position = objStream.Size
        .WriteText = FileData
        .SaveToFile Server.MapPath(filename),2
        .Close
        End With
        Set viboStream = Nothing    
    end if
    Response.Write "<div align='center' style=""font-family:Tahoma;"">¹§Ï²!Îļþ <a href="""&filename&""" target=""_blank"" style=""font-weight: bold;color: #FF0000;"">"&filename&"</a> ÒѾ­Éú³ÉÍê±Ï!...</div>"
    Response.Flush()
End Function

Function CheckBadWord(byVal ChkStr)'¹ýÂËÔà×Ö
    Dim Str:Str = ChkStr
    Str = Trim(Str)
    If IsNull(Str) Then
        CheckBadWord = ""
        Exit Function
    End If
    DIC = getHTMLPage("include/badWord.txt")'ÔØÈëÔà×ִʵä
    DICArr = split(DIC,CHR(10))
    For i  =0 To Ubound(DICArr )
        WordDIC = split(DICArr(i),"=")
        Str = Replace(Str,WordDIC(0),WordDIC(1))
    next
    CheckBadWord = Str
End function
%>

¸ÃÎÄÕÂÔÚ 2022/6/27 15:26:37 ±à¼­¹ý
¹Ø¼ü×Ö²éѯ
Ïà¹ØÎÄÕÂ
ÕýÔÚ²éѯ...
µãÇçERPÊÇÒ»¿îÕë¶ÔÖÐСÖÆÔìÒµµÄרҵÉú²ú¹ÜÀíÈí¼þϵͳ,ϵͳ³ÉÊì¶ÈºÍÒ×ÓÃÐԵõ½Á˹úÄÚ´óÁ¿ÖÐСÆóÒµµÄÇàíù¡£
µãÇçPMSÂëÍ·¹ÜÀíϵͳÖ÷ÒªÕë¶Ô¸Û¿ÚÂëÍ·¼¯×°ÏäÓëÉ¢»õÈÕ³£ÔË×÷¡¢µ÷¶È¡¢¶Ñ³¡¡¢³µ¶Ó¡¢²ÆÎñ·ÑÓá¢Ïà¹Ø±¨±íµÈÒµÎñ¹ÜÀí£¬½áºÏÂëÍ·µÄÒµÎñÌص㣬ΧÈƵ÷¶È¡¢¶Ñ³¡×÷Òµ¶ø¿ª·¢µÄ¡£¼¯¼¼ÊõµÄÏȽøÐÔ¡¢¹ÜÀíµÄÓÐЧÐÔÓÚÒ»Ì壬ÊÇÎïÁ÷ÂëÍ·¼°ÆäËû¸Û¿ÚÀàÆóÒµµÄ¸ßЧERP¹ÜÀíÐÅϢϵͳ¡£
µãÇçWMS²Ö´¢¹ÜÀíϵͳÌṩÁË»õÎï²úÆ·¹ÜÀí,ÏúÊÛ¹ÜÀí,²É¹º¹ÜÀí,²Ö´¢¹ÜÀí,²Ö¿â¹ÜÀí,±£ÖÊÆÚ¹ÜÀí,»õλ¹ÜÀí,¿âλ¹ÜÀí,Éú²ú¹ÜÀí,WMS¹ÜÀíϵͳ,±êÇ©´òÓ¡,ÌõÐÎÂë,¶þάÂë¹ÜÀí,ÅúºÅ¹ÜÀíÈí¼þ¡£
µãÇçÃâ·ÑOAÊÇÒ»¿îÈí¼þºÍͨÓ÷þÎñ¶¼Ãâ·Ñ£¬²»ÏÞ¹¦ÄÜ¡¢²»ÏÞʱ¼ä¡¢²»ÏÞÓû§µÄÃâ·ÑOAЭͬ°ì¹«¹ÜÀíϵͳ¡£
Copyright 2010-2024 ClickSun All Rights Reserved