source: sandbox/filemanager/tp/fckeditor/editor/filemanager/connectors/asp/basexml.asp @ 1575

Revision 1575, 2.0 KB checked in by amuller, 15 years ago (diff)

Ticket #597 - Implentação, melhorias do modulo gerenciador de arquivos

  • Property svn:executable set to *
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        on error resume next
34        ' The CodePage property isn't supported in Windows 2000. #2604
35        Response.CodePage               = 65001
36        on error goto 0
37
38        Response.CharSet                = "UTF-8"
39        Response.ContentType    = "text/xml"
40End Sub
41
42Sub CreateXmlHeader( command, resourceType, currentFolder, url )
43        ' Create the XML document header.
44        Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
45
46        ' Create the main "Connector" node.
47        Response.Write "<Connector command=""" & command & """ resourceType=""" & resourceType & """>"
48
49        ' Add the current folder node.
50        Response.Write "<CurrentFolder path=""" & ConvertToXmlAttribute( currentFolder ) & """ url=""" & ConvertToXmlAttribute( url ) & """ />"
51End Sub
52
53Sub CreateXmlFooter()
54        Response.Write "</Connector>"
55End Sub
56
57Sub SendError( number, text )
58        SetXmlHeaders
59
60        ' Create the XML document header.
61        Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
62
63        If text <> "" then
64        Response.Write "<Connector><Error number=""" & number & """ text=""" & Server.HTMLEncode( text ) & """ /></Connector>"
65        else
66        Response.Write "<Connector><Error number=""" & number & """ /></Connector>"
67        end if
68
69        Response.End
70End Sub
71%>
Note: See TracBrowser for help on using the repository browser.