Simple File Manager v.024a - http://onedotoh.sourceforge.net Author: Lee Herron - E-mail: lee_herron@users.sourceforge.net INTRODUCTION Simple File Manager (SFM) is a web based file management utility. It is designed to be used by those that don't want to use ftp or SHOULD NOT use ftp. It can be dropped into a specific directory and give access to that directory as well as any directory below it, including those created by SFM. It can be placed in a specific directory and configured to give access to other directories outside of its location (centralized). SFM gives its user upload, rename, delete, directory creation as well as directory navigation (within its tree limits), it also includes an image viewer, text viewer and mime type downloading. FEATURES - Authenticate the user (optional) - Internal text Editor (optional) - Specify which file extensions can be edited - Add and remove directories (optional) - Specify create directories feature for paths. - Create New File. - Specify what extension new files may have. - Specify the max hard drive space allowed - Specify the max file size allowed - Specify filenames that NO MODIFICATION is allowed. - Specify filenames that MAY NOT BE UPLOADED. - Sort file list by filename, type and size. - Define default sort order. - Definable hidden file / directory names - Definable character filter from filename. - Option to TURN-OFF files with specific extensions. - Internal text file viewer. - Internal image viewer with zoom function. - Definable external directory access. INSTALLATION 1. Location of files a) Put the fm.php, fmstyle.css files and its support directory w/files in a directory that you want to give file management access to. or b) Put the fm.php, fmstyle.css files and its support directory w/files in a separate directory then define paths for sfm's path access. 2. You may want to change the configuration variables in the top of the program but this is optional, you can just use the default settings. OPTIONS EXPLAINED (user configuration) AUTHENTICATION If you want authentication you must set the $user and $password configuration variable in the program. If you don't want authentication set $user = "" Please note the authentication system is not bullet proof. MAXFILESIZE Define size limit in bytes of allowed uploaded files. ie: $MaxFileSize = "204800"; / max file size in bytes HDDSPACE Define HardDrive space limit in bytes. This will block uploads of harddrive use has been or will be exceeded by uploaded file. This includes hidden files. ie: $HDDSpace = "1048576"; // max total size of all files in directory MAKEDIRON Turn OFF or ON the option to allow directory creation. ie: $MakeDirOn = 0; // if you don't want to be able to make directories ie: $MakeDirOn = 1; // if you want to be able to make directories HIDDENFILES Add any file names to this array which should remain invisible, this includes folders as well as files. ie: $HiddenFiles = array("fm_files",".htaccess","fmstyle.css"); EDITON This option allows editing of definable filetypes, see EDITEXTENSIONS. ie: $EditOn = 0; // if you don't want the to use the edit function. ie: $EditOn = 1; // if you want the to use the edit function. EDITEXTENSIONS Add extensions of file types that may be edited via text editor. ie: $EditExtensions = array("htm","html","txt","php","css"); SORTDEFAULT Initial run of SFM sorts files by this default, once an alternative sort is selected by clicking on either Filename, Type or Size the sort order is maintained. Sort Values: 0 = Filename / 1 = Size / 2 = Last Modified / 3 = File Type ie: $sortdefault = 2; // default would be by Last Modified EXTENSIONSOFF Turning OFF a filetype appends the extension .off to the uploaded file. Any file that has the extent ion of .off will not have the option of being renamed or edited, as well as it not being able to be executed. Add extensions of file types you want "turned off" ie: $ExtensionsOFF = array("php","cgi","php4","php3","pl","js"); MODIFYBLOCK Filenames included here will have the rename, edit and delete options removed. You will still be able to view or download depending on the filetype. Add files that shall not be uploaded, copied over, renamed or deleted. This affects files as well as directories, but does not affect contents of directories. It is case sensitive. ie: $ModifyBlock = array("readme.txt","COPYING",".htaccess","fm.php","fmstyle.css","docs","history.txt"); SNR When rename or uploading a file, the target name is stripped of characters included here. WARNING: removing any of the default characters may result in program failure. ie: $snr = array("%","'","+","\\","/","#","..","!"); MYLINK Located at top right of SFM is a place for your link. It can be defined to point anywhere using any string for the link label. Both must be defined for either to work. ie: $mylink = "http://sourceforge.net/projects/onedotoh/"; ie: $mylinkname = "OurProject"; DIRECTORY ACCESS SFM can be configured to be "dropped" into any directory, then operate from that directory allowing access to it and any directory below it. It can also be placed in a central directory and configured to give access to a specific few directory "roots." See details below. DEFINEROOT Define root path (1=On 0=Off) 0/Off only gives access to the directory you place sfm within. 1/On used directory paths defined by $dir[] ie: $defineroot = 0; DEFINEROOT ON If $defineroot is set to 1 ($defineroot=1;) then the following is used to point SFM to various paths. /* Directory 1: */ $dir[1]='/var/www/html/test/'; // uses this path as 1 root directory access point. $dirroot[1]='Test'; // displays this as a label $dirpath[1]='/test/'; // displays this as the path // This is the link displayed at top left of SFM. $nav[1]='Note files | Test files'; for additional directory "roots" define addtional values and increment index ([?]) by one. ie: $dirroot[2] etc. HELP and BUGS Please post any bugs and/or problems at : http://sourceforge.net/projects/onedotoh/ CUSTOMISING The HTML page is at the very bottom of the program file you should be able to easily customize this for your web site by either hand coding the HTML or using an editor such as Dreamweaver. The HTML that makes up the file manager itself is in the program code and you may require some knowledge of PHP to alter this although you should be able to change the fonts with only HTML knowledge. The look of the file manager has been designed to be very neutral so that it can easily slot into an existing web site without clashing with the existing colors. LICENSE This program is distributed under a GNU General Public License (GPL). Please read the GNU License file for more information about how you can distribute the program. This project was built on the original: QTOFileManager 1.0 http://www.qto.com/fm Author: Quentin O'Sullivan