<%@ Control Language="VB" EnableViewState="false" AutoEventWireup="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Config" %>
<script runat="server">
private function CheckAuthentication() as Boolean
If Session("access") = "ok" Then
Return True
Else
Return False
End If
End Function
Public Overloads Overrides Sub SetConfig()
Enabled = CheckAuthentication()
If Enabled = False Then
Session.Abandon()
End If
' URL path to user files.
UserFilesPath = "/files/"
' The connector tries to resolve the above UserFilesPath automatically.
' Use the following setting it you prefer to explicitely specify the
' absolute path. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
' Attention: The above 'UserFilesPath' URL must point to the same directory.
UserFilesAbsolutePath = ""
' Due to security issues with Apache modules, it is recommended to leave the
' following setting enabled.
ForceSingleExtension = True
' Allowed Resource Types
AllowedTypes = New String() {"File", "Image", "Flash", "Media"}
' For security, HTML is allowed in the first Kb of data for files having the
' following extensions only.
HtmlExtensions = New String() {"html", "htm", "xml", "xsd", "txt", "js"}
TypeConfig("File").AllowedExtensions = New String() {"7z", "aiff", "asf", "avi", "bmp", "csv", _
"doc", "fla", "flv", "gif", "gz", "gzip", _
"jpeg", "jpg", "mid", "mov", "mp3", "mp4", _
"mpc", "mpeg", "mpg", "ods", "odt", "pdf", _
"png", "ppt", "pxd", "qt", "ram", "rar", _
"rm", "rmi", "rmvb", "rtf", "sdc", "sitd", _
"swf", "sxc", "sxw", "tar", "tgz", "tif", _
"tiff", "txt", "vsd", "wav", "wma", "wmv", _
"xls", "xml", "zip"}
TypeConfig("File").DeniedExtensions = New String() {}
TypeConfig("File").FilesPath = "%UserFilesPath%file/"
TypeConfig("File").FilesAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%file/"))
TypeConfig("File").QuickUploadPath = "%UserFilesPath%"
TypeConfig("File").QuickUploadAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%"))
TypeConfig("Image").AllowedExtensions = New String() {"bmp", "gif", "jpeg", "jpg", "png"}
TypeConfig("Image").DeniedExtensions = New String() {}
TypeConfig("Image").FilesPath = "%UserFilesPath%image/"
TypeConfig("Image").FilesAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%image/"))
TypeConfig("Image").QuickUploadPath = "%UserFilesPath%"
TypeConfig("Image").QuickUploadAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%"))
TypeConfig("Flash").AllowedExtensions = New String() {"swf", "flv"}
TypeConfig("Flash").DeniedExtensions = New String() {}
TypeConfig("Flash").FilesPath = "%UserFilesPath%flash/"
TypeConfig("Flash").FilesAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%flash/"))
TypeConfig("Flash").QuickUploadPath = "%UserFilesPath%"
TypeConfig("Flash").QuickUploadAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%"))
TypeConfig("Media").AllowedExtensions = New String() {"aiff", "asf", "avi", "bmp", "fla", "flv", _
"gif", "jpeg", "jpg", "mid", "mov", "mp3", _
"mp4", "mpc", "mpeg", "mpg", "png", "qt", _
"ram", "rm", "rmi", "rmvb", "swf", "tif", _
"tiff", "wav", "wma", "wmv"}
TypeConfig("Media").DeniedExtensions = New String() {}
TypeConfig("Media").FilesPath = "%UserFilesPath%media/"
TypeConfig("Media").FilesAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%media/"))
TypeConfig("Media").QuickUploadPath = "%UserFilesPath%"
TypeConfig("Media").QuickUploadAbsolutePath = (IIf(UserFilesAbsolutePath = "","","%UserFilesAbsolutePath%"))
End Sub
</script>C# AccessControl acl = AccessControl.Add(); acl.Role = "*"; acl.ResourceType = "*"; acl.Folder = "/"; acl.FolderView = true; acl.FolderCreate = true; acl.FolderRename = true; acl.FolderDelete = true; acl.FileView = true; acl.FileUpload = true; acl.FileRename = true; acl.FileDelete = true;
i can't use to access conrtol.
how can user cannot upload file.
thanks
i m bad speak english i m sorry.
