ASP、vbscript編碼模板
更新時(shí)間:2006年06月23日 00:00:00 作者:
<!-- METADATA
TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ADO\msado20.tlb"
-->
<%@ Language=VBScript %>
<%Option Explicit%>
<%
'加入的文件
%>
<!-- #include virtual|file="需要包含的文件" -->
<%
'代碼版權(quán)說(shuō)明:
'=========================================================
' 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
'=========================================================
%>
<%
'容錯(cuò)機(jī)制代碼
'--------------------------------
DIM NDEBUG_MSG
NDEBUG_MSG=FALSE
IF NDEBUG_MSG = TRUE THEN
'出錯(cuò)過(guò)濾
ON ERROR RESUME NEXT
END IF
'變量聲明及定義區(qū)
'Boolean error variant
Dim BlnFounderr,sErrmsg
BlnFounderr = FALSE
'觸發(fā)錯(cuò)誤信息
'sErrmsg=sErrmsg+"<br>"+"<li>沒(méi)有找到您需要的信息,歡迎使用。"
'BlnFounderr = TRUE
Dim oConn,oRs,sSQL 'ADO objects
'Set oConn = Server.CreateObject ("ADODB.Connection")
' oConn.Open Application("connStr")
'事務(wù)定義區(qū)
'輸出錯(cuò)誤
If BlnFounderr = TRUE Then
mError()
End If
'Func,Proc定義區(qū)
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站點(diǎn)--WEB后臺(tái)管理</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"">內(nèi)部管理操作錯(cuò)誤信息</td>" & vbCrLf
response.write " </tr>" & vbCrLf
response.write " <tr> " & vbCrLf
response.write " <td width=""100%"" bgcolor=""#FFFFFF""><b>產(chǎn)生錯(cuò)誤的可能原因:</b><br><br>" & vbCrLf
response.write " <li>請(qǐng)您盡快與管理員聯(lián)系,獲得相應(yīng)地的幫助。</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)""> << 返回上一頁(yè)</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
%>
TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ADO\msado20.tlb"
-->
<%@ Language=VBScript %>
<%Option Explicit%>
<%
'加入的文件
%>
<!-- #include virtual|file="需要包含的文件" -->
<%
'代碼版權(quán)說(shuō)明:
'=========================================================
' 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
'=========================================================
%>
<%
'容錯(cuò)機(jī)制代碼
'--------------------------------
DIM NDEBUG_MSG
NDEBUG_MSG=FALSE
IF NDEBUG_MSG = TRUE THEN
'出錯(cuò)過(guò)濾
ON ERROR RESUME NEXT
END IF
'變量聲明及定義區(qū)
'Boolean error variant
Dim BlnFounderr,sErrmsg
BlnFounderr = FALSE
'觸發(fā)錯(cuò)誤信息
'sErrmsg=sErrmsg+"<br>"+"<li>沒(méi)有找到您需要的信息,歡迎使用。"
'BlnFounderr = TRUE
Dim oConn,oRs,sSQL 'ADO objects
'Set oConn = Server.CreateObject ("ADODB.Connection")
' oConn.Open Application("connStr")
'事務(wù)定義區(qū)
'輸出錯(cuò)誤
If BlnFounderr = TRUE Then
mError()
End If
'Func,Proc定義區(qū)
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站點(diǎn)--WEB后臺(tái)管理</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"">內(nèi)部管理操作錯(cuò)誤信息</td>" & vbCrLf
response.write " </tr>" & vbCrLf
response.write " <tr> " & vbCrLf
response.write " <td width=""100%"" bgcolor=""#FFFFFF""><b>產(chǎn)生錯(cuò)誤的可能原因:</b><br><br>" & vbCrLf
response.write " <li>請(qǐng)您盡快與管理員聯(lián)系,獲得相應(yīng)地的幫助。</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)""> << 返回上一頁(yè)</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
%>
您可能感興趣的文章:
- ASP中一個(gè)用VBScript寫的隨機(jī)數(shù)類
- 利用vbscript腳本修改文件內(nèi)容,此適用于自動(dòng)化的操作中
- asp,VBscript語(yǔ)法錯(cuò)誤,史上最全最詳細(xì)最精確
- vbscript腳本編程教程2利用fso來(lái)進(jìn)行文件操作
- 使用vbscript腳本在表單中進(jìn)行選擇的代碼
- 用vbscript腳本實(shí)現(xiàn)返回 IP 配置數(shù)據(jù)的代碼
- ASP里面令人震撼地Debug類(VBScript)
- 調(diào)試JavaScript/VBScript腳本程序(IE篇)
- JavaScript/VBScript腳本程序調(diào)試(Wscript篇)
- 枚舉域內(nèi)計(jì)算機(jī)個(gè)數(shù)vbscript腳本(沒(méi)環(huán)境,沒(méi)測(cè)試)
- ASP/VBScript中CHR(0)的由來(lái)以及帶來(lái)的安全問(wèn)題分析
- ASP(VBScript)中整除和取余
- ASP基礎(chǔ)知識(shí)VBScript基本元素講解
- ASP基礎(chǔ)入門第四篇(腳本變量、函數(shù)、過(guò)程和條件語(yǔ)句)
相關(guān)文章
ASP編程入門進(jìn)階(廿一):DAO SQL之建立數(shù)據(jù)庫(kù)表
ASP編程入門進(jìn)階(廿一):DAO SQL之建立數(shù)據(jù)庫(kù)表...2007-01-01javascript asp教程第八課--request對(duì)象
javascript asp教程第八課--request對(duì)象...2007-03-03