This commit builds upon the previous feature of displaying disk space information by adding a toggle option in the settings to show or hide disk space usage details.
#### Changes:
- Added a new setting under the settings section allowing users to toggle the display of disk space usage information.
- Updated the disk space display logic to check the setting before fetching and displaying disk space information.
#### Code Additions:
- Introduced a new checkbox under the settings section to allow users to toggle the display of disk space usage.
- Implemented a check for the `show_disk_usage` setting before executing disk space calculation and display logic.
#### Benefits:
- Provides users with the flexibility to choose whether or not to display disk space information based on their preferences or needs.
- Helps in reducing unnecessary disk space calculations when the information is not needed, potentially improving performance.
- Maintains a clean and uncluttered UI by allowing users to hide disk space information when it's not required.
# Changes:
- Added disk space calculation logic to the `index.php` file.
- Updated the file listing footer to include total, used, and remaining disk space information.
- Utilized `disk_total_space`, `disk_free_space`, and `fm_get_filesize` functions to obtain and format disk space information.
- Ensured that the feature works seamlessly with existing functionalities and adheres to the project's coding standards.
# Benefits:
- Users with multiple mounted drives on their servers can easily see how much disk space is available, used, and remaining on each drive, facilitating better disk space management.
- Enhances user experience by providing valuable disk space information, aiding in capacity planning and preventing potential issues related to disk space exhaustion.
- Helps in monitoring disk space usage directly from the file manager without needing to use external tools or commands.
# Use Case:
- As someone managing a server with multiple mounted drives, this feature is invaluable for monitoring the disk space usage on each drive. It helps in ensuring that none of the drives are nearing capacity, which could lead to performance degradation or even system failures. Having this information readily available within Tiny File Manager streamlines the process of managing disk space and ensures that I can take timely action if needed, such as cleaning up old files or moving data to other drives with more available space.
micro-optimization: when doing large file copies, this will reduce the number of feof() calls. for example, if copying 100MB, this will save approximately 25,599 feof() calls (255 feof() calls for every MB) - also feofs() may do an actual syscall, and syscalls are relatively expensive/time-consuming.
highlightjs_style variable is being used before config.php gets parsed, so preview style is always vs. This PR fixes that by moving config.php parsing to be before external resource calls.
When logged in it takes to the website's main URL. For example, if I have tfm in www.example.com/tfm/index.php (index.php is tfm) then after logging in it redirects to www.example.com and then have to press back on the browser then it takes to www.example.com/tfm/index.php
* Fixes naming for confirmDailog id, otherwise dialog won't work
* Removes destroying form as browser complains that it can't process request from disconnected form