亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vbcgi.bas

?? 編寫VB CGI程序所必須的模塊。
?? BAS
?? 第 1 頁 / 共 3 頁
字號:
Attribute VB_Name = "Module1"
'----------------------------------------------------------------------
'       *************
'       * CGI32.BAS *
'       *************
'
' VERSION: 1.5  (November 20, 1995)
'
' AUTHOR:  Robert B. Denny <rdenny@netcom.com>
'
' Common routines needed to establish a VB environment for
' Windows CGI programs that run behind the WebSite Server.
'
' INTRODUCTION
'
' The Common Gateway Interface (CGI) version 1.1 specifies a minimal
' set of data that is made available to the back-end application by
' an HTTP (Web) server. It also specifies the details for passing this
' information to the back-end. The latter part of the CGI spec is
' specific to Unix-like environments. The NCSA httpd for Windows does
' supply the data items (and more) specified by CGI/1.1, however it
' uses a different method for passing the data to the back-end.
'
' DEVELOPMENT
'
' WebSite requires any Windows back-end program to be an
' executable image. This means that you must convert your VB
' application into an executable (.EXE) before it can be tested
' with the server.
'
' ENVIRONMENT
'
' The WebSite server executes script requests by doing a
' CreateProcess with a command line in the following form:
'
'   prog-name cgi-profile
'
' THE CGI PROFILE FILE
'
' The Unix CGI passes data to the back end by defining environment
' variables which can be used by shell scripts. The WebSite
'---------------------------------------------------------------------------
'
'   InitializeCGI() - Fill in all of the CGI variables, etc.
'
' Read the profile file name from the command line, then fill in
' the CGI globals, the Accept type list and the Extra headers list.
' Then open the input and output files.
'
' Returns True if OK, False if some sort of error. See ReturnError()
' for info on how errors are handled.
'
' NOTE: Assumes that the CGI error handler has been armed with On Error
'---------------------------------------------------------------------------
Sub InitializeCGI()
    Dim sect As String
    Dim argc As Integer
    Static argv(MAX_CMDARGS) As String
    Dim buf As String

    CGI_DebugMode = True    ' Initialization errors are very bad

    '
    ' Parse the command line. We need the profile file name (duh!)
    ' and the output file name NOW, so we can return any errors we
    ' trap. The error handler writes to the output file.
    '
    argc = GetArgs(argv())
    CGI_ProfileFile = argv(0)

    sect = "CGI"
    CGI_ServerSoftware = GetProfile(sect, "Server Software")
    CGI_ServerName = GetProfile(sect, "Server Name")
    CGI_RequestProtocol = GetProfile(sect, "Request Protocol")
    CGI_ServerAdmin = GetProfile(sect, "Server Admin")
    CGI_Version = GetProfile(sect, "CGI Version")
    CGI_RequestMethod = GetProfile(sect, "Request Method")
    buf = GetProfile(sect, "Request Keep-Alive")    ' Y or N
    If (Left$(buf, 1) = "Y") Then                   ' Must start with Y
        CGI_RequestKeepAlive = True
    Else
        CGI_RequestKeepAlive = False
    End If
    CGI_LogicalPath = GetProfile(sect, "Logical Path")
    CGI_PhysicalPath = GetProfile(sect, "Physical Path")
    CGI_ExecutablePath = GetProfile(sect, "Executable Path")
    CGI_QueryString = GetProfile(sect, "Query String")
    CGI_RemoteHost = GetProfile(sect, "Remote Host")
    CGI_RemoteAddr = GetProfile(sect, "Remote Address")
    CGI_Referer = GetProfile(sect, "Referer")
    CGI_From = GetProfile(sect, "From")
    CGI_AuthUser = GetProfile(sect, "Authenticated Username")
    CGI_AuthPass = GetProfile(sect, "Authenticated Password")
    CGI_AuthRealm = GetProfile(sect, "Authentication Realm")
    CGI_AuthType = GetProfile(sect, "Authentication Method")
    CGI_ContentType = GetProfile(sect, "Content Type")
    buf = GetProfile(sect, "Content Length")
    If buf = "" Then
        CGI_ContentLength = 0
    Else
        CGI_ContentLength = CLng(buf)
    End If
    buf = GetProfile(sect, "Server Port")
    If buf = "" Then
        CGI_ServerPort = -1
    Else
        CGI_ServerPort = CInt(buf)
    End If

    sect = "System"
    CGI_ContentFile = GetProfile(sect, "Content File")
    CGI_OutputFile = GetProfile(sect, "Output File")
    CGI_OutputFN = FreeFile
    Open CGI_OutputFile For Output Access Write As #CGI_OutputFN
    buf = GetProfile(sect, "GMT Offset")
    If buf <> "" Then                             ' Protect against errors
        CGI_GMTOffset = CVDate(Val(buf) / 86400#) ' Timeserial GMT offset
    Else
        CGI_GMTOffset = 0
    End If
    buf = GetProfile(sect, "Debug Mode")    ' Y or N
    If (Left$(buf, 1) = "Y") Then           ' Must start with Y
        CGI_DebugMode = True
    Else
        CGI_DebugMode = False
    End If

    GetAcceptTypes          ' Enumerate Accept: types into tuples
    GetExtraHeaders         ' Enumerate extra headers into tuples
    GetFormTuples           ' Decode any POST form input into tuples

End Sub

'----------------------------------------------------------------------
'
' Get the value of a "small" form field given the key
'
' Signals an error if field does not exist
'
'----------------------------------------------------------------------
Function GetSmallField(key As String) As String
    Dim i As Integer

    For i = 0 To (CGI_NumFormTuples - 1)
        If CGI_FormTuples(i).key = key Then
            GetSmallField = Trim$(CGI_FormTuples(i).value)
            Exit Function           ' ** DONE **
        End If
    Next i
    '
    ' Field does not exist
    '
    Error ERR_NO_FIELD
End Function

'---------------------------------------------------------------------------
'
'   GetProfile() - Get a value or enumerate keys in CGI_Profile file
'
' Get a value given the section and key, or enumerate keys given the
' section name and "" for the key. If enumerating, the list of keys for
' the given section is returned as a null-separated string, with a
' double null at the end.
'
' VB handles this with flair! I couldn't believe my eyes when I tried this.
'---------------------------------------------------------------------------
Private Function GetProfile(sSection As String, sKey As String) As String
    Dim retLen As Long
    Dim buf As String * ENUM_BUF_SIZE

    If sKey <> "" Then
        retLen = GetPrivateProfileString(sSection, sKey, "", buf, ENUM_BUF_SIZE, CGI_ProfileFile)
    Else
        retLen = GetPrivateProfileString(sSection, 0&, "", buf, ENUM_BUF_SIZE, CGI_ProfileFile)
    End If
    If retLen = 0 Then
        GetProfile = ""
    Else
        GetProfile = Left$(buf, retLen)
    End If

End Function

'---------------------------------------------------------------------------
'
'   GetFormTuples() - Create the array of POST form input key=value pairs
'
'---------------------------------------------------------------------------
Private Sub GetFormTuples()
    Dim sList As String
    Dim i As Integer, j As Integer, k As Integer
    Dim l As Integer, m As Integer, n As Integer
    Dim s As Long
    Dim buf As String
    Dim extName As String
    Dim extFile As Integer
    Dim extlen As Long

    n = 0                                   ' Index in array

    '
    ' Do the easy one first: [Form Literal]
    '
    sList = GetProfile("Form Literal", "")  ' Get key list
    l = Len(sList)                          ' Length incl. trailing null
    i = 1                                   ' Start at 1st character
    Do While ((i < l) And (n < MAX_FORM_TUPLES)) ' Safety stop here
        j = InStr(i, sList, Chr$(0))        ' J -> next null
        CGI_FormTuples(n).key = Mid$(sList, i, j - i) ' Get Key, then value
        CGI_FormTuples(n).value = GetProfile("Form Literal", CGI_FormTuples(n).key)
        i = j + 1                           ' Bump pointer
        n = n + 1                           ' Bump array index
    Loop
    '
    ' Now do the external ones: [Form External]
    '
    sList = GetProfile("Form External", "") ' Get key list
    l = Len(sList)                          ' Length incl. trailing null
    i = 1                                   ' Start at 1st character
    extFile = FreeFile
    Do While ((i < l) And (n < MAX_FORM_TUPLES)) ' Safety stop here
        j = InStr(i, sList, Chr$(0))        ' J -> next null
        CGI_FormTuples(n).key = Mid$(sList, i, j - i) ' Get Key, then pathname
        buf = GetProfile("Form External", CGI_FormTuples(n).key)
        k = InStr(buf, " ")                 ' Split file & length
        extName = Mid$(buf, 1, k - 1)           ' Pathname
        k = k + 1
        extlen = CLng(Mid$(buf, k, Len(buf) - k + 1)) ' Length
        '
        ' Use feature of GET to read content in one call
        '
        Open extName For Binary Access Read As #extFile
        CGI_FormTuples(n).value = String$(extlen, " ") ' Breathe in...
        Get #extFile, , CGI_FormTuples(n).value 'GULP!
        Close #extFile
        i = j + 1                           ' Bump pointer
        n = n + 1                           ' Bump array index
    Loop

    CGI_NumFormTuples = n                   ' Number of fields decoded
    n = 0                                   ' Reset counter
    '
    ' Next, the [Form Huge] section. Will this ever get executed?
    '
    sList = GetProfile("Form Huge", "")     ' Get key list
    l = Len(sList)                          ' Length incl. trailing null
    i = 1                                   ' Start at 1st character
    Do While ((i < l) And (n < MAX_FORM_TUPLES)) ' Safety stop here
        j = InStr(i, sList, Chr$(0))        ' J -> next null
        CGI_HugeTuples(n).key = Mid$(sList, i, j - i) ' Get Key
        buf = GetProfile("Form Huge", CGI_HugeTuples(n).key) ' "offset length"
        k = InStr(buf, " ")                 ' Delimiter
        CGI_HugeTuples(n).offset = CLng(Mid$(buf, 1, (k - 1)))
        CGI_HugeTuples(n).length = CLng(Mid$(buf, k, (Len(buf) - k + 1)))
        i = j + 1                           ' Bump pointer
        n = n + 1                           ' Bump array index
    Loop
    
    CGI_NumHugeTuples = n                   ' Fill in global count

    n = 0                                   ' Reset counter
    '
    ' Finally, the [Form File] section.
    '
    sList = GetProfile("Form File", "")     ' Get key list
    l = Len(sList)                          ' Length incl. trailing null
    i = 1                                   ' Start at 1st character
    Do While ((i < l) And (n < MAX_FILE_TUPLES)) ' Safety stop here
        j = InStr(i, sList, Chr$(0))        ' J -> next null
        CGI_FileTuples(n).key = Mid$(sList, i, j - i) ' Get Key
        buf = GetProfile("Form File", CGI_FileTuples(n).key)
        ParseFileValue buf, CGI_FileTuples(n)  ' Complicated, use Sub
        i = j + 1                           ' Bump pointer
        n = n + 1                           ' Bump array index
    Loop
    
    CGI_NumFileTuples = n                   ' Fill in global count

End Sub

'---------------------------------------------------------------------------
'
'   GetExtraHeaders() - Create the array of extra header structs
'
' Enumerate the keys in the [Extra Headers] section of the profile file,
' then get the value for each of the keys.
'---------------------------------------------------------------------------
Private Sub GetExtraHeaders()
    Dim sList As String
    Dim i As Integer, j As Integer, l As Integer, n As Integer

    sList = GetProfile("Extra Headers", "") ' Get key list
    l = Len(sList)                          ' Length incl. trailing null
    i = 1                                   ' Start at 1st character
    n = 0                                   ' Index in array
    Do While ((i < l) And (n < MAX_XHDR))   ' Safety stop here
        j = InStr(i, sList, Chr$(0))        ' J -> next null
        CGI_ExtraHeaders(n).key = Mid$(sList, i, j - i) ' Get Key, then value
        CGI_ExtraHeaders(n).value = GetProfile("Extra Headers", CGI_ExtraHeaders(n).key)
        i = j + 1                           ' Bump pointer
        n = n + 1                           ' Bump array index
    Loop
    CGI_NumExtraHeaders = n                 ' Fill in global count

End Sub

'---------------------------------------------------------------------------
'
'   GetExtraHeaders() - Create the array of extra header structs
'
' Enumerate the keys in the [Extra Headers] section of the profile file,
' then get the value for each of the keys.
'---------------------------------------------------------------------------
Private Sub GetExtraHeaders()
    Dim sList As String
    Dim i As Integer, j As Integer, l As Integer, n As Integer

    sList = GetProfile("Extra Headers", "") ' Get key list
    l = Len(sList)                          ' Length incl. trailing null
    i = 1                                   ' Start at 1st character
    n = 0                                   ' Index in array
    Do While ((i < l) And (n < MAX_XHDR))   ' Safety stop here
        j = InStr(i, sList, Chr$(0))        ' J -> next null
        CGI_ExtraHeaders(n).key = Mid$(sList, i, j - i) ' Get Key, then value
        CGI_ExtraHeaders(n).value = GetProfile("Extra Headers", CGI_ExtraHeaders(n).key)
        i = j + 1                           ' Bump pointer

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天影视色香欲综合网老头| 亚洲免费av观看| 久久97超碰国产精品超碰| 7777精品伊人久久久大香线蕉超级流畅| 一区二区三区在线视频免费 | 欧美一区二区国产| 麻豆免费精品视频| 欧美国产欧美亚州国产日韩mv天天看完整| 懂色av中文一区二区三区| 亚洲色图.com| 欧美精品粉嫩高潮一区二区| 精品一区二区三区久久久| 中文字幕二三区不卡| 色婷婷综合五月| 日本欧美加勒比视频| 国产亚洲婷婷免费| 欧美男男青年gay1069videost| 亚洲福利一区二区| 久久亚洲二区三区| 91色在线porny| 日本午夜精品视频在线观看| 国产农村妇女毛片精品久久麻豆 | 欧美亚洲国产bt| 免费高清在线视频一区·| 欧美激情中文不卡| 欧美日韩午夜在线| 国产精品996| 亚洲成av人片www| 亚洲国产精品二十页| 欧美日韩在线观看一区二区| 国产精品18久久久久久久网站| 一区二区三区鲁丝不卡| 久久久久久久精| 精品视频免费在线| 成人av网站免费观看| 日韩精品色哟哟| 亚洲另类春色校园小说| 2023国产精品自拍| 欧美性色黄大片| 成人av资源在线观看| 美女视频第一区二区三区免费观看网站| 日本一区二区成人在线| 欧美日韩第一区日日骚| 成人aa视频在线观看| 久久福利资源站| 亚洲国产aⅴ成人精品无吗| 国产精品区一区二区三区| 欧美一级片在线看| 欧美午夜影院一区| 91尤物视频在线观看| 国产精品一二一区| 日本怡春院一区二区| 亚洲一区在线观看网站| 18欧美亚洲精品| 欧美激情资源网| 久久综合av免费| 日韩一级片网址| 宅男在线国产精品| 欧美日韩精品三区| 欧美在线视频日韩| 在线精品亚洲一区二区不卡| 成人av手机在线观看| 国产精品91xxx| 国产精品一区二区久久不卡| 久久91精品国产91久久小草| 天天色图综合网| 亚洲成av人片一区二区| 亚洲一二三区在线观看| 亚洲尤物视频在线| 一区二区三区精品在线| 一级中文字幕一区二区| 亚洲伊人色欲综合网| 一区二区视频免费在线观看| 亚洲欧洲日韩女同| 亚洲三级免费观看| 亚洲欧美日韩久久精品| 亚洲日本va在线观看| 亚洲三级久久久| 亚洲国产aⅴ成人精品无吗| 亚洲一级在线观看| 五月婷婷综合激情| 日本aⅴ精品一区二区三区 | 国产福利精品导航| 国产在线精品不卡| 国产成人午夜99999| 国产91对白在线观看九色| 成人午夜在线播放| 91免费在线播放| 欧美影视一区在线| 91精品国产乱| 精品成人一区二区三区四区| 国产日韩综合av| 《视频一区视频二区| 亚洲最新视频在线观看| 日韩国产精品久久久久久亚洲| 日本不卡视频在线观看| 国产精品一品二品| 91在线视频网址| 欧美三级欧美一级| 久久综合给合久久狠狠狠97色69| 欧美国产在线观看| 一区二区三区日韩精品视频| 日韩国产欧美一区二区三区| 韩国精品久久久| eeuss鲁片一区二区三区在线观看| 99精品偷自拍| 777午夜精品免费视频| 久久免费视频一区| 亚洲综合一区二区三区| 美女网站一区二区| 99riav久久精品riav| 91精品国产综合久久精品麻豆| 欧美mv日韩mv国产| 亚洲精品日日夜夜| 久久精品国产精品亚洲红杏| 972aa.com艺术欧美| 日韩精品一区二区三区中文不卡| 国产精品三级久久久久三级| 午夜精品久久久久久久久| 久久69国产一区二区蜜臀| 色嗨嗨av一区二区三区| 26uuu亚洲综合色欧美| 亚洲精品免费看| 国产麻豆精品在线观看| 欧美日本国产视频| 一色屋精品亚洲香蕉网站| 蜜臀av性久久久久蜜臀aⅴ流畅 | 久久蜜桃av一区二区天堂| 亚洲一区欧美一区| 成人免费高清视频在线观看| 日韩欧美在线不卡| 一区二区三区在线视频播放| 高清不卡一区二区| 日韩三级在线观看| 亚洲成人中文在线| 99精品久久99久久久久| 精品成人佐山爱一区二区| 偷窥少妇高潮呻吟av久久免费| 99国产一区二区三精品乱码| 久久色.com| 日本午夜一本久久久综合| 在线观看一区二区视频| 国产精品亲子伦对白| 极品尤物av久久免费看| 91精品国产综合久久久蜜臀图片| 亚洲乱码精品一二三四区日韩在线| 久久99国产精品久久99| 日韩一区二区三区电影在线观看| 亚洲一区二区三区四区在线免费观看 | 色综合欧美在线| 国产精品理论片在线观看| 国产毛片精品视频| 欧美岛国在线观看| 日韩不卡一二三区| 7777精品伊人久久久大香线蕉的| 亚洲一级二级在线| 色久综合一二码| 亚洲蜜臀av乱码久久精品蜜桃| 白白色 亚洲乱淫| 亚洲国产精品二十页| 国产suv精品一区二区三区| 久久久精品天堂| 国产精品一卡二| 亚洲国产精品二十页| 成人综合在线观看| 国产精品福利在线播放| 成人国产一区二区三区精品| 久久久国产精品麻豆| 国产丶欧美丶日本不卡视频| 国产三级一区二区| 丰满少妇在线播放bd日韩电影| 国产亚洲一区二区三区四区 | 国产精品久久久久婷婷| 国产成人啪免费观看软件 | 99视频热这里只有精品免费| 国产精品欧美极品| 91香蕉视频mp4| 一区二区在线电影| 欧美人xxxx| 极品尤物av久久免费看| 国产日产精品1区| 成人免费av资源| 一区二区三区在线影院| 欧美精品一二三| 六月丁香婷婷色狠狠久久| 26uuu国产电影一区二区| 国产高清久久久| 亚洲美女屁股眼交| 777奇米四色成人影色区| 韩国理伦片一区二区三区在线播放| 久久久www成人免费无遮挡大片| 成人精品小蝌蚪| 亚洲一区在线观看免费 | 久久精品男人的天堂| 国产成人免费视频网站| 一区二区三区丝袜| 精品免费一区二区三区| 91小视频免费看| 免费av成人在线| 国产精品素人一区二区|