mirror of
https://github.com/BeitDina/AutoIndex.git
synced 2026-02-28 05:20:42 +01:00
Update config.php for the request class finished
This commit is contained in:
committed by
GitHub
parent
830c096c53
commit
c27e7ba488
505
config.php
505
config.php
@@ -76,46 +76,42 @@ if ($request->post_array() >= count($strings) + count($numbers))
|
||||
}
|
||||
foreach ($numbers as $setting)
|
||||
{
|
||||
if (!isset($_POST[$setting]))
|
||||
if ($request->is_not_set_post($setting))
|
||||
{
|
||||
die(simple_display('Required setting <em>' . htmlentities($setting) . '</em> not set.'));
|
||||
}
|
||||
if ($_POST[$setting] == '')
|
||||
if ($request->is_empty_post($setting))
|
||||
{
|
||||
$output .= "$setting\t0\n";
|
||||
continue;
|
||||
}
|
||||
if ($_POST[$setting] < 0)
|
||||
if ($request->post($setting) < 0)
|
||||
{
|
||||
die(simple_display('The setting <em>' . htmlentities($setting) . '</em> should not be a negitive number.'));
|
||||
die(simple_display('The setting <em>' . htmlentities($setting) . '</em> should not be a negative number.'));
|
||||
}
|
||||
//$request->recursive_set_var($setting, (string)((float)$request->post($setting)), false);
|
||||
$_POST[$setting] = (string)((float)$_POST[$setting]);
|
||||
$output .= "$setting\t{$_POST[$setting]}\n";
|
||||
$request->recursive_set_var($setting, (string)((float)$request->post($setting)), false);
|
||||
$output .= "$setting\t{$request->post($setting)}\n";
|
||||
}
|
||||
$output .= "\n*/\n\n?>";
|
||||
|
||||
if (!isset($_POST['force_download']))
|
||||
if ($request->is_not_set_post('force_download'))
|
||||
{
|
||||
if (preg_match('#^(/|[a-z]\:)#i', $_POST['base_dir']))
|
||||
if (preg_match('#^(/|[a-z]\:)#i', $request->post('base_dir')))
|
||||
{
|
||||
die(simple_display('It seems you are using an absolute path for the Base Directory.'
|
||||
. '<br />This means you must check the "Pipe downloaded files though the PHP script" box.'));
|
||||
die(simple_display('It seems you are using an absolute path for the Base Directory.' . '<br />This means you must check the "Pipe downloaded files though the PHP script" box.'));
|
||||
}
|
||||
if ((int)$_POST['bandwidth_limit'] !== 0)
|
||||
if ((int)$request->post('bandwidth_limit') !== 0)
|
||||
{
|
||||
die(simple_display('For the Bandwidth Limit feature to work, the "force download" feature needs to be on.'
|
||||
. '<br />This means you must check the "Pipe downloaded files though the PHP script" box.'));
|
||||
die(simple_display('For the Bandwidth Limit feature to work, the "force download" feature needs to be on.' . '<br />This means you must check the "Pipe downloaded files though the PHP script" box.'));
|
||||
}
|
||||
}
|
||||
if (isset($_POST['must_login_to_download']) && !isset($_POST['use_login_system']))
|
||||
if ($request->is_set_post('must_login_to_download') && $request->is_not_set_post('use_login_system'))
|
||||
{
|
||||
die(simple_display('To enable <em>must_login_to_download</em>, the '
|
||||
. '<em>use_login_system</em> option must also be turned on.'));
|
||||
die(simple_display('To enable <em>must_login_to_download</em>, the ' . '<em>use_login_system</em> option must also be turned on.'));
|
||||
}
|
||||
foreach (array('base_dir', 'template') as $valid)
|
||||
{
|
||||
if (!@is_dir($_POST[$valid]))
|
||||
if (!@is_dir($request->post($valid)))
|
||||
{
|
||||
//die(simple_display(htmlentities($valid) . ' setting is not a valid directory.'));
|
||||
}
|
||||
@@ -191,11 +187,15 @@ if ($request->post_array() >= count($strings) + count($numbers))
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellpadding="5" cellspacing="0">
|
||||
<tr><td>
|
||||
<p>Write successful!<br />AutoIndex configuration is finished.</p>
|
||||
<p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Continue.</a></p>
|
||||
</td></tr></table>
|
||||
</body></html>
|
||||
<tr>
|
||||
<td>
|
||||
<p>Write successful!<br />AutoIndex configuration is finished.</p>
|
||||
<p><a href="<?php echo $request->server('PHP_SELF'); ?>">Continue.</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
@@ -233,7 +233,7 @@ if (isset($config)) //if we're reconfiguring the script, use the current setting
|
||||
{
|
||||
foreach ($settings as $key => $data)
|
||||
{
|
||||
$settings[$key] = $config -> __get($key);
|
||||
$settings[$key] = $config->__get($key);
|
||||
}
|
||||
}
|
||||
//begin display of main configuration page:
|
||||
@@ -289,7 +289,7 @@ echo '<?xml version="1.0" encoding="utf-8"?>';
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?action=config">
|
||||
<form method="post" action="<?php $request->server('PHP_SELF'); ?>?action=config">
|
||||
|
||||
<h3>
|
||||
<a href="http://autoindex.sourceforge.net/">AutoIndex PHP Script</a>
|
||||
@@ -302,233 +302,286 @@ echo '<?xml version="1.0" encoding="utf-8"?>';
|
||||
<hr />
|
||||
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Base Directory: <input type="text" name="base_dir" value="<?php if ($settings['base_dir'] != 'false') echo $settings['base_dir']; ?>" />
|
||||
<p class="small">
|
||||
This is the folder that will be the root of the directory listing.
|
||||
<br />This will be the starting point for the script. Nothing above this directory can be viewed, but its subfolders can.
|
||||
<br />Make sure to use a path relative to this index.php file if you can.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Base Directory: <input type="text" name="base_dir" value="<?php if ($settings['base_dir'] != 'false') echo $settings['base_dir']; ?>" />
|
||||
<p class="small">
|
||||
This is the folder that will be the root of the directory listing.
|
||||
<br />This will be the starting point for the script. Nothing above this directory can be viewed, but its subfolders can.
|
||||
<br />Make sure to use a path relative to this index.php file if you can.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Assets Path: <input type="text" name="assets_path" value="<?php if ($settings['assets_path'] != 'false') echo $settings['assets_path']; ?>" />
|
||||
<p class="small">
|
||||
This is the path to the assets files (the path web browsers will access them from).
|
||||
<br />The included assets are <em>cookie consent</em>, <em>ion icons</em>, <em>font awesome</em>, and <em>jquery</em>.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>Assets Path: <input type="text" name="assets_path" value="<?php if ($settings['assets_path'] != 'false') echo $settings['assets_path']; ?>" />
|
||||
<p class="small">
|
||||
This is the path to the assets files (the path web browsers will access them from).
|
||||
<br />The included assets are <em>cookie consent</em>, <em>ion icons</em>, <em>font awesome</em>, and <em>jquery</em>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Icon Path: <input type="text" name="icon_path" value="<?php if ($settings['icon_path'] != 'false') echo $settings['icon_path']; ?>" />
|
||||
<p class="small">
|
||||
This is the path to the icon image files (the path web browsers will access them from).
|
||||
<br />The included icon sets are <em>apache</em>, <em>kde</em>, <em>osx</em>, and <em>winxp</em>.
|
||||
<br />You can leave it blank to not show icons.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Icon Path: <input type="text" name="icon_path" value="<?php if ($settings['icon_path'] != 'false') echo $settings['icon_path']; ?>" />
|
||||
<p class="small">
|
||||
This is the path to the icon image files (the path web browsers will access them from).
|
||||
<br />The included icon sets are <em>apache</em>, <em>kde</em>, <em>osx</em>, and <em>winxp</em>.
|
||||
<br />You can leave it blank to not show icons.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Flag Path: <input type="text" name="flag_path" value="<?php if ($settings['flag_path'] != 'false') echo $settings['flag_path']; ?>" />
|
||||
<p class="small">
|
||||
This is the path to the flag image files (the path web browsers will access them from).
|
||||
<br />The included icon sets are <em>country</em>, <em>language</em>.
|
||||
<br />You can leave it blank to not show icons.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Flag Path: <input type="text" name="flag_path" value="<?php if ($settings['flag_path'] != 'false') echo $settings['flag_path']; ?>" />
|
||||
<p class="small">
|
||||
This is the path to the flag image files (the path web browsers will access them from).
|
||||
<br />The included icon sets are <em>country</em>, <em>language</em>.
|
||||
<br />You can leave it blank to not show icons.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<input type="checkbox" name="show_dir_size" value="true"<?php if ($settings['show_dir_size'] != 'false') echo ' checked="checked"'; ?> /> Show Directory Size
|
||||
<p class="small">
|
||||
If this box is checked, the total size of directories will be shown under size (all the folder's contents will be added up).
|
||||
<br />Otherwise, it will display "[dir]" under size.
|
||||
<br />NOTE: If you are trying to index many files (meaning a few thousand), you will notice a speed improvement with this turned off.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="show_dir_size" value="true"<?php if ($settings['show_dir_size'] != 'false') echo ' checked="checked"'; ?> /> Show Directory Size
|
||||
<p class="small">
|
||||
If this box is checked, the total size of directories will be shown under size (all the folder's contents will be added up).
|
||||
<br />Otherwise, it will display "[dir]" under size.
|
||||
<br />NOTE: If you are trying to index many files (meaning a few thousand), you will notice a speed improvement with this turned off.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="search_enabled" value="true"<?php if ($settings['search_enabled'] != 'false') echo ' checked="checked"'; ?> /> Enable Searching
|
||||
<p class="small">
|
||||
If this box is checked, people will be able to search for a file or folder by its filename.
|
||||
<br />It will search the folder you are currently in, and all subfolders.
|
||||
<br />Searching is not case sensitive.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Template Directory: <input type="text" name="template" value="<?php if ($settings['template'] != 'false') echo $settings['template']; ?>" />
|
||||
<p class="small">
|
||||
This is the path where the *.tpl template files are located (relative to this index.php file).
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Template Directory: <input type="text" name="template" value="<?php if ($settings['template'] != 'false') echo $settings['template']; ?>" />
|
||||
<p class="small">
|
||||
This is the path where the *.tpl template files are located (relative to this index.php file).
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<input type="checkbox" name="use_login_system" value="true"<?php if ($settings['use_login_system'] != 'false') echo ' checked="checked"'; ?> /> Enable Login System
|
||||
<br /><input type="checkbox" name="must_login_to_download" value="true"<?php if ($settings['must_login_to_download'] != 'false') echo ' checked="checked"'; ?> /> Users must login to view/download
|
||||
<br />User List: <input type="text" name="user_list" value="<?php if ($settings['user_list'] != 'false') echo $settings['user_list']; ?>" />
|
||||
<p class="small">
|
||||
User List contains the path to the text file where the usernames and encrypted passwords are stored.
|
||||
<br />Make sure the file is chmod'ed so PHP can read and write to it.
|
||||
<br />(User List is only needed if the login system is enabled.)
|
||||
<br />
|
||||
<br />The default accounts are:
|
||||
<br /><code>username: admin</code>
|
||||
<br /><code>password: admin</code>
|
||||
<br />
|
||||
<br /><code>username: user</code>
|
||||
<br /><code>password: user</code>
|
||||
<br />
|
||||
<br />Be sure to create new accounts, then delete these default ones if you enable the login system!
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="use_login_system" value="true"<?php if ($settings['use_login_system'] != 'false') echo ' checked="checked"'; ?> /> Enable Login System
|
||||
<br /><input type="checkbox" name="must_login_to_download" value="true"<?php if ($settings['must_login_to_download'] != 'false') echo ' checked="checked"'; ?> /> Users must login to view/download
|
||||
<br />User List: <input type="text" name="user_list" value="<?php if ($settings['user_list'] != 'false') echo $settings['user_list']; ?>" />
|
||||
<p class="small">
|
||||
User List contains the path to the text file where the usernames and encrypted passwords are stored.
|
||||
<br />Make sure the file is chmod'ed so PHP can read and write to it.
|
||||
<br />(User List is only needed if the login system is enabled.)
|
||||
<br />
|
||||
<br />The default accounts are:
|
||||
<br /><code>username: admin</code>
|
||||
<br /><code>password: admin</code>
|
||||
<br />
|
||||
<br /><code>username: user</code>
|
||||
<br /><code>password: user</code>
|
||||
<br />
|
||||
<br />Be sure to create new accounts, then delete these default ones if you enable the login system!
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Age for "New" Icon: <input type="text" name="days_new" size="3" value="<?php if ($settings['days_new'] != 'false') echo $settings['days_new']; ?>" /> days
|
||||
<p class="small">
|
||||
This contains the number of days old a file can be and still have [New] written next to it.
|
||||
<br />If it is set to 0, this feature will be disabled.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Age for "New" Icon: <input type="text" name="days_new" size="3" value="<?php if ($settings['days_new'] != 'false') echo $settings['days_new']; ?>" /> days
|
||||
<p class="small">
|
||||
This contains the number of days old a file can be and still have [New] written next to it.
|
||||
<br />If it is set to 0, this feature will be disabled.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Number of file entires per page: <input type="text" name="entries_per_page" size="3" value="<?php if ($settings['entries_per_page'] != 'false') echo $settings['entries_per_page']; ?>" />
|
||||
<p class="small">
|
||||
This contains the number of files or folders to display on a single page.
|
||||
If there are more files or folders, the display will be separated into different
|
||||
pages with <code>Previous</code> and <code>Next</code> buttons.
|
||||
<br />If it is set to 0, everything will be displayed on one page.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Number of file entires per page: <input type="text" name="entries_per_page" size="3" value="<?php if ($settings['entries_per_page'] != 'false') echo $settings['entries_per_page']; ?>" />
|
||||
<p class="small">
|
||||
This contains the number of files or folders to display on a single page.
|
||||
If there are more files or folders, the display will be separated into different
|
||||
pages with <code>Previous</code> and <code>Next</code> buttons.
|
||||
<br />If it is set to 0, everything will be displayed on one page.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Image Thumbnail Height: <input type="text" name="thumbnail_height" size="3" value="<?php if ($settings['thumbnail_height'] != 'false') echo $settings['thumbnail_height']; ?>" /> pixels
|
||||
<p class="small">
|
||||
This is a feature that will show thumbnails next to images. (NOTE: GDlib 2.0.1 or higher is required)
|
||||
<br />Setting it to 0 will disable this feature, and setting it to any other number will set the size of the thumbnail.
|
||||
<br />(100 is a good setting to start with.)
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Image Thumbnail Height: <input type="text" name="thumbnail_height" size="3" value="<?php if ($settings['thumbnail_height'] != 'false') echo $settings['thumbnail_height']; ?>" /> pixels
|
||||
<p class="small">
|
||||
This is a feature that will show thumbnails next to images. (NOTE: GDlib 2.0.1 or higher is required)
|
||||
<br />Setting it to 0 will disable this feature, and setting it to any other number will set the size of the thumbnail.
|
||||
<br />(100 is a good setting to start with.)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<input type="checkbox" name="force_download" value="true"<?php if ($settings['force_download'] != 'false') echo ' checked="checked"'; ?> /> Pipe downloaded files though the PHP script
|
||||
<p>Bandwidth Limit: <input type="text" name="bandwidth_limit" size="3" value="<?php if ($settings['bandwidth_limit'] != 'false') echo $settings['bandwidth_limit']; ?>" /> KB/s</p>
|
||||
<p class="small">
|
||||
This contains the max download speed for files. The above checkbox needs to be checked for this to work.
|
||||
<br />If it is set to 0, the script will not limit download speed.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="force_download" value="true"<?php if ($settings['force_download'] != 'false') echo ' checked="checked"'; ?> /> Pipe downloaded files though the PHP script
|
||||
<p>Bandwidth Limit: <input type="text" name="bandwidth_limit" size="3" value="<?php if ($settings['bandwidth_limit'] != 'false') echo $settings['bandwidth_limit']; ?>" /> KB/s</p>
|
||||
<p class="small">
|
||||
This contains the max download speed for files. The above checkbox needs to be checked for this to work.
|
||||
<br />If it is set to 0, the script will not limit download speed.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<p><input type="checkbox" name="anti_leech" value="true"<?php if ($settings['anti_leech'] != 'false') echo ' checked="checked"'; ?> /> Anti-Leech</p>
|
||||
<p class="small">
|
||||
When downloading a file, this will check to make sure the referrer the browser sends matches the website's URL.
|
||||
<br />Since some people turn off referrer sending in their browser, this option is not recommended.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<p><input type="checkbox" name="anti_leech" value="true"<?php if ($settings['anti_leech'] != 'false') echo ' checked="checked"'; ?> /> Anti-Leech</p>
|
||||
<p class="small">
|
||||
When downloading a file, this will check to make sure the referrer the browser sends matches the website's URL.
|
||||
<br />Since some people turn off referrer sending in their browser, this option is not recommended.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
The following items contain the path and filename to the file where the data for that feature will be stored.
|
||||
<br />Leave it blank to turn off that feature.
|
||||
</p>
|
||||
<p>Hidden Files List: <input type="text" name="hidden_files" value="<?php if ($settings['hidden_files'] != 'false') echo $settings['hidden_files']; ?>" />
|
||||
<br /><span class="small">
|
||||
Any file or folder matched to an item in this list will be kept hidden.
|
||||
<br />The contents of the list are editable when you login as an admin.
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The following items contain the path and filename to the file where the data for that feature will be stored.
|
||||
<br />Leave it blank to turn off that feature.
|
||||
</p>
|
||||
<p>Access Log File: <input type="text" name="log_file" value="<?php if ($settings['log_file'] != 'false') echo $settings['log_file']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write the access log.
|
||||
<br />If this is enabled, you will be able to view the contents of the logfile
|
||||
<br />and generate statistics when you login as an admin.
|
||||
</span></p>
|
||||
|
||||
<p>Hidden Files List: <input type="text" name="hidden_files" value="<?php if ($settings['hidden_files'] != 'false') echo $settings['hidden_files']; ?>" />
|
||||
<br /><span class="small">
|
||||
Any file or folder matched to an item in this list will be kept hidden.
|
||||
<br />The contents of the list are editable when you login as an admin.
|
||||
</span></p>
|
||||
<p>File/Folder Description File: <input type="text" name="description_file" value="<?php if ($settings['description_file'] != 'false') echo $settings['description_file']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write the file descriptions to.
|
||||
<br />File/Folder descriptions are editable when you login as an admin.
|
||||
</span></p>
|
||||
|
||||
<p>Access Log File: <input type="text" name="log_file" value="<?php if ($settings['log_file'] != 'false') echo $settings['log_file']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write the access log.
|
||||
<br />If this is enabled, you will be able to view the contents of the logfile
|
||||
<br />and generate statistics when you login as an admin.
|
||||
</span></p>
|
||||
|
||||
<p>File/Folder Description File: <input type="text" name="description_file" value="<?php if ($settings['description_file'] != 'false') echo $settings['description_file']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write the file descriptions to.
|
||||
<br />File/Folder descriptions are editable when you login as an admin.
|
||||
</span></p>
|
||||
|
||||
<p>Download Count File: <input type="text" name="download_count" value="<?php if ($settings['download_count'] != 'false') echo $settings['download_count']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write the file download counts to.
|
||||
<br />The count is automatically increased when a file is downloaded.
|
||||
</span></p>
|
||||
|
||||
<p>Banned User List: <input type="text" name="banned_list" value="<?php if ($settings['banned_list'] != 'false') echo $settings['banned_list']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write IP addresses and hostnames that are blocked from accessing this script.
|
||||
<br />The contents of the list are editable when you login as an admin.
|
||||
</span></p>
|
||||
</td></tr></table>
|
||||
<p>Download Count File: <input type="text" name="download_count" value="<?php if ($settings['download_count'] != 'false') echo $settings['download_count']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write the file download counts to.
|
||||
<br />The count is automatically increased when a file is downloaded.
|
||||
</span></p>
|
||||
|
||||
<p>Banned User List: <input type="text" name="banned_list" value="<?php if ($settings['banned_list'] != 'false') echo $settings['banned_list']; ?>" />
|
||||
<br /><span class="small">
|
||||
The file to write IP addresses and hostnames that are blocked from accessing this script.
|
||||
<br />The contents of the list are editable when you login as an admin.
|
||||
</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<input type="checkbox" name="archive" value="true"<?php if ($settings['archive'] != 'false') echo ' checked="checked"'; ?> /> Allow folder archive downloading
|
||||
<p class="small">
|
||||
If this box is checked, users will be able to download the folder's contents as a tar archive file.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="archive" value="true"<?php if ($settings['archive'] != 'false') echo ' checked="checked"'; ?> /> Allow folder archive downloading
|
||||
<p class="small">
|
||||
If this box is checked, users will be able to download the folder's contents as a tar archive file.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<input type="checkbox" name="parse_htaccess" value="true"<?php if ($settings['parse_htaccess'] != 'false') echo ' checked="checked"'; ?> /> Parse .htaccess files
|
||||
<p class="small">
|
||||
If this box is checked, .htaccess files will be parsed and used by AutoIndex.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="parse_htaccess" value="true"<?php if ($settings['parse_htaccess'] != 'false') echo ' checked="checked"'; ?> /> Parse .htaccess files
|
||||
<p class="small">
|
||||
If this box is checked, .htaccess files will be parsed and used by AutoIndex.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
<p>MD5 calculation max size: <input type="text" name="md5_show" size="3" value="<?php if ($settings['md5_show'] != 'false') echo $settings['md5_show']; ?>" /> MB</p>
|
||||
<p class="small">
|
||||
Setting this to 0 will disable this feature, and setting it to any other number will set the maximum size of a file to allow users to find the md5sum of (in megabytes).
|
||||
<br />(10 is a good setting to start with.)
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
<p>MD5 calculation max size: <input type="text" name="md5_show" size="3" value="<?php if ($settings['md5_show'] != 'false') echo $settings['md5_show']; ?>" /> MB</p>
|
||||
<p class="small">
|
||||
Setting this to 0 will disable this feature, and setting it to any other number will set the maximum size of a file to allow users to find the md5sum of (in megabytes).
|
||||
<br />(10 is a good setting to start with.)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<table width="650" cellpadding="8">
|
||||
<tr>
|
||||
<td>
|
||||
Default Language: <select name="language">
|
||||
<?php
|
||||
$l = Language::get_all_langs(PATH_TO_LANGUAGES);
|
||||
if ($l === false)
|
||||
{
|
||||
$l = array('en');
|
||||
}
|
||||
sort($l);
|
||||
foreach ($l as $lang)
|
||||
{
|
||||
$sel = (($lang == $settings['language']) ? ' selected="selected"' : '');
|
||||
echo "\t\t<option$sel>$lang</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<p class="small">
|
||||
The user's browser's default language is used, unless that language is
|
||||
not available in AutoIndex. In that case, the language selected here is
|
||||
used.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p />
|
||||
<hr />
|
||||
<p />
|
||||
<table width="650" cellpadding="8"><tr><td>
|
||||
Default Language: <select name="language">
|
||||
<?php
|
||||
$l = Language::get_all_langs(PATH_TO_LANGUAGES);
|
||||
if ($l === false)
|
||||
{
|
||||
$l = array('en');
|
||||
}
|
||||
sort($l);
|
||||
foreach ($l as $lang)
|
||||
{
|
||||
$sel = (($lang == $settings['language']) ? ' selected="selected"' : '');
|
||||
echo "\t\t<option$sel>$lang</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<p class="small">
|
||||
The user's browser's default language is used, unless that language is
|
||||
not available in AutoIndex. In that case, the language selected here is
|
||||
used.
|
||||
</p>
|
||||
</td></tr></table>
|
||||
|
||||
<p /><hr /><p />
|
||||
|
||||
<p>
|
||||
<input type="submit" value="Configure" />
|
||||
</p>
|
||||
@@ -538,12 +591,10 @@ Default Language: <select name="language">
|
||||
<br />(It should be named <em><?php echo CONFIG_STORED; ?></em> and put in the same folder as <em>index.php</em>)
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<!--
|
||||
Powered by AutoIndex PHP Script (version <?php echo VERSION; ?>)
|
||||
Copyright (C) 2002-2007 Justin Hagstrom
|
||||
http://autoindex.sourceforge.net
|
||||
Page generated in <?php echo round((microtime(true) - START_TIME) * 1000, 1); ?> milliseconds.
|
||||
-->
|
||||
|
||||
</body></html>
|
||||
|
||||
Reference in New Issue
Block a user