################################################################################ # #### ##### ### #### # # ##### # # # # # # # # ## ## # # #### #### ##### # # # # # #### # # # # # # # # # # # # # # ##### # # #### # # ##### ################################################################################ /* Author : David Wan Contact : inventordavid@yahoo.com (Email, Msn) davidwan@enapro.com -------------------------------------------------------------------------------- Introduction -------------------------------------------------------------------------------- Application Name : Simple Directory Listing Size : ~130 KBs Version : 1.00.001 Last Modified : 2006-08-16 License : GNU GENERAL PUBLIC LICENSE Web Site : http://enapro.com/simpledirectorylisting http://sourceforge.net/projects/simpledirectory File Created on : Thursday, 27 July, 2006, 12:37:40 +0800 Simple Directory Listing is a single file php script which functions as directory listing in an apache http server. It has a similar interface as directory list in an apache http server, however, it provides more common and useful functions and features : - Delete files or folders which are not necessary to be empty - Move directories - Copy directories to another folder - Rename directories - Chmod directories and all their subdirectories - Compress files or folders as a compressed archive - Download a script file - Download a folder as a compressed archive - Read/Edit files - MD5/SHA1/CRC32 a file - Create an empty file/folder - Upload files by http - .htaccess wizard (password protection, prevent hotlinking of pictures, etc) - Add a page description for a folder - Set a particular folder as a "virtual root" for directory listing - Set time offset for last modification time of files - No Javascript at all - Multi languages + English + Chinese - Unicode supported - ...... I am sorry that the programming skill in that script is very poor. I will keep on improving the codes. :) Thanks very much for using Simple Directory Listing! -------------------------------------------------------------------------------- Installation Steps / How to Use : -------------------------------------------------------------------------------- Important Notes Before You Start : - Do not implement this application as a directory listing application with full access mode to the public. Set a password (please refer to your server setting) for the folder containing this application if you allow full access to it without logging in. - Use this application at your own risk. - Modifying the code in this application may lead to some serious security holes if you are not an advanced programmer(although I am not :) ). - Never expose your entire server content to the public. Installation Steps : [1] Configuration - Use an text editor to open the php file of this application. - Write your own username and password in $cfg['username'] and $cfg['password']. - $cfg['password'] can be a sha1 code of your password. - Execute the php file with $cfg['username']="" and $cfg['password']="" would show an installation page where you may sha1 your password. Copy the hashcode and assign it to $cfg['password']. $cfg['password'] would be treated as a sha1 code if it is longer than 20 characters or it would be treated as a raw password without doing a sha1 process to check it. - Modify $cfg['cookie'] to true if you want to have a "remember me" function saving your identity in cookies. - Assign false to $cfg['access'] whenever you want to disable the application. [2] Using the Application - Check System Requirement below. - Make sure your server can run php script. - Open the php file of this application in your browser. - Browse the page as you browse a normal apache directory listing page. - Explore the functions yourself! - Read FAQ to learn more of this application. Questions/Bugs : - I have questions about this application! + Please read the FAQ section below. + Please read the forum in the official site. + Ask in the forum. + Feel free to contact me. - I have found bugs! + Report the bugs in the bug reporting page in the official site. + Feel free to contact me. System Requirement : - Latest version of PHP 4.x + (optional)with session support to use enable login + GZip support, (optional)Bzip2 - Web Browser + (optional)with cookies enabled to use "remember me" - (optional)Apache Server + .htaccess support -------------------------------------------------------------------------------- The Program Flow : -------------------------------------------------------------------------------- main() | validateconfig() validateaccess() getarg() validategetpostarg() limitguest() printout() | pathmain() printout_header() directorylistarraytakeaway() printout_directorylist() printout_currentdirfunction() = There are few places that would check for guest mode : validateaccess() for $cfg['access']==='guest' limitguest() for $cfg['access']==='guest' printout() for argarray['action']==='guest' printout_header() for argarray['action']==='guest' printout_directorylist() for argarray['action']==='guest' -------------------------------------------------------------------------------- License : -------------------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - This free and opensource application is distributed under the GNU GENERAL PUBLIC LICENSE (Version 2, June 1991). - This is an opensource application, but please read the license of it. - Please refer to an attached file in this package for the detail of the license. - Links of the License : + http://www.gnu.org/licenses/gpl.html + http://www.gnu.org/licenses/gpl.txt -------------------------------------------------------------------------------- FAQ / Bugs : -------------------------------------------------------------------------------- [1] General : - [1.1] What is this application about? + To provide a simple directory listing application with many common functions in a directory explorer. - [1.2] Is it free to use? + Yes. - [1.3] May I use it in my business? + Generally yes. Please read the license. - [1.4] Why do you create it? + To create a better version of the original apache directory listing. - [1.5] Is it secure? + Hard to say. It would be safe if you put the script in a password protected folder. - [1.6] This application is useful to me. How do I help? + You may make a donation which would be greatly appreciated. + You may try to help to answer messages in the forum. + You may report errors/bugs to me or suggest some ideas on improving it. - [1.7] Where can I get the latest version of this application? + http://enapro.com/simpledirectorylisting + http://sourceforge.net/projects/simpledirectory [2] Installation/Configuration : - [2.1] How to install this application? + Set your username and password in the configuration part of the file. - [2.2] Does it need SQL support? + No. - [2.3] What version of PHP does it require? + PHP 4.3. - [2.4] I want a "login" button in the guest mode. How to do it? + This extra mode is not supported. However, you may upload two files of this script giving them different filenames and set one to guest mode and the other one to login mode. The user should browse the script set to login mode. Guests who are only allowed to read should go to the script set to guest mode. [3] Usgae : - [3.1] Browse : - [3.1.1] How to sort the directory list? + Click on the headers. - [3.1.2] How to go to a parent directory? + Click on the name Parent Directory. - [3.1.3] How to sort in a order that would show folders first? + Click on the arrow pointing download near the header of name. - [3.2] Functions : - [3.2.1] What do the icons in the function column mean? + Place your mouse cursor on each icon to have a check. - [3.2.2] Can I delet a folder which has files in it? + Yes. There will be a recursive deletion to do it. [3] Bugs : - [4.1] What the "duck"(WTF)! There are many bugs. + Please report them in the bug reporting page or forum or contact me. -------------------------------------------------------------------------------- Release Notes : -------------------------------------------------------------------------------- 2006-08-16 : - Release of Version 1.00.001 - First release to the public -------------------------------------------------------------------------------- Contact / Support: -------------------------------------------------------------------------------- Author : My name is David Wan. I write programmes in C++, Java, PHP. I do not want to talk too much about myself here. If you want to know more about me, please contact me. :) Contact of Author : - Email : + inventordavid@yahoo.com + davidwan@enapro.com - Web Site : + http://enapro.com/simpledirectorylisting + http://sourceforge.net/projects/simpledirectory - IRC : + irc://irc.freenode.net/simpledirectorylisting Donations : You can support development of Simple Directory Listing by donating. Should you have any queries about donation, please contact me. - PayPal : + inventordavid@yahoo.com + https://sourceforge.net/donate/index.php?group_id=174949 - Contact me if you do not have a PayPal account: + inventordavid@yahoo.com -------------------------------------------------------------------------------- Reference : -------------------------------------------------------------------------------- - Compress + http://www.zend.com/zend/spotlight/creating-zip-files2.php + http://www.zend.com/zend/spotlight/creating-zip-files3.php?article=creating- zip-files3&kind=sl&id=1012&open=1&anc=0&view=1#notes + http://www.weberdev.com/get_example-4066.html + http://www.phpmyadmin.net/home_page/index.php - Directory Listing + http://sourceforge.net/projects/webfilebrowser + http://evoluted.net/community/code/directorylisting.php + Apache Directory Listing GUI - General PHP + http://us2.php.net/manual/en/ + irc://irc.freenode.net/php - htaccess + http://www.clockwatchers.com/htaccess_tool.html + http://www.i-webhk.com/go.php?tt=bs05&id=1 + http://www.phpdc.com/article/14/ - HTML + http://www.htmlcodetutorial.com - Icons + Apache Server - Translations + http://www.kanhan.com/tdc/tools3.html */