亚洲欧美第一页_禁久久精品乱码_粉嫩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网站大全| 国产成人精品一区二区三区网站观看| 91精品在线免费| 欧美一区二区三区思思人| 欧美日韩国产免费| 日韩视频免费直播| 国产欧美日韩另类一区| 日韩精品一区二区在线| 91麻豆精品91久久久久同性| 欧美久久一区二区| 日韩一区二区电影在线| 久久久久久久av麻豆果冻| 一区二区三区成人| 粉嫩高潮美女一区二区三区| 欧美色中文字幕| 国产精品美女久久福利网站| 午夜天堂影视香蕉久久| 国产成人一区在线| 欧美久久久久中文字幕| 国产精品久久久久永久免费观看 | 成人18视频在线播放| 日韩三级精品电影久久久| 一区二区三区不卡视频在线观看 | 亚洲欧洲成人精品av97| 久99久精品视频免费观看| 欧美肥妇bbw| 亚洲福利视频导航| 97精品国产97久久久久久久久久久久| 国产精品卡一卡二| 国产一区二区三区在线观看精品 | 五月婷婷激情综合网| 欧美色网站导航| 国内精品免费**视频| 日韩欧美电影在线| 欧美bbbbb| 久久亚洲一级片| 欧美日韩一区二区在线观看| 亚洲综合在线第一页| 在线免费av一区| 日韩激情视频网站| 精品日韩在线观看| 成人免费不卡视频| 日韩一区欧美一区| 91麻豆国产精品久久| 午夜精品影院在线观看| 日韩一区二区电影| 成人av高清在线| 日韩福利视频网| 国产欧美视频在线观看| 色婷婷亚洲综合| 另类人妖一区二区av| 久久久久久久综合日本| 色美美综合视频| 国产最新精品免费| 亚洲日本免费电影| 欧美电影免费提供在线观看| 国产成人综合亚洲网站| 亚洲丝袜美腿综合| 精品国产免费一区二区三区香蕉| 91免费观看视频| 午夜激情久久久| 日韩一区中文字幕| 精品国产欧美一区二区| 欧美久久一区二区| 欧美日韩一区精品| 91丨porny丨户外露出| 国产一区二区剧情av在线| 亚洲福利国产精品| 一区二区激情小说| 亚洲欧洲日本在线| 国产视频一区二区在线| 日韩欧美一级片| 欧美一区二区三区免费大片 | 国产精品人人做人人爽人人添| 欧美日韩第一区日日骚| 欧洲一区在线电影| 欧美三级中文字| 欧美日韩精品一区二区在线播放| 91蜜桃网址入口| 欧美无乱码久久久免费午夜一区| 99精品视频一区二区三区| 成人丝袜高跟foot| 色天天综合色天天久久| 在线一区二区视频| 8x8x8国产精品| 精品国产区一区| 国产日产欧美一区二区视频| 亚洲一区二区三区激情| 蜜桃久久精品一区二区| 国内精品在线播放| 国产福利91精品一区| 欧洲国内综合视频| 精品99999| 亚洲女同一区二区| 麻豆国产欧美日韩综合精品二区 | 日韩精品在线网站| 国产精品久99| 首页亚洲欧美制服丝腿| 国产一区 二区| 欧美日韩三级视频| 国产精品丝袜久久久久久app| 亚洲自拍偷拍av| 成人国产精品免费| 欧美一卡在线观看| 亚洲女同女同女同女同女同69| 亚洲国产精品久久久久婷婷884| 精品在线免费观看| 91久久精品一区二区三| 国产欧美一区二区精品秋霞影院| 亚洲成人资源网| 色呦呦日韩精品| 国产欧美日韩视频在线观看| 日本亚洲欧美天堂免费| 91成人在线观看喷潮| 中文字幕在线观看一区| 国产成人啪午夜精品网站男同| 欧美一区二区三区啪啪| 亚洲成人免费观看| 色婷婷综合久久久中文一区二区| 欧美精品一区二区三区在线| 日韩精彩视频在线观看| 欧美日韩一区二区三区在线| 亚洲女女做受ⅹxx高潮| 99re视频精品| 亚洲最快最全在线视频| 在线免费观看一区| 亚洲制服丝袜一区| 91麻豆精品国产自产在线观看一区| 国产精品第五页| 一本到三区不卡视频| 亚洲视频免费观看| 欧美日韩精品一二三区| 久久国产尿小便嘘嘘| 国产欧美精品日韩区二区麻豆天美| 国产suv精品一区二区三区| 国产日产欧美一区二区三区| 9久草视频在线视频精品| 亚洲男帅同性gay1069| 欧美日韩激情在线| 国产尤物一区二区| 亚洲黄色av一区| 日韩欧美国产综合一区| 国产一区二区毛片| 亚洲国产视频一区| 久久久久久免费毛片精品| 99久久国产综合精品女不卡| 日韩制服丝袜av| 一级做a爱片久久| 国产三级一区二区| 91麻豆精品国产91久久久久久 | 欧美精品一区二区三区蜜桃| 国产成人综合亚洲网站| 午夜精品123| 亚洲天堂精品在线观看| 精品少妇一区二区三区在线播放| 91香蕉视频污在线| 国产成人免费在线视频| 国产最新精品精品你懂的| 亚洲第一二三四区| 亚洲一级电影视频| 亚洲欧洲国产专区| 日本一区二区成人| 久久精品亚洲精品国产欧美kt∨| 欧美午夜影院一区| 欧美性色黄大片手机版| av在线不卡免费看| 91视频你懂的| 欧美四级电影网| 91精品婷婷国产综合久久| 欧美丝袜自拍制服另类| 色婷婷综合久久久久中文| 91激情五月电影| 欧美三级日韩三级| 制服丝袜亚洲网站| 日韩欧美美女一区二区三区| 欧美岛国在线观看| 国产精品午夜电影| 国产农村妇女精品| 亚洲欧美一区二区三区孕妇| 亚洲激情中文1区| 青青草成人在线观看| 国产精品一区二区三区99| 成人成人成人在线视频| 色综合色狠狠天天综合色| 欧美人妖巨大在线| 欧美国产日韩亚洲一区| 一区二区三区日韩欧美精品 | www.亚洲色图| 欧美精三区欧美精三区| 国产亚洲一区二区在线观看| 最新欧美精品一区二区三区| 日韩黄色片在线观看| 波多野结衣中文字幕一区二区三区| 欧美特级限制片免费在线观看| ww亚洲ww在线观看国产| 亚洲美女少妇撒尿| 国产精品一区三区| 7777精品伊人久久久大香线蕉经典版下载| 精品久久久久久久久久久久久久久| 亚洲免费观看高清完整版在线观看熊|