jquery.sfbrowser_3y8g

所属分类:WEB开发
开发工具:PHP
文件大小:693KB
下载次数:3
上传日期:2012-11-26 00:56:15
上 传 者tmxktutc
说明:  采用php的源码实现,jquery sfbrowser是一个使用php和jquery实现的一个简易的上传下载系统的php源码程序,参看、研究和阅读,提升自我
(Using php source code to achieve The the jquery sfbrowser a php source program using php and jquery to achieve a simple upload and download system , see , study and reading , enhance self-)

文件列表:
** (3825, 2010-02-01)
jquery.sfbrowser\data\Config.xml (167, 2009-05-05)
jquery.sfbrowser\data\contextmenu.png (2865, 2009-04-27)
jquery.sfbrowser\data\DataSheet.xls (6144, 2008-06-30)
jquery.sfbrowser\data\DumbEmail.eml (417, 2008-11-17)
jquery.sfbrowser\data\Empty.zip (22, 2008-06-30)
jquery.sfbrowser\data\EmptyFlash.fla (21504, 2009-05-08)
jquery.sfbrowser\data\EmptyFlash.swf (205, 2009-05-08)
jquery.sfbrowser\data\filetree.png (4865, 2009-04-27)
jquery.sfbrowser\data\FilterForge.ffcmd (134, 2008-06-30)
jquery.sfbrowser\data\Fire.flv (219521, 2009-04-27)
jquery.sfbrowser\data\FnMd.vsd (0, 2009-05-26)
jquery.sfbrowser\data\HelloEarth.pl (49, 2008-06-30)
jquery.sfbrowser\data\HelloWorld.cpp (105, 2008-06-30)
jquery.sfbrowser\data\HelloWorld.java (104, 2008-06-30)
jquery.sfbrowser\data\ImageFolder\atomen.jpg (19005, 2008-11-25)
jquery.sfbrowser\data\ImageFolder\blue\Lorenz_blue.jpg (14760, 2008-11-25)
jquery.sfbrowser\data\ImageFolder\blue\Lorenz_blue_thumb.jpg (1419, 2008-11-25)
jquery.sfbrowser\data\ImageFolder\Lorenz_groen.jpg (6084, 2009-11-23)
jquery.sfbrowser\data\ImageFolder\Lorenz_groen_thumb.jpg (2335, 2008-11-14)
jquery.sfbrowser\data\install.log (3679, 2008-06-30)
jquery.sfbrowser\data\JQueryRocks.js (41, 2008-06-30)
jquery.sfbrowser\data\library0 Report.txt (12011, 2009-05-06)
jquery.sfbrowser\data\Lorenz.jpg (11881, 2008-06-30)
jquery.sfbrowser\data\Lorenz84.jpg (37245, 2008-06-30)
jquery.sfbrowser\data\Lorenz_1.jpg (7965, 2008-11-25)
jquery.sfbrowser\data\Lorenz_2.jpg (1419, 2008-06-30)
jquery.sfbrowser\data\MoonTexture.jpg (7310, 2008-06-30)
jquery.sfbrowser\data\MSWord.doc (7680, 2008-06-30)
jquery.sfbrowser\data\NotEmpty.zip (640, 2010-01-29)
jquery.sfbrowser\data\NothingInHere.rar (79, 2010-01-29)
jquery.sfbrowser\data\ODDrawing.odg (2417, 2009-05-26)
jquery.sfbrowser\data\ODPresentation.odp (2421, 2009-05-26)
jquery.sfbrowser\data\ODSpreadsheet.ods (2274, 2009-05-26)
jquery.sfbrowser\data\OpenDocument.odt (2440, 2008-06-30)
jquery.sfbrowser\data\PlainOldText.txt (44, 2008-06-30)
jquery.sfbrowser\data\PlanetTexture.jpg (20734, 2008-06-30)
jquery.sfbrowser\data\Play.php (38, 2008-06-30)
jquery.sfbrowser\data\preview.png (53721, 2009-05-19)
jquery.sfbrowser\data\resize_image.jpg (10741, 2009-04-27)
... ...

