欢迎来到代码驿站!

ASP代码

当前位置:首页 > 软件编程 > ASP代码

ASP、vbscript编码模板

时间:2020-10-09 22:42:24|栏目:ASP代码|点击:
<!-- 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
%>

上一篇:asp下为什么韩文字后面显示分号?

栏    目:ASP代码

下一篇:ASP中Cache技术的应用

本文标题:ASP、vbscript编码模板

本文地址:http://www.codeinn.net/misctech/9113.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有