Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

AutoIndex is a PHP script that makes a table that lists the files in a directory, and lets users access the files and subdirectories. It includes searching, icons for each file type, an admin panel, uploads, access logging, file descriptions, and more.

License

GPL-2.0, Unknown licenses found

Licenses found

GPL-2.0
LICENSE
Unknown
license.html
NotificationsYou must be signed in to change notification settings

BeitDina/AutoIndex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<title>AutoIndex PHP Script: Readme</title>

AutoIndex PHP Script (version 2.2.7) - Tutorial File original by Justin Hagstrom, edited by Florin Ciprian BodinOriginal AutoIndex is provided under the terms of theGNU General Public License (GPL) athttp://autoindex.sourceforge.net/  .

This edition of AutoIndex lists the files in a directory tree and now is mobile screen reversible  .

AutoIndex since 2001 is a standalone PHP script that makes table that lists the files in a directory, and lets users access the files and subdirectories. It includes searching, icons for each file type, an admin panel, uploads, access logging, file descriptions, and more. Now this version developed in collaboration withthe Beit Dina IT Unit was tested with PHP 5.3, 5.4, 5.5, 5.6, 7.1, 7.2, 7.3, 7.4 and is released with 35 languages packs.

Full Changelog:2.2.6...2.2.7

This release has 4 assets: Visit therelease page to download them.

DEMO: See PHP VERSION on Footer of the index page.

https://mxpcms.sourceforge.net/pub/

http://github.com/BeitDina/AutoIndex/
Please write any questions or comments atorynider@users.sourceforge.net .

To install simply upload the contents of this directory archive to a server with PHP support. Works with allversions of PHP with no DataBase required.
Then, point your browser to the index.php file in that folder. The first time you do this, it will take you to a configuration page.
To use all the default values, just click the button at the bottom, or customize it however you want.

On a live site at:http://beitdina.net/aleppo/  .

Information about the use of each variable is in this file.

base_dir is the folderthat will be the root of the directory listing.
This will be the starting point for the script. Nothing above thisdirectory can be viewed, but its subfolders can.
Make sure to use forward slashes, rather than backslashes. Also, try touse a relative path if possible.
Examples:

./(the folder index.php is in)
./sharefolder/(path relative to the php file)
/home/user/public_html/share_folder/(absolute path)

If you're using an absolute path, you'll need to setforce_download to TRUE (this is not recommended, though. It is betterto use a path relative to the php script).

icon_path is the path tothe icons. Don't put a slash at the end.
Leave this blank to not show icons to the left of files and folders.
Examples:

index_icons/winxp(relative to the php file)
/index_icons/kde(absolute path, relative to the server root)

stylesheet is the pathand filename of your css stylesheet.
Just modify the one that came with this, so it will match the rest ofyour site.
Examples:

stylesheet.css(stylesheet.css is in the same folder as the phpfile)
/some_folder/some_stylesheet.css(absolute path to the stylesheet)

Optional Variables :

Ifallow_uploads is setto TRUE, people will be able to upload files to your website.(Default:FALSE)
But ifuse_login_system is also set toTRUE, you must create an account for them before they can upload.
The preset users are:

username: admin
password: admin
 
username: test or user
password: test or testtest


If you plan to use the login system, change the passwords or createdifferent accounts and delete these!
All registered users will be able to upload, but only admins cancreate/delete accounts.
Also, if you want to allow uploads, make sure the folders you want toupload to are chmod'ed to allow PHP to write there.

user_list contains thepath to the text file where the usernames and encrypted passwords arestored.
Make sure the file is chmod'ed so PHP can read and write to it.
(This is only needed if use_login_system is set to TRUE.)

Ifallow_file_overwritesis set to TRUE, when uploading a file that already exists, the filewill be replaced.(Default: FALSE)
In other words, this will allow people to overwrite existing files byuploading new ones.
This variable only matters when allow_uploads is set to TRUE.

Ifmust_login_to_downloadis set to TRUE, users must login before they will see the list offiles.(Default: FALSE)
(They will not be able to download or browse through files withoutlogging in first.)
This variable only matters when use_login_system is set to TRUE.

banned_list contains thepath to the text file where blocked IP addresses and/or hostnames arestored.
This list can be edited by logging in as an administrator, or you candirectly edit the text file and add IP addresses and/or hostnames, eachon a new line.
You can use wildcards in the entries (*, ?, +).

