Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?xml version="1.0" encoding="iso-8859-1"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
<head>
5
	<style type="text/css" title="AutoIndex Default">
6
		@import "stylesheet.css";
7
		td, th
8
		{
9
			border: 1px solid;
10
		}
11
	</style>
12
	<title>AutoIndex PHP Script: Readme</title>
13
</head>
14
 
15
<body class="autoindex_body">
16
 
17
<table width="100%" border="0" cellpadding="5" cellspacing="0">
18
<tr class="paragraph"><td class="default_td">
19
 
20
<p>
21
	<strong>AutoIndex PHP Script (version 1.5.2) - Help File
22
	<br />by Justin Hagstrom</strong> &lt;JustinHagstrom [at] yahoo [dot] com&gt;
23
	<br /><span class="small">AutoIndex is provided under the terms of
24
	the <a class="default_a" href="license.html">GNU General Public License (GPL)</a>.</span>
25
</p>
26
<p>
27
	<a class="default_a" href="http://autoindex.sourceforge.net/">http://autoindex.sourceforge.net/</a>
28
	<br />Please post any questions or comments in the
29
	<a class="default_a" href="http://autoindex.sourceforge.net/forum/">forum</a>.
30
</p>
31
<p>
32
	To install and run the script, simply upload the contents of this
33
	directory to a server with PHP support (Works with all versions of
34
	PHP4 and PHP5).
35
 
36
	<br />Then, point your browser to the index.php file in that folder. The
37
	first time you do this, it will take you to a configuration page.
38
 
39
	<br />To use all the default values, just click the button at the bottom,
40
	or customize it however you want.
41
 
42
	<br />Information about the use of each variable is in this file.
43
</p>
44
<p>
45
	&nbsp;
46
</p>
47
 
48
<hr class="default_hr" />
49
 
50
<p>
51
	&nbsp;
52
</p>
53
<p>
54
	<strong>base_dir</strong> is the folder that will be the root of the directory listing.
55
	<br />This will be the starting point for the script. Nothing above this directory can be viewed, but its subfolders can.
56
	<br />Make sure to use forward slashes, rather than backslashes. Also, try to use a relative path if possible.
57
	<br />Examples:
58
</p>
59
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border: 1px solid; border-color: #111111;">
60
 <tr class="paragraph">
61
  <td><span class="fixed_width">./</span></td>
62
  <td>(the folder index.php is in)</td>
63
 </tr>
64
 <tr class="paragraph">
65
  <td><span class="fixed_width">./some folder/</span></td>
66
  <td>(path relative to the php file)</td>
67
 </tr>
68
 <tr class="paragraph">
69
  <td><span class="fixed_width">/home/user/public_html/some_folder/</span></td>
70
  <td>(absolute path)</td>
71
 </tr>
72
</table>
73
<p>
74
	If you're using an absolute path, you'll need to set force_download to TRUE (this is not recommended, though. It is better to use a path relative to the php script).
75
</p>
76
<p>
77
	&nbsp;
78
</p>
79
<p>
80
	<strong>icon_path</strong> is the path to the icons. Don't put a slash at the end.
81
	<br />Leave this blank to not show icons to the left of files and folders.
82
	<br />Examples:
83
</p>
84
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color: #111111;" >
85
 <tr class="paragraph">
86
  <td><span class="fixed_width">index_icons/winxp</span></td>
87
  <td>(relative to the php file)</td>
88
 </tr>
89
 <tr class="paragraph">
90
  <td><span class="fixed_width">/index_icons/kde</span></td>
91
  <td>(absolute path, relative to the server root)</td>
92
 </tr>
93
</table>
94
<p>
95
	&nbsp;
96
</p>
97
<p>
98
	<strong>stylesheet</strong> is the path and filename of your css stylesheet.
99
	<br />Just modify the one that came with this, so it will match the rest of your site.<br />
100
	Examples:
101
</p>
102
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse;  border-color: #111111;">
103
 <tr class="paragraph">
104
  <td><span class="fixed_width">stylesheet.css</span></td>
105
  <td>(stylesheet.css is in the same folder as the php file)</td>
106
 </tr>
107
 <tr class="paragraph">
108
  <td><span class="fixed_width">/some_folder/some_stylesheet.css</span></td>
