forked from nagaozen/asp-xtreme-evolution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.asa
72 lines (64 loc) · 2.91 KB
/
global.asa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!-- METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library" TYPE="TypeLib" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" -->
<!-- METADATA NAME="Microsoft ADO Ext. 2.5 for DDL and Security" TYPE="TypeLib" UUID="{00000600-0000-0010-8000-00AA006D2EA4}" -->
<script runat="server" language="vbscript">
' File: global.asa
'
' Here we are initializing the timer, defining some constants to be used later
' and setting a flag requiring to load application.configure.asp.
'
' See also:
'
' <application.configure.asp>
'
' License:
'
' This file is part of ASP Xtreme Evolution.
' Copyright (C) 2007-2012 Fabio Zendhi Nagao
'
' ASP Xtreme Evolution is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' ASP Xtreme Evolution is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License for more details.
'
' You should have received a copy of the GNU Lesser General Public License
' along with ASP Xtreme Evolution. If not, see <http://www.gnu.org/licenses/>.
'
' About:
'
' - Written by Fabio Zendhi Nagao <http://zend.lojcomm.com.br/> @ December 2007
' Subroutine: Application_onStart
'
' Define Application constants and load the config.xml data into application configuration.
'
sub Application_onStart
' Output standards to be used with indentedTransform
Application("Xslt.html5") = "<xsl:output method='html' version='1.0' encoding='UTF-8' doctype-system='about:legacy-compat' indent='yes' />"
Application("Xslt.xhtml") = "<xsl:output method='xml' version='1.0' encoding='UTF-8' omit-xml-declaration='yes' doctype-public='-//W3C//DTD XHTML 1.1//EN' doctype-system='http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' indent='yes'/>"
Application("Xslt.text") = "<xsl:output method='text' version='1.0' encoding='UTF-8' omit-xml-declaration='yes' indent='yes'/>"
Application("Xslt.xml") = "<xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes'/>"
' Initial value indicating that the application hasn't been configured yet.
Application("isConfigured") = false
end sub
sub Application_onEnd
Application.Contents.removeAll()
end sub
' Subroutine: Session_onStart
'
' In order to compute the execution time of a request, we need to start a timer.
'
sub Session_onStart
' Required to track the execution time
Session("Request.time") = timer
' These statements affects dynamic strings in all responses in a session. See also <default.asp> for literal strings.
Session("Response.charset") = "UTF-8" ' See <base.asp> Response.charset.
Session.codePage = 65001 ' UTF-8
Session.lcid = 1033 ' en-us
end sub
sub Session_onEnd
end sub
</script>