Ifsub_folder_access isset to FALSE, folders will not be shown.(Default: TRUE)

index: Leave this blank unless you usephp includes on your webpage.
Make sure to put "ob_start();" and "session_start();" at the top ofyour index file. This will make sure headers are sent correctly.
Examples:

?id=AutoIndex
/file.php?id=thisFile

The include in your index file should look somethinglike this:

$valid = array('home', 'page1', 'page2');
if (isset($_REQUEST['id']) && in_array($_REQUEST['id'], $valid))
//if the id parameter in the URL is set, and it is in the 'valid' list
{
include($_REQUEST['id']); //include the file
}

hidden_files contains anarray of strings.
If a file or folder matches any of them, it will not be displayed.
They may contain wildcards (*, +, ?). For example, to hide all phpfiles, add '*.php' to the list, or if you want to hide all files thatbegin with a period, add '.*'

show_only_these_filescontains an array of strings.
If there are any items in the array, the hidden_files variable will bedisabled, and only files that are listed here will be shown.
They may contain wildcards (*, +, ?). For example, to show only .txtfiles, add '*.txt' to the list.

force_download should beset to TRUE or FALSE.(Default: FALSE)
If it is set to TRUE, the file will be automatically downloaded,instead of letting the person's browser decide.

bandwidth_limit is set tothe max download speed (per client) in KB/s. 0 will turn it off.
The number can contain a decimal if you want.
NOTE: To use this feature,force_download must be set to TRUE.

anti_leech should be setto TRUE or FALSE.(Default: FALSE)
This will compare the referrer and the name of your site to make surethey clicked on a link to download a file.
Setting this equal to TRUE will prevent "leeching" by making sure theydownload files directly from a link on your site.
Since some people turn off referrer sending in their browser, thisoption is not recommended.

enable_searching shouldbe set to TRUE or FALSE.(Default: TRUE)
If it is TRUE, people will be able to search for a file or foldercontaining a string.
It will search the folder you are currently in, and all subfolders.
Searching is not case sensitive.

Thelog_file contains thefull path to the file to write the access log.
Leave it blank to turn off logging.
The log file can be a local file, or on an FTP server.
If it's a local file on non-windows systems, make sure the log file ischmod'ed to allow PHP to write to the file.
Example:

./log.txt(the folder the php file is in)
/home/user/public_html/share_folder/sharefile.log(absolute path)
ftp://user:password@example.com/sharefile.txt(stored on ftp server)