Connectors for SFBrowser v2.5.3+ ================================ A connector folder should at least have the following files. sfbrowser/connectors/[type]/config.[type] sfbrowser/connectors/[type]/init.[type] sfbrowser/connectors/[type]/sfbrowser.[type] ----------- config file ----------- The config file should at least have the following settings: - path of sfbrowser - the base upload folder - the language ISO code - ASCII preview ammount - a list of forbidden file extensions - an error return code (for severe misuse). The config file is used in both the init file (to parse to sfbrowser js) and in the actual sfbrowser file (which does the actual server side thinking). --------- init file --------- The init file must be called in the html documents header in order to write these lines: As you might have noticed, most of these lines are formed to what is set in the config file. The icons variable is a folder readout from the sfbrowser/icons/ folder. -------------- sfbrowser file -------------- The sfbrowser file is the actual connector to the SFBrowser plugin. Mostly it will require some POST variables and a JSON output object. A POST will always contain a variable "a" that will determine the action to be taken. For all actions counts: make absolutely sure that the incoming data corresponds with that set in the config file! - Do not upload forbidden filetypes. - Only upload, rename, create, view, change and delete within base upload path. - Rename files, but not the file extension. - Do not return, force download or preview forbidden filetypes. Mostly, a POST (or GET in case of force download) will contain the variable "folder" and the variable "file". Check both of these against the base upload folder set in the config. If it's outside, somebody is probably screwing around. Just to be sure, check the number of _GET, _POST and _FILES variables. A _POST["a"] can only get a certain ammount of each, if these differ, something fishy might be going on. If suspicious action occurs you can redirect them to the return error code set in the config file in order to block acces or whatever you'd like to do(??haven't really figured out how to go from there, consider it a loose stub??). A number of the JSON outputs contain file descriptions. In the description of the types of actions the file object is referred to as . It looks like this: JSON FileObject: { file: file name ,mime: file extention ,rsize: file size in bytes ,size: file size in kB, MB or whatever ,time: time in Unix Epoch ,date: time in "j-n-Y H:i" ,width: image width in pixels ,height: image height in pixels } example folder: { file:"blue", mime:"folder", rsize:0, size:"-", time:1229275063, date:"14-12-2008 18:17" } example file: { file:"readme.txt", mime:"txt", rsize:3679, size:"4kB", time:1229275065, date:"14-12-2008 18:17" } example image: { file:"atomen.jpg", mime:"jpg", rsize:19005, size:"19kB", time:1229275063, date:"14-12-2008 18:17", width:254, height:359 } The following are the possible values for _POST["a"]: the possible actions that can be taken and the required return values. _POST["a"]=="fileList" :: retreive file list requires: _POST["folder"] path to folder action: Read the contents of a folder Filter out the forbidden file types If applicable, filter for allowed file types JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) ,data: object containing 's } example: { error: "", msg: "fileListing", data: { a: , b: , c: , ... } } _POST["a"]=="duplicate" :: duplicate file requires: _POST["file"] file name _POST["folder"] file folder action: Create new non-existing file name Duplicate file to that name JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) ,data: duplicated file } _POST["a"]=="upload" :: file upload requires: _FILES["fileToUpload"] file object _POST["file"] path to folder _POST["deny"] pipe separated string of denied file extensions ("php|tpl|log") _POST["allow"] pipe separated string of allowed file extensions ("gif|jpg|jpeg|png") _POST["resize"] resize image to [width,heigth] action: Check for _FILES["fileToUpload"]["error"] Check _FILES["fileToUpload"]["tmp_name"] for actual upload Check forbidden filetypes Check allowed filetypes Check upload folder for similarly named file Move file to upload folder If applicable, resize image JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) ,data: uploaded file } _POST["a"]=="bar" :: image resize requires: _POST["file"] file name _POST["folder"] file folder _POST["w"] new width _POST["h"] new height action: Resize image JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) } _POST["a"]=="delete" :: file delete requires: _POST["file"] file name _POST["folder"] file folder action: delete file JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) } _POST["a"]=="download" :: file force download requires: _POST["file"] file name _POST["folder"] file folder action: Force download file JSON return: nothing _POST["a"]=="read" :: read txt file contents requires: _POST["file"] file name _POST["folder"] file folder action: Read and return file contents JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) ,data: { text: first x amount of bytes from ascii file } } _POST["a"]=="rename" :: rename file requires: _POST["file"] original file name _POST["folder"] file folder _POST["nfile"] new file name action: Check if new file name is valid Rename file JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) } _POST["a"]=="addFolder" :: add folder requires: _POST["folder"] folder to create new folder into _POST["foldername"] new folder name action: Create new folder JSON return: { error: error message (see lang.js) ,msg: succes message (see lang.js) ,data: newly created folder }
近期下载者

相关文件


收藏者