109
  <td>(absolute path to the stylesheet)</td>
110
 </tr>
111
</table>
112
<p>
113
	&nbsp;
114
</p>
115
 
116
<hr class="default_hr" />
117
 
118
<p>
119
	<strong>Optional Variables</strong> :
120
</p>
121
<p>
122
	&nbsp;
123
</p>
124
<p>
125
	If <strong>allow_uploads</strong> is set to TRUE, people will be able to upload files to your website. <em>(Default: FALSE)</em>
126
	<br />But if <strong>use_login_system</strong> is also set to TRUE, you must create an account for them before they can upload.
127
	<br />The preset users are:
128
	</p><p><span class="fixed_width">
129
		username: admin
130
		<br />password: admin
131
		<br />&nbsp;
132
		<br />username: test
133
		<br />password: test
134
	</span></p><p>
135
	<br />If you plan to use the login system, change the passwords or create different accounts and delete these!
136
	<br />All registered users will be able to upload, but only admins can create/delete accounts.
137
	<br />Also, if you want to allow uploads, make sure the folders you want to upload to are chmod'ed to allow PHP to write there.
138
</p>
139
<p>
140
	&nbsp;
141
</p>
142
<p>
143
	<strong>user_list</strong> contains the path to the text file where the usernames and encrypted passwords are stored.
144
	<br />Make sure the file is chmod'ed so PHP can read and write to it.
145
	<br />(This is only needed if use_login_system is set to TRUE.)
146
</p>
147
<p>
148
	&nbsp;
149
</p>
150
<p>
151
	If <strong>allow_file_overwrites</strong> is set to TRUE, when uploading a file that already exists, the file will be replaced. <em>(Default: FALSE)</em>
152
	<br />In other words, this will allow people to overwrite existing files by uploading new ones.
153
	<br />This variable only matters when allow_uploads is set to TRUE.
154
</p>
155
<p>
156
	&nbsp;
157
</p>
158
<p>
159
	If <strong>must_login_to_download</strong> is set to TRUE, users must login before they will see the list of files. <em>(Default: FALSE)</em>
160
	<br />(They will not be able to download or browse through files without logging in first.)
161
	<br />This variable only matters when use_login_system is set to TRUE.
162
</p>
163
<p>
164
	&nbsp;
165
</p>
166
<p>
167
	<strong>banned_list</strong> contains the path to the text file where blocked IP addresses and/or hostnames are stored.
168
	<br />This list can be edited by logging in as an administrator, or you can directly edit the text file and add IP addresses and/or hostnames, each on a new line.
169
	<br />You can use wildcards in the entries (*, ?, +).
170
</p>
171
<p>
172
	&nbsp;
173
</p>
174
<p>
175
	If <strong>sub_folder_access</strong> is set to FALSE, folders will not be shown. <em>(Default: TRUE)</em>
176
</p>
177
<p>
178
	&nbsp;
179
</p>
180
<p>
181
	<strong>index: Leave this blank unless you use php includes on your webpage.</strong>
182
	<br />Make sure to put "ob_start();" and "session_start();" at the top of your index file. This will make sure headers are sent correctly.
183
	<br />Examples:
184
</p>
185
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color: #111111;">
186
 <tr class="paragraph">
187
  <td><span class="fixed_width">?id=AutoIndex</span></td>
188
 </tr>
189
 <tr class="paragraph">
190
  <td><span class="fixed_width">/file.php?id=thisFile</span></td>
191
 </tr>
192
</table>
193
<p>
194
	The include in your index file should look something like this:
195
</p>
196
<pre>
197
if (isset($_REQUEST['id']) &amp;&amp; strpos($_REQUEST['id'], '/') === false)
198
//if the id parameter in the URL is set, and it doesn't contain any slashes
199
{
200
	include($_REQUEST['id']); //include the file
201
}
202
</pre>
203
<p>
204
	&nbsp;
205
</p>
206
<p>
207
	<strong>hidden_files</strong> contains an array of strings.
208
	<br />If a file or folder matches any of them, it will not be displayed.
209
	<br />They may contain wildcards (*, +, ?). For example, to hide all php files, add '*.php' to the list, or if you want to hide all files that begin with a period, add '.*'
