Outline and Setup
Back
Filename: files20.tgz Software Name: Files Ver.2.0 (WEB File share PHP scripts) Copyright holder: Technoworks Co. Ltd. http://www.technoworks.co.jp Last Update: 2007/09/05 Outline: This program is PHP script to offer file-sharing capabilities on by the WEB server that can use PHP4. Feature: Up-loading and the download of the file can be done by making the shared folder for the WEB server, and using a browser from the client. The subfolder of two or more hierarchies can be able to be made in the shared folder of the server, to delete the file, and to do the comment edit of the file. Functions such as the cutout of the file, the copies, and putting are offered by using the cutting buffer. Two or more shared folders according to the user can be managed. Each shared folder can have an independent first folder, and neither the reference nor the file copy, etc. be done between folders each other. The user's registration is separately done. It is assumed that the size uses it in having appended it to mail when the file is handed over in the environment for which the FTP and SSH, etc. cannot be used in the case of largeness. The MD5 hush is used for the attestation when logging it in. MD5 hushes of session ID and the password of PHP are combined, and it encrypts it by the method of putting it on the MD5 hush function further. System requirements: It verifies it only by combining Linux+Apache+PHP5. (If it is HTTP server that can use PHP4 or more, it is likely to be able to use it.) JavaScript's operating becomes the condition of the client because it uses JavaScript for the login processing and the switch processing on the page. The operation verification is done in the following environments. Server: Fedora Core 5 + Apache 2.2.2 + php 5.1.6 Fedora Core 7 + Apache 2.2.4 + php 5.2.2 Client: WindowsXP Pro + InternetExplorer6 WindowsXP Pro + InternetExplorer7 WindowsXP Pro + Firefox 2.0.0.6 Preparation: PHP can be used by the WEB server. It should be set that the place where the shared folder is made finishes writing it from the WEB server. (It makes it to can write it by HTTP Server User.) The file can be up-loaded in PHP. Example of set item of /etc/php.ini file_uploads = On --> Indispensability upload_max_filesize = 10M --> Size of the maximum up-loading file post_max_size = 10M --> It influences the size of the up-loading file. Install: Arcaiv is developed with the directory that the HTTP server is accessible, and the PHP script is executable. The directory named filesXX (XX is a version number) is made, and the script file is progressed in that. ex: tar zxvf filesXX.tgz (XX is a version number) Upgrade: The method of the version's improving overwrites existing script files other than the configuration file and the password file. The configuration file must add only the addition item to an existing configuration file or use the change in the content of an existing configuration file set for a new configuration file in addition. The content of the folder for data need not change. In default, the character-code used is UTF-8. When operating it with EUC-JP, Shift_JIS or us-ascii. Please replace locale.php, files.conf, and manual under filesXX with the file in directory (euc-jp,shift-jis or us-ascii) according to each character under filesXX/locale set (In that case, please reflect the content of existing installation file files.conf for remembrance' sake.) File composition: (XX of filesXX is a version number.) filesXX/ Script storage directory README.txt This file confmenu.php Shared folder setting menu cut.php Cutting and copy processing of file or folder delconf.php Shared folder deletion processing delete.php Deletion processing of file or folder dirlist.php Shared folder list screen download.php Download processing of file edit.php Name, comment, and attribute edit of file or folder files.conf Configuration file for management (The character-code of default is UTF-8.) files.php List screen of file and folder in shared folder files_com.php Common subroutine file group.php User and group setting processing icon_img.php File of definition of icon image of file When add the icon of the file, edit this file. index.php Page for entrance to shared folder (It jumps to login.php.) locale.php CConfiguration file of character string according to character-code (The character-code of default is UTF-8.) login.php Login processing md5hash.js MD5 hush function JavaScript mkdir.php Folder making processing in shared folder modconf.php Set update processing of made shared folder newconf.php Making processing of shared folder passwd Password file for management passwd.php Password setting processing paste.php Paste processing of file or folder session.php Subroutine for session establishment and continuance upload.php Up-loading processing of file filesXX/config/ Directory for storage of shared folder configuration file. (It is revokable in the setting.) filesXX/data/ Directory for shared folder and data storage. (It is revokable in the setting.) filesXX/images/ Image file storage directory back.png Background image bmp.png Icon of bit map file copy.png Copy icon cut.png Cut icon delete.png Delete icon edit.png Edit icon excel.png Icon of Excel data file folder.png Folder icon gif.png Icon of GIF image file html.png Icon of HTML file lzh.png Icon of LZH compression file mail.png Icon of OutlookExpress data (.eml) file movie.png Icon of movie file paste.png Paste icon pdf.png Icon of PDF file sound.png Icon of MIDI file text.png Icon of text file title.png Title image (Default is an image of Technoworks.) unknown.png Icon of uncertain kind file up.png Upper folder icon wav.png Icon of sound file word.png Icon of word document file wordpad.png Icon of word pad document file filesXX/locale/ Directory that stores file according to character-code euc-jp/ Directory where character-code stored file of EUC-JP. When the character-code used with the system is EUC-JP, the file in this is copied onto the filesXX right under in the superscription. locale.php Configuration file of character string according to character-code (EUC-JP version) (Overwrite onto filesXX/locale.php.) files.conf Configuration file for management (EUC-JP version) (Overwrite onto filesXX/files.conf.) manual/ Manual storage directory (EUC-JP version) (Overwrite onto filesXX/manual.) folder_manual.html Operation explanation of shared folder. index.html Help menu kanri_manual.html Operation explanation of management screen. readme.html Outline and setup utf-8/ Directory where character-code stored file of UTF-8. When the character-code used with the system is UTF-8, the file in this is copied onto the filesXX right under in the superscription. locale.php Configuration file of character string according to character-code (UTF-8 version) (Overwrite onto filesXX/locale.php.) files.conf Configuration file for management (UTF-8 version) (Overwrite onto filesXX/files.conf.) manual/ Manual storage directory (UTF-8 version) (Overwrite onto filesXX/manual.) folder_manual.html Operation explanation of shared folder. index.html Help menu kanri_manual.html Operation explanation of management screen. readme.html Outline and setup shift-jis/ Directory where character-code stored file of ShiftJIS. When the character-code used with the system is Shift- JIS, the file in this is copied onto the filesXX right under in the superscription. locale.php Configuration file of character string according to character-code (Shift-JIS version) (Overwrite onto filesXX/locale.php.) files.conf Configuration file for management (Shift-JIS version) (Overwrite onto filesXX/files.conf.) manual/ Manual storage directory (Shift-JIS version) (Overwrite onto filesXX/manual.) folder_manual.html Operation explanation of shared folder. index.html Help menu kanri_manual.html Operation explanation of management screen. readme.html Outline and setup us-ascii/ Directory where character-code stored file of US-ASCII. When the character-code used with the system is US- ASCII, the file in this is copied onto the filesXX right under in the superscription. locale.php Configuration file of character string according to character-code (US-ASCII version) (Overwrite onto filesXX/locale.php.) files.conf Configuration file for management (US-ASCII version) (Overwrite onto filesXX/files.conf.) manual/ Manual storage directory (US-ASCII version) (Overwrite onto filesXX/manual.) folder_manual.html Operation explanation of shared folder. index.html Help menu. kanri_manual.html Operation explanation of management screen. readme.html Outline and setup. filesXX/manual/ Manual storage directory(Default is the UTF-8 edition.) folder_manual.html Operation explanation of shared folder. index.html Help menu kanri_manual.html Operation explanation of management screen. readme.html Outline and setup. Initialization: files.conf in the developing folder is a basic configuration file. The configuration file sets the item of one a line by the composition like key wordvalue. We will recommend CONFIG_TOP_URL to change according to the environment of the server used though it is possible to use even like initialization. Link URL is correctly written when it is not a relative mark and it makes it to the mark absolutely because this item value is used to link URL of the display on the file list screen. The character-code of default is Japanese UTF-8. Please use the file according to the character-code under filesXX/locale for the character-code that each system is using additionally after copying the superscription onto filesXX or less. How to use: In the setting when developing, a set directory of the shared folder is made in the config directory in the directory that can have been done by developing. The first folder is made below the data directory right under the directory to which the shared folder that puts actual data progresses, too. URL and passing under the explanation are described assuming that the script is progressed right under DocumentRoot of the WEB server. 1) Making of shared folder First of all, it connects it with http://Server-Address/files20/index.php by using a browser from the client. Because the login screen is displayed, admin is input in user ID, nimda is input to the password, and it logs it in. (The manager of default gets to nimda the setting of the admin password.) The password is set here because it becomes a management screen when logging it in. Please change the password because admin is a privileged user. In the shared folder list, the list of the made shared folder is displayed. The folder list is a link to the folder that becomes an object. It changes in the setting and the deletion also is linked with the screen here. In the shared folder making, the shared folder is newly made. A set name of the shared folder becomes the storage directory name of the configuration file. The first directory of the folder actually shared is specified for the first folder. The WEB server should be accessible, and set the first folder to the place that can be written. The first directory is done by the relative path from the directory in the script in specification or the full path. You might specify the directory that doesn't exist under the management of the WEB server, considering security for the first folder because it came to be able to specify it from this version even by the directory that cannot be referred directly with URL. When the folder under the management of the WEB server is specified, the following content in the directory for data. You will put the htaccess file, and do measures of the acceptance only of the access from the link on the page after specification URL etc. SetEnvIf REFERER "^http://www\.example\.com" ref_ok Order deny,allow deny from all allow from env=ref_ok (The above-mentioned is a description for Apache.) Additionally, please set it suitably. The directory of the same name as a set name is made under config of the progressing directory when the shared folder is made, and the configuration file and the password file are written in that. The configuration file name becomes .conf. The content that can be edited on a set screen is only a part of very item of the configuration file. Because the configuration file can be edited in the editor, other detailed items are edited in the editor. I temporarily think that it can use it only by setting the above-mentioned. When the shared folder is made, the shared folder list screen is opened. A set name of the shared folder list screen or URL is a link of the shared folder to the login screen. 2) Operation of shared folder: The name or URL of the made folder is selected from the list screen. It logs it in here with user ID = admin and password = nimda because it jumps to the login screen to the made shared folder. (Please change the password of admin after it logs it in.) The screen of the file list that is basic of the operation of the shared folder is displayed. The link of "Make Folder", "Upload", and "Password Setting" to each function is displayed in the upper part of this screen. The subfolder is made by "Make Folder", and the file is up-loaded from the client by "Upload". The movement to the made folder selects the icon of the folder name or the destination head. The movement from the lower folder to a upper folder selects the name of a upper folder of the first line or the arrow icon. The name of the up-loaded file is displayed as a link in the list. This link is selected and it downloads it to the client when downloading it. The comment is edited, is deleted, and copied, and it cuts out and the icon on the side of file name is selected. 3) Edit of configuration file: The character-code of the configuration file is described by the character- code used with the system, and changing line uses only LF. A set item is describes one item a line, and the following forms. keyword value1 value2 value3 TThe key word begins from the head of line, and the delimitation with the value is delimited with Tab. Do not put two or more Tab in the delimitation. Set value2 and set value3 are by the kind of the key word and there is a no potato, too. The line where "#" is at the head is a comment. The item of the configuration file is written at the head of the configuration file by the comment, and refer to that, please. Use regulations: 1) Use conditions In the use of individual use and a non-profit-making purpose, it is possible to use it free of charge. Use in the enterprise is also possible if it doesn't obtain an advantage directly with this software. 2) About the distribution The re-distribution in the state that is edited and not remodeled is free. 3) About the edit and remodeling The change and remodeling can do freely, and when the one to have made a change is distributed again, should include the document that described the content of the change clearly in distributed material. However, the edit of the part concerning copyright information is assumed to be no permission. An entire part of the source code of this software cannot be used for other software without permission. 4) Exemption matters Our company doesn't assume the responsibility for it at all even if it is assumed that the user received some disadvantages by having used this software. Please use it by the self-responsibility. 5) About the bug and the demand I hope about the bug and the demand in E-mail. However, it is not a thing that the reflection of the bug correction and the demand is guaranteed. To fill in comments or opinions, the bulletin board was set up. URL: http://www.technoworks.co.jp/forum/forum.php Copyright information: The Technoworks Co., Ltd. has the copyright of this software. This software is protected by a Japanese country Copyright Law and an international agreement. Please note becoming the infringement of a copyright when it violates the use regulations and it uses, and it distributes it though it is permitted to use it within the range of the use regulations. Where to make contact: Technoworks Co., Ltd. webmaster@technoworks.co.jp Update history: Ver.1.0.0 2004/04/27 First edition Ver.1.0.1 2004/05/12 The size specification of Table is changed from fixed-size (pixel) specification to relative size (percent) specification. Help is added. Ver.1.0.2 2004/05/18 Get_post_get_val() of files_com.php is corrected and it deals with the escape by the backing slash. Ver.1.0.3 2004/05/23 Because JavaScript of the MD5 hush making doesn't operate correctly by a browser on MacOS. It is corrected that use conditions and MD5_PASSWD_USE of MD5 can be added to the configuration file, and three kinds (YES, NO, and NO_MAC) be set as a value. Ver.1.0.4 2005/08/02 The icon definition file of the file is cut out to another file, and the edit method is added by the comment. (Because the icon addition was demanded. ) The description of the download method was added to help. It is corrected that the superscription is confirmed when file up-loading it. It is corrected that it makes it to the one that manager's default password was specified by not the blank but the configuration file. In default, it is the following settings. Manager user ID : admin Manager password: nimda Ver.2.0 2007/09/05 To change by correcting only locale.php in the displayed character string, the display character string was separated to locale.php as an array. The displayed character string acquisition is corrected to do by using get_txt(). Add the permission setting function to use the group and the user. To use not the link but the download script, the method of downloading the file was changed. (As a result, downloading it even if the data folder was not the under of the management of the WEB server became possible.) The script had in the configuration file and all users had reading and writing can enabled the permission of the made file.(PERMIT_ALL=YES) The configuration file was prepared according to the character-code. The directory for the file that depended on the character-code for the filesXX/locale under was prepared, and the configuration file for four kinds of character-codes of euc-jp, utf-8, shift-jis, and us-ascii was prepared.