VBScript encoding standard format

Source: Internet
Author: User
VBScript encoding standard format

Code specification:

<! -- Metadata
Type = "typelib"
File = "C:/program files/common files/system/ADO/msadow.tlb"
-->

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

<%
'Added file
%>
<! -- # Include virtual | file = "files to be included" -->

<%
'Code copyright description:
'================================================ ============================
'File: file name. 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
'================================================ ============================
%>
<%
'Fault tolerance mechanism code
'--------------------------------
Dim ndebug_msg
Ndebug_msg = false

If ndebug_msg = true then
'Error Filtering
On Error resume next
End if

'Variable declaration and definition Area
'Boolean error Variant
Dim blnfounderr, serrmsg
Blnfounderr = false
'Trigger error message
'Serrmsg = serrmsg + "<br>" + "<li> the information you need is not found. welcome to use it. "
'Blnfounderr = true

Dim oconn, ORS, ssql 'ado objects

'Set oconn = server. Createobject ("ADODB. Connection ")
'Oconn. open application ("connstr ")

'Transaction definition Area

 

'Output Error
If blnfounderr = true then
Merror ()
End if

'Func, Proc definition Area
Function dealinput (exp1)
Dim exp2 'filter input for invalid characters
Exp2 = Replace (exp1, "<", "& lt ;")
Exp2 = Replace (exp2, ">", "& gt ;")
Exp2 = Replace (exp2 ,"'","''")
Exp2 = Replace (exp2, "&", "& amp ;")
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 "Response. Write "<title> XXX site -- Web Background Management </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 "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 ""> internal management operation error message </TD> "& vbcrlf
Response. Write "</tr>" & vbcrlf
Response. Write "<tr>" & vbcrlf
Response. write "<TD width =" 100% "" bgcolor = "" # ffffff ""> <B> possible causes of errors: </B> <br> "& vbcrlf
Response. Write "<li> contact the Administrator as soon as possible for help. </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)"> <back to previous page </a> "& vbcrlf
Response. Write "</TD>" & vbcrlf
Response. Write "</tr>" & vbcrlf
Response. Write "</table> </TD> </tr> </table>" & vbcrlf
Response. Write "</body>" & vbcrlf
Response. Write "End sub
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.