source: trunk/expressoMail1_2/js/fckeditor/editor/filemanager/browser/default/connectors/asp/io.asp @ 389

Revision 389, 2.3 KB checked in by niltonneto, 16 years ago (diff)

Ver Tickets no Trac #286 e #287.
Inclusão de template de assinatura padrão.
Assinatura também disponível em formato de texto rico.
Inclusão da biblioteca FCKEditor.

  • Property svn:executable set to *
Line 
1<!--
2 * FCKeditor - The text editor for internet
3 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4 *
5 * Licensed under the terms of the GNU Lesser General Public License:
6 *              http://www.opensource.org/licenses/lgpl-license.php
7 *
8 * For further information visit:
9 *              http://www.fckeditor.net/
10 *
11 * "Support Open Source software. What about a donation today?"
12 *
13 * File Name: io.asp
14 *      This file include IO specific functions used by the ASP Connector.
15 *
16 * File Authors:
17 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
18-->
19<%
20Function GetUrlFromPath( resourceType, folderPath )
21        If resourceType = "" Then
22                GetUrlFromPath = RemoveFromEnd( sUserFilesPath, "/" ) & folderPath
23        Else
24                GetUrlFromPath = sUserFilesPath & resourceType & folderPath
25        End If
26End Function
27
28Function RemoveExtension( fileName )
29        RemoveExtension = Left( fileName, InStrRev( fileName, "." ) - 1 )
30End Function
31
32Function ServerMapFolder( resourceType, folderPath )
33        ' Get the resource type directory.
34        Dim sResourceTypePath
35        sResourceTypePath = sUserFilesDirectory & resourceType & "\"
36       
37        ' Ensure that the directory exists.
38        CreateServerFolder sResourceTypePath
39
40        ' Return the resource type directory combined with the required path.
41        ServerMapFolder = sResourceTypePath & RemoveFromStart( folderPath, "/" )
42End Function
43
44Sub CreateServerFolder( folderPath )
45        Dim oFSO
46        Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
47       
48        Dim sParent
49        sParent = oFSO.GetParentFolderName( folderPath )
50       
51        ' Check if the parent exists, or create it.
52        If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent )
53       
54        If ( oFSO.FolderExists( folderPath ) = False ) Then
55                oFSO.CreateFolder( folderPath )
56        End If
57       
58        Set oFSO = Nothing
59End Sub
60
61Function IsAllowedExt( extension, resourceType )
62        Dim oRE
63        Set oRE = New RegExp
64        oRE.IgnoreCase  = True
65        oRE.Global              = True
66       
67        Dim sAllowed, sDenied
68        sAllowed        = ConfigAllowedExtensions.Item( resourceType )
69        sDenied         = ConfigDeniedExtensions.Item( resourceType )
70       
71        IsAllowedExt = True
72       
73        If sDenied <> "" Then
74                oRE.Pattern     = sDenied
75                IsAllowedExt    = Not oRE.Test( extension )
76        End If
77       
78        If IsAllowedExt And sAllowed <> "" Then
79                oRE.Pattern             = sAllowed
80                IsAllowedExt    = oRE.Test( extension )
81        End If
82       
83        Set oRE = Nothing
84End Function
85%>
Note: See TracBrowser for help on using the repository browser.