210
</p>
211
<p>
212
	&nbsp;
213
</p>
214
<p>
215
	<strong>show_only_these_files</strong> contains an array of strings.
216
	<br />If there are any items in the array, the hidden_files variable will be disabled, and only files that are listed here will be shown.
217
	<br />They may contain wildcards (*, +, ?). For example, to show only .txt files, add '*.txt' to the list.
218
</p>
219
<p>
220
	&nbsp;
221
</p>
222
<p>
223
	<strong>force_download</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
224
	<br />If it is set to TRUE, the file will be automatically downloaded, instead of letting the person's browser decide.
225
</p>
226
<p>
227
	&nbsp;
228
</p>
229
<p>
230
	<strong>bandwidth_limit</strong> is set to the max download speed (per client) in KB/s. 0 will turn it off.
231
	<br />The number can contain a decimal if you want.
232
	<br /><strong>NOTE</strong>: To use this feature, force_download must be set to TRUE.
233
</p>
234
<p>
235
	&nbsp;
236
</p>
237
<p>
238
	<strong>anti_leech</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
239
	<br />This will compare the referrer and the name of your site to make sure they clicked on a link to download a file.
240
	<br />Setting this equal to TRUE will prevent "leeching" by making sure they download files directly from a link on your site.
241
	<br />Since some people turn off referrer sending in their browser, this option is not recommended.
242
</p>
243
<p>
244
	&nbsp;
245
</p>
246
<p>
247
	<strong>enable_searching</strong> should be set to TRUE or FALSE. <em>(Default: TRUE)</em>
248
	<br />If it is TRUE, people will be able to search for a file or folder containing a string.
249
	<br />It will search the folder you are currently in, and all subfolders.
250
	<br />Searching is not case sensitive.
251
</p>
252
<p>
253
	&nbsp;
254
</p>
255
<p>
256
	The <strong>log_file</strong> contains the full path to the file to write the access log.
257
	<br />Leave it blank to turn off logging.
258
	<br />The log file can be a local file, or on an FTP server.
259
	<br />If it's a local file on non-windows systems, make sure the log file is chmod'ed to allow PHP to write to the file.
260
	<br />Example:
261
</p>
262
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color: #111111;">
263
 <tr class="paragraph">
264
  <td><span class="fixed_width">./log.txt</span></td>
265
  <td>(the folder the php file is in)</td>
266
 </tr>
267
 <tr class="paragraph">
268
  <td><span class="fixed_width">/home/user/public_html/some_folder/somefile.log</span></td>
269
  <td>(absolute path)</td>
270
 </tr>
271
 <tr class="paragraph">
272
  <td><span class="fixed_width">ftp://user:password@example.com/somefile.txt</span></td>
273
  <td>(stored on ftp server)</td>
274
 </tr>
275
</table>
276
<p>
277
	<strong>dont_log_these_ips</strong> contains an array of strings (which are IP addresses).
278
	<br />Any access from an IP on this list will not be written to the log file.
279
	<br />You can also add hostnames to the list, and use wildcards (*, +, ?).
