ASP、vbscript編碼模板

來源:互聯網
上載者:User

<!-- METADATA
TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ADO\msado20.tlb"
-->

<%@ Language=VBScript %>
<%Option Explicit%>

<%
'加入的檔案
%>
<!-- #include virtual|file="需要包含的檔案" -->

<%
'代碼著作權說明:
'=========================================================
' File: 檔案名稱.asp
' Version:1.0
' Date:
' Script Written by Tommy xiao
' Description:
'
' Revision:
' Date:
' Author:
' Description:
'=========================================================
' Copyright (C) 2003 Asiagame.Com. All rights reserved.
' Web: http://www.advancededu.com
' Need help? Contact: xds2000@msn.com
'=========================================================
%>
<%
'容錯機制代碼
'--------------------------------
DIM NDEBUG_MSG
NDEBUG_MSG=FALSE

IF NDEBUG_MSG = TRUE THEN
'出錯過濾
ON ERROR RESUME NEXT
END IF

'變數聲明及定義區
'Boolean error variant
Dim BlnFounderr,sErrmsg
BlnFounderr = FALSE
'觸發錯誤資訊
'sErrmsg=sErrmsg+"<br>"+"<li>沒有找到您需要的資訊,歡迎使用。"
'BlnFounderr = TRUE

Dim oConn,oRs,sSQL 'ADO objects

'Set oConn = Server.CreateObject ("ADODB.Connection")
' oConn.Open Application("connStr")

'事務定義區

'輸出錯誤
If BlnFounderr = TRUE Then
mError()
End If

'Func,Proc定義區
Function DealInput(exp1)
dim exp2 'Filter input for invalid characters
exp2=Replace(exp1,"<","<")
exp2=Replace(exp2,">",">")
exp2=Replace(exp2,"'","''")
exp2=Replace(exp2,"&","&")
DealInput=exp2
End Function

Function CloseDatabase ' CloseDatabase
oConn.close
Set oConn = Nothing
End Function

sub mError()
'Response.Write sErrmsg&"please contact system administrator."
response.write " <html>" & vbCrLf
response.write " <head>" & vbCrLf
response.write " <title>xxx網站--WEB後台管理</title>" & vbCrLf
response.write " <meta NAME=""GENERATOR"" Content=""Microsoft Visual Studio 6.0"">" & vbCrLf
response.write " <link rel=""stylesheet"" type=""text/css"" href=""css/index.css"">" & vbCrLf
response.write " <script type=""text/javascript"" src=""js/fx.js""></script>" & vbCrLf
response.write " <script type=""text/javascript"" src=""js/cooltool.js""></script>" & vbCrLf
response.write "" & vbCrLf
response.write " </head>" & vbCrLf
response.write "" & vbCrLf
response.write " <body>" & vbCrLf
response.write " <table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""95%"" bgcolor=""#777777"" align=""center"">" & vbCrLf
response.write " <tr>" & vbCrLf
response.write " <td>" & vbCrLf
response.write " <table cellpadding=""3"" cellspacing=""1"" border=""0"" width=""100%"">" & vbCrLf
response.write " <tr align=""center""> " & vbCrLf
response.write " <td width=""100%"" bgcolor=""#EEEEEE"">內部管理操作錯誤資訊</td>" & vbCrLf
response.write " </tr>" & vbCrLf
response.write " <tr> " & vbCrLf
response.write " <td width=""100%"" bgcolor=""#FFFFFF""><b>產生錯誤的可能原因:</b><br><br>" & vbCrLf
response.write " <li>請您儘快與管理員聯絡,獲得相應地的協助。</a>" & vbCrLf
response.write sErrmsg & vbCrLf
response.write " </td>" & vbCrLf
response.write " </tr>" & vbCrLf
response.write " <tr align=""center""> " & vbCrLf
response.write " <td width=""100%"" bgcolor=""#EEEEEE"">" & vbCrLf
response.write " <a href=""javascript:history.go(-1)""> << 返回上一頁</a>" & vbCrLf
response.write " </td>" & vbCrLf
response.write " </tr> " & vbCrLf
response.write " </table> </td></tr></table>" & vbCrLf
response.write " </body>" & vbCrLf
response.write " </html>"
end sub
%>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.