source: extensions/FCKEditor/editor/filemanager/connectors/asp/basexml.asp @ 3295

Last change on this file since 3295 was 3295, checked in by patdenice, 15 years ago

New extension added:
FCK Editor (2.0.a)

File size: 1.8 KB
Line 
1<%
2 ' FCKeditor - The text editor for Internet - http://www.fckeditor.net
3 ' Copyright (C) 2003-2009 Frederico Caldeira Knabben
4 '
5 ' == BEGIN LICENSE ==
6 '
7 ' Licensed under the terms of any of the following licenses at your
8 ' choice:
9 '
10 '  - GNU General Public License Version 2 or later (the "GPL")
11 '    http://www.gnu.org/licenses/gpl.html
12 '
13 '  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14 '    http://www.gnu.org/licenses/lgpl.html
15 '
16 '  - Mozilla Public License Version 1.1 or later (the "MPL")
17 '    http://www.mozilla.org/MPL/MPL-1.1.html
18 '
19 ' == END LICENSE ==
20 '
21 ' This file include the functions that create the base XML output.
22%>
23<%
24
25Sub SetXmlHeaders()
26        ' Cleans the response buffer.
27        Response.Clear()
28
29        ' Prevent the browser from caching the result.
30        Response.CacheControl = "no-cache"
31
32        ' Set the response format.
33        Response.CodePage               = 65001
34        Response.CharSet                = "UTF-8"
35        Response.ContentType    = "text/xml"
36End Sub
37
38Sub CreateXmlHeader( command, resourceType, currentFolder, url )
39        ' Create the XML document header.
40        Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
41
42        ' Create the main "Connector" node.
43        Response.Write "<Connector command=""" & command & """ resourceType=""" & resourceType & """>"
44
45        ' Add the current folder node.
46        Response.Write "<CurrentFolder path=""" & ConvertToXmlAttribute( currentFolder ) & """ url=""" & ConvertToXmlAttribute( url ) & """ />"
47End Sub
48
49Sub CreateXmlFooter()
50        Response.Write "</Connector>"
51End Sub
52
53Sub SendError( number, text )
54        SetXmlHeaders
55
56        ' Create the XML document header.
57        Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
58
59        Response.Write "<Connector><Error number=""" & number & """ text=""" & Server.HTMLEncode( text ) & """ /></Connector>"
60
61        Response.End
62End Sub
63%>
Note: See TracBrowser for help on using the repository browser.