280
	<br />(i.e. put your own IP in here so you don't fill up the log file when you access your site)
281
</p>
282
<p>
283
	&nbsp;
284
</p>
285
<p>
286
	<strong>download_count</strong> contains a string which is the filename of the file to keep track of how many times files have been downloaded.
287
	<br />The file must be chmod'ed to allow PHP to read AND write to the file.
288
	<br />Leave blank to disable this feature.
289
	<br /><strong>NOTE</strong>: When downloading a file from an IP addresses in the dont_log_these_ips array, the count will NOT increase.
290
</p>
291
<p>
292
	&nbsp;
293
</p>
294
<p>
295
	<strong>links_file</strong> contains the path to a text file with the URL of files that you want to be listed as links.
296
	<br />Separate each entry with a new line.
297
	<br />If you want, you can change how the links is displayed, by putting some text after a pipe ('|')
298
	</p><p><span class="fixed_width">
299
		http://autoindex.sourceforge.net|Main Site
300
		<br />http://autoindex.sourceforge.net/forum/|Forum
301
	</span></p><p>
302
	If no link description is present, the link itself will be displayed.
303
	<br /><strong>NOTE</strong>: This isn't really meant to be done by hand - you can use the built-in editor when you log in as an admin.
304
</p>
305
<p>
306
	&nbsp;
307
</p>
308
<p>
309
	<strong>description_file</strong> contains the path to a text file with descriptions for files.
310
	<br />The format is: [base_dir][full filename and path][a pipe, '|'][description for file]
311
	<br />Here's an example: ./somefile.txt|This is a text file.
312
	<br />Separate each entry with a new line.
313
	<br /><strong>NOTE</strong>: This isn't really meant to be done by hand: you can login as an admin and click "edit description" next to any file.
314
</p>
315
<p>
316
	&nbsp;
317
</p>
318
<p>
319
	<strong>show_dir_size</strong> should be set to TRUE or FALSE. <em>(Default: TRUE)</em>
320
	<br />If it is set to TRUE, the total size of the folder will be shown under size.
321
	<br />If it is FALSE, it will display "[dir]" under size.
322
	<br /><strong>NOTE</strong>: If you are trying to index many files (meaning a few thousand), you will notice a speed improvement with this turned off.
323
</p>
324
<p>
325
	&nbsp;
326
</p>
327
<p>
328
	<strong>folder_expansion</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
329
	<br />If it is set to TRUE, when you click on the folder icon, it will expand the folder and list its contents.
330
	<br />Clicking on the folder name will take you into that folder.
331
	<br />If it is set to FALSE, both clicking on the icon and name will take you into the folder.
332
</p>
333
<p>
334
	&nbsp;
335
</p>
336
<p>
337
	<strong>show_folder_count</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
338
	<br />If it is TRUE, the total number of files in a folder will be shown next to that folder.
339
	<br />Files are counted recursively (files in subfolders are counted).
340
</p>
341
<p>
342
	&nbsp;
343
</p>
344
<p>
345
	<strong>header</strong> and <strong>footer</strong> are the paths to 2 files.
346
	<br />The files must be text files (.html .txt .php , etc...)
347
	<br />Header will be displayed at the top, and footer will be displayed at the bottom.
348
	<br />Leave blank to not include a file.
349
</p>
350
<p>
351
	&nbsp;
352
</p>
353
<p>
354
	<strong>header_per_folder</strong> and <strong>footer_per_folder</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
355
	<br />If they are FALSE, the header/footer will be taken from the absolute or relative path in the header/footer variable.
356
	<br />If they are TRUE, the current directory will be added to the beginning of the file to be included. (don't add a path to the header/footer variables - just the filename)
357
</p>
358
<p>
359
	&nbsp;
360
</p>
361
<p>
362
	<strong>days_new</strong> contains the number of days old a file can be and still have [New] written next to it. <em>(Default: 0)</em>
363
	<br />If it is set to 0, this feature will be disabled.
364
	<br /><strong>NOTE</strong>: this can contain any number, not just a 1 or 0 value, and it can contain a decimal if you want.
365
</p>
366
<p>
367
	&nbsp;
368
</p>
369
<p>
370
	<strong>md5_show</strong> is a feature that will let users get the md5sum of a specific file. <em>(Default: 0)</em>
371
	<br />If set to 0 it will be disabled.
372
	<br />Otherwise, the number will represent the maximum file size (in megabytes) to allow the md5sum to be calculated (I'd recommend something close to 10).
373
	<br />The number can contain a decimal if you want.
374
	<br /><strong>NOTE</strong>: PHP version 4.2.0 or higher is required for this feature to work.
375
</p>
376
<p>
377
	&nbsp;
378
</p>
379
<p>
380
	<strong>thumbnail_height</strong> is a feature that will show thumbnails next to images. (NOTE: GDlib 2.0.1 or higher is required)
381
	<br />Setting it to 0 will disable this feature, and setting it to any other number will set the size of the thumbnail.
382
	<br />(100 is a good setting to start with.)
383
</p>
384
<p>
385
	&nbsp;
386
</p>
387
<p>
388
	<strong>show_type_column</strong>, <strong>show_size_column</strong>, and <strong>show_date_column</strong> are set to TRUE or FALSE.
389
	<br />Setting them to TRUE will show the column, and setting it to FALSE will not display the column.
390
</p>
391
 
392
<hr class="default_hr" />
393
 
394
<p>
395
	<strong>Language Settings</strong>:
396
</p>
397
<p>
398
	&nbsp;
399
</p>
400
<p>
401
	<strong>lang</strong> is the default language to display the script in.
402
	<br />The choices are listed below...
403
	<br /><em>(Default: 'en')</em>
404
</p>
405
<table cellpadding="1" cellspacing="0" style="border-collapse: collapse; border-color: #111111;">
406
	<tr class="paragraph"><th>lang setting</th><th>Language</th></tr>
407
	<tr class="paragraph"><td>al</td><td>Albanian</td></tr>
408
	<tr class="paragraph"><td>bg</td><td>Bulgarian</td></tr>
409
	<tr class="paragraph"><td>ca</td><td>Catalan</td></tr>
410
	<tr class="paragraph"><td>cz</td><td>Czech</td></tr>
411
	<tr class="paragraph"><td>da</td><td>Danish</td></tr>
412
	<tr class="paragraph"><td>de</td><td>German</td></tr>
413
	<tr class="paragraph"><td>ee</td><td>Estonian</td></tr>
414
	<tr class="paragraph"><td>en</td><td>English</td></tr>
415
	<tr class="paragraph"><td>es</td><td>Spanish</td></tr>
416
	<tr class="paragraph"><td>fi</td><td>Finnish</td></tr>
417
	<tr class="paragraph"><td>fr</td><td>French</td></tr>
418
	<tr class="paragraph"><td>gr</td><td>Greek</td></tr>
419
	<tr class="paragraph"><td>he</td><td>Hebrew</td></tr>
420
	<tr class="paragraph"><td>hu</td><td>Hungarian</td></tr>
421
	<tr class="paragraph"><td>is</td><td>Icelandic</td></tr>
422
	<tr class="paragraph"><td>it</td><td>Italian</td></tr>
423
	<tr class="paragraph"><td>jp</td><td>Japanese</td></tr>
424
	<tr class="paragraph"><td>ko</td><td>Korean</td></tr>
425
	<tr class="paragraph"><td>lt</td><td>Lithuanian</td></tr>
426
	<tr class="paragraph"><td>lv</td><td>Latvian</td></tr>
427
	<tr class="paragraph"><td>ms</td><td>Malay</td></tr>
428
	<tr class="paragraph"><td>nl</td><td>Dutch</td></tr>
429
	<tr class="paragraph"><td>no</td><td>Norwegian</td></tr>
430
	<tr class="paragraph"><td>pl</td><td>Polish</td></tr>
431
	<tr class="paragraph"><td>pt_BR</td><td>Brazilian Portuguese</td></tr>
432
	<tr class="paragraph"><td>ro</td><td>Romanian</td></tr>
433
	<tr class="paragraph"><td>ru</td><td>Russian</td></tr>
434
	<tr class="paragraph"><td>sr_LA</td><td>Serbian (Latin)</td></tr>
435
	<tr class="paragraph"><td>sr_CY</td><td>Serbian (Cyrillic)</td></tr>
436
	<tr class="paragraph"><td>sv</td><td>Swedish</td></tr>
437
	<tr class="paragraph"><td>th</td><td>Thai</td></tr>
438
	<tr class="paragraph"><td>tr</td><td>Turkish</td></tr>
439
	<tr class="paragraph"><td>vi</td><td>Vietnamese</td></tr>
440
	<tr class="paragraph"><td>zh_CN</td><td>Chinese</td></tr>
441
	<tr class="paragraph"><td>zh_TW</td><td>Chinese Traditional</td></tr>
442
</table>
443
<p>
444
	&nbsp;
445
</p>
446
<p>
447
	<strong>path_to_language_files</strong> is the path where the *.php language files are located.
448
	<br /><em>Default:</em> <span class="fixed_width">./languages/</span>
449
</p>
450
<p>
451
	&nbsp;
452
</p>
453
<p>
454
	If <strong>select_language</strong> is set to TRUE, there will be an option at the bottom of the script for
455
	<br />the user to choose which language the script is displayed in. <em>(Default: FALSE)</em>
456
</p>
457
 
458
<hr class="default_hr" />
459
 
460
</td></tr></table>
461
 
462
</body>
463
</html>