以前收集的一些資料---不用組件上傳檔案程式碼片段(三)

來源:互聯網
上載者:User
檔案fformat.inc
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>

function Foot()
  DIM HTML
    HTML = "<hr><Table Border=0 Width=100%><TR><TD><font size=1>燬ample upload/download via ASP from <a href=http://www.pstruh.cz>PSTRUH Software</a>.</font>"
    HTML = HTML & "</td><td Align=right><Font Size=1><A HRef=http://www.pstruh.cz/help/ScptUtl/library.htm>Activex Upload</A>?A HRef=http://www.pstruh.cz/help/usrmgr/library.htm>ActiveX UserManager</A>?A HRef=http://www.pstruh.cz/help/RSConv/library.htm>DBF on-the-fly</A>?A HRef=http://www.pstruh.cz/help/tcpip/library.htm>ActiveX DNS+TraceRoute</A>?A HRef=http://www.pstruh.cz/help/urlrepl/library.htm>URL Replacer</A>?/Font>"
    HTML = HTML & "</td></tr></table></Body></HTML>"
    Foot = HTML
end function

function Head(Title, Description)
  DIM HTML
    HTML = "<HTML><Head>"
  HTML = HTML & "<Title>" & Title & "</Title>"
  HTML = HTML & "<Meta Content=""" & Description & """ Name=""Description"">"
    HTML = HTML & Style()
    HTML = HTML & "</Head>"
    HTML = HTML & Body()
    Head = HTML
end function

function Body()
  DIM HTML
  HTML = "<body ALINK=YELLOW bgcolor=White LeftMargin=0 TopMargin=0>" &vbCrLf
    HTML = HTML & ClHead() &vbCrLf
    HTML = HTML & Source()
    Body = HTML
  '<LeftMargin=0 TopMargin=0 Style="margin-right:0pt; margin-top:0pt; margin-left:0pt;">
end function

function Style()
  Style = "<STYLE TYPE=""text/css""><--BODY{font-size:10pt;font-family:Arial,Arial CE,Helvetica,sans-serif }--></STYLE>"
  '<LeftMargin=0 TopMargin=0 Style="margin-right:0pt; margin-top:0pt; margin-left:0pt;">
end function

function ClHead()
  DIM HTML
  HTML = HTML & "<TABLE width=100% border=1 cellpadding=1 cellspacing=0 BORDERCOLOR=WHITE><tr bgcolor=SILVER>"
  HTML = HTML & "<th><a href=fupload.asp>Multiple text files upload</a></th>"
  HTML = HTML & "<th><a href=fdbupl.asp>Upload to database</a></th>"
  HTML = HTML & "<th><a href=fdbdown.asp>Download from database</a></th>"
  HTML = HTML & "<th><a href=" & request.servervariables("script_name") & "?S=1>View source</a></th>"
  HTML = HTML & "</tr></table>"
  ClHead = HTML
end function

function Source()
  DIM HTML
  if request.querystring("S")<>"" then
    HTML = HTML & "<pre>" & server.htmlencode(CreateObject("Scripting.FileSystemObject").OpenTextFile _
    (server.mappath(request.servervariables("script_name")), 1, False, False).readall) & "</pre>"
  end if
    Source = BasicEncode(HTML)
end function


Function BasicEncode(ByVal VBCode)
'  Dim Pom, PosStart, PosEnd
'  PosStart = InStr(VBCode, "'")
'  Do While PosStart > 0
'    PosEnd = InStr(PosStart + 1, VBCode, vbCrLf)
'    If PosEnd = 0 Then PosEnd = Len(VBCode)
'    Pom = Left(VBCode, PosStart - 1) & "<font color=green>"
'    Pom = Pom & Mid(VBCode, PosStart, PosEnd - PosStart - 0) & "</font>"
'    Pom = Pom & Mid(VBCode, PosEnd)
'    VBCode = Pom
'    PosStart = InStr(PosEnd + 1, VBCode, "'")
'  Loop
  VBCode = FilterBeginEnd(VBCode, "'", vbCrLf, "green")
  VBCode = FilterBeginEnd(VBCode, """, ""&



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.