dont_log_these_ipscontains an array of strings (which are IP addresses).
Any access from an IP on this list will not be written to the log file.
You can also add hostnames to the list, and use wildcards (*, +, ?).
(i.e. put your own IP in here so you don't fill up the log file whenyou access your site)

download_count contains astring which is the filename of the file to keep track of how manytimes files have been downloaded.
The file must be chmod'ed to allow PHP to read AND write to the file.
Leave blank to disable this feature.
NOTE: When downloading a file froman IP addresses in the dont_log_these_ips array, the count will NOTincrease.

links_file contains thepath to a text file with the URL of files that you want to be listed aslinks.
Separate each entry with a new line.
If you want, you can change how the links is displayed, by putting sometext after a pipe ('|')

http://autoindex.sourceforge.net | Main Site
http://autoindex.sourceforge.net/forum/ | Forum

To add issues about this mobile edition rewriten for the Institute IT Unit go to:https://github.com/BeitDina/AutoIndex/issues

If no link description is present, the link itself willbe displayed.
NOTE: This isn't really meant to bedone by hand - you can use the built-in editor when you log in as anadmin.

description_file containsthe path to a text file with descriptions for files.
The format is: [base_dir][full filename and path][a pipe,'|'][description for file]
Here's an example: ./sharefile.txt|This is a text file.
Separate each entry with a new line.
NOTE: This isn't really meant to bedone by hand: you can login as an admin and click "edit description"next to any file.

show_dir_size should beset to TRUE or FALSE.(Default: TRUE)
If it is set to TRUE, the total size of the folder will be shown undersize.
If it is FALSE, it will display "[dir]" under size.
NOTE: If you are trying to indexmany files (meaning a few thousand), you will notice a speedimprovement with this turned off.

folder_expansion shouldbe set to TRUE or FALSE.(Default: FALSE)
If it is set to TRUE, when you click on the folder icon, it will expandthe folder and list its contents.
Clicking on the folder name will take you into that folder.
If it is set to FALSE, both clicking on the icon and name will take youinto the folder.

show_folder_count shouldbe set to TRUE or FALSE.(Default: FALSE)
If it is TRUE, the total number of files in a folder will be shown nextto that folder.
Files are counted recursively (files in subfolders are counted).

header andfooterare the paths to 2 files.
The files must be text files (.html .txt .php , etc...)
Header will be displayed at the top, and footer will be displayed atthe bottom.
Leave blank to not include a file.

header_per_folder andfooter_per_foldershould be set to TRUE or FALSE.(Default: FALSE)
If they are FALSE, the header/footer will be taken from the absolute orrelative path in the header/footer variable.
If they are TRUE, the current directory will be added to the beginningof the file to be included. (don't add a path to the header/footervariables - just the filename)

days_new contains thenumber of days old a file can be and still have [New] written next toit.(Default: 0)
If it is set to 0, this feature will be disabled.
NOTE: this can contain any number,not just a 1 or 0 value, and it can contain a decimal if you want.

md5_show is a featurethat will let users get the md5sum of a specific file.(Default:0)
If set to 0 it will be disabled.
Otherwise, the number will represent the maximum file size (inmegabytes) to allow the md5sum to be calculated (I'd recommendsomething close to 10).
The number can contain a decimal if you want.
NOTE: PHP version 4.2.0+ (or higher) wasrequired for this feature to work and not is PHP 5.3+ (or higter).

thumbnail_height is afeature that will show thumbnails next to images. (NOTE: GDlib 2.0.1 orhigher is required)
Setting it to 0 will disable this feature, and setting it to any othernumber will set the size of the thumbnail.
(100 is a good setting to start with.)

show_type_column,show_size_column,andshow_date_column are set to TRUE orFALSE.
Setting them to TRUE will show the column, and setting it to FALSE willnot display the column.


Language Settings:

lang is the default language todisplay the script in.
The choices for language file names are listed below...
(Default: 'en')

lang settingLanguage
alAlbanian
bgBulgarian
caCatalan
czCzech
daDanish
deGerman
eeEstonian
enEnglish
eoEsperanto
esSpanish
fiFinnish
frFrench
grGreek
heHebrew
huHungarian
isIcelandic
itItalian
jpJapanese
koKorean
ltLithuanian
lvLatvian
msMalay
nlDutch
noNorwegian
plPolish
pt_BRBrazilian Portuguese
ro_RORomanian
ruRussian
skSlovak
sr_LASerbian (Latin)
sr_CYSerbian (Cyrillic)
svSwedish
thThai
trTurkish
viVietnamese
zh_CNChinese
zh_TWChinese Traditional

path_to_language_files isthe path where the *.php language files are located.
Default:./languages/

Ifselect_language is setto TRUE, there will be an option at the bottom of the script for
the user to choose which language the script is displayed in.(Default:FALSE)


Folder Flag Settings:

flag is the default language flag todisplay the short iso code folder.
Some choices for iso folder are listed below...
(Default: 'en_us')

lang settingLanguage
alAlbanian
bgBulgarian
caCatalan
czCzech
daDanish
de_DEGerman Germany
eeEstonian
en_UKEnglish UK
eoEsperanto
es_ESSpanish SPAIN
fiFinnish
frFrench
elGreek
heHebrew
huHungarian
isIcelandic
itItalian
jpJapanese
koKorean
ltLithuanian
lvLatvian
msMalay
nlDutch
noNorwegian
plPolish
pt_BRBrazilian Portuguese
ro_RORomanian
ruRussian
skSlovak
sr_LASerbian (Latin)
sr_CYSerbian (Cyrillic)
svSwedish
thThai
trTurkish
viVietnamese
zh_CNChinese
lzh or zh_TWChinese Traditional

path_to_flag_files isthe path where the *.png language flag images are located.
Default:./flags/language/

Ifselect_language is setto TRUE, there will be an option at the bottom of the script for
the user to choose which language the script is displayed in.(Default:FALSE)



[8]ページ先頭

©2009-2025 Movatter.jp