Asp.net源码专业站
首页->会员交友->多层结构会员管理系统源码>>FCKeditor.Net_2.2/FileBrowserConnector.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:多层结构会员管理系统源码
当前文件:文件类型 mvcMemberShip/FCKeditor.Net_2.2/FileBrowserConnector.cs[10K,2009-6-12 11:48:03]打开代码结构图
普通视图
		            
1/* 2 * FCKeditor - The text editor for internet 3 * Copyright (C) 2003-2005 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: FileBrowserConnector.cs 14 * This is the code behind of the connector.aspx page used by the 15 * File Browser. 16 * 17 * File Authors: 18 * Frederico Caldeira Knabben (fredck@fckeditor.net) 19 */ 20 21using System; 22using System.Globalization; 23using System.Xml; 24using System.Web; 25 26namespace FredCK.FCKeditorV2 27{ 28 public class FileBrowserConnector : FileWorkerBase 29 { 30 protected override void OnLoad(EventArgs e) 31 { 32 // Get the main request informaiton. 33 string sCommand = Request.QueryString["Command"]; 34 if (sCommand == null) return; 35 36 string sResourceType = Request.QueryString["Type"]; 37 if (sResourceType == null) return; 38 39 string sCurrentFolder = Request.QueryString["CurrentFolder"]; 40 if (sCurrentFolder == null) return; 41 42 // Check the current folder syntax (must begin and start with a slash). 43 if (!sCurrentFolder.EndsWith("/")) 44 sCurrentFolder += "/"; 45 if (!sCurrentFolder.StartsWith("/")) 46 sCurrentFolder = "/" + sCurrentFolder; 47 48 // File Upload doesn't have to return XML, so it must be intercepted before anything. 49 if (sCommand == "FileUpload") 50 { 51 this.FileUpload(sResourceType, sCurrentFolder); 52 return; 53 } 54 55 // Cleans the response buffer. 56 Response.ClearHeaders(); 57 Response.Clear(); 58 59 // Prevent the browser from caching the result. 60 Response.CacheControl = "no-cache"; 61 62 // Set the response format. 63 Response.ContentEncoding = System.Text.UTF8Encoding.UTF8; 64 Response.ContentType = "text/xml"; 65 66 XmlDocument oXML = new XmlDocument(); 67 XmlNode oConnectorNode = CreateBaseXml(oXML, sCommand, sResourceType, sCurrentFolder); 68 69 // Execute the required command. 70 switch (sCommand) 71 { 72 case "GetFolders": 73 this.GetFolders(oConnectorNode, sResourceType, sCurrentFolder); 74 break; 75 case "GetFoldersAndFiles": 76 this.GetFolders(oConnectorNode, sResourceType, sCurrentFolder); 77 this.GetFiles(oConnectorNode, sResourceType, sCurrentFolder); 78 break; 79 case "CreateFolder": 80 this.CreateFolder(oConnectorNode, sResourceType, sCurrentFolder); 81 break; 82 } 83 84 // Output the resulting XML. 85 Response.Write(oXML.OuterXml); 86 87 Response.End(); 88 } 89 90 Base XML Creation 111 112 Command Handlers 260 261 Directory Mapping 284 } 285} 286
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:多层结构会员管理系统源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146