diff options
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | public/index.php | 22 | ||||
| -rw-r--r-- | public/static/PRIVACY.txt | 2 | ||||
| -rw-r--r-- | public/static/TOS.txt | 2 |
4 files changed, 21 insertions, 10 deletions
@@ -1,4 +1,7 @@ config.php *.ini *.db -userdata/
\ No newline at end of file +userdata/ + +TOS.txt +PRIVACY.txt
\ No newline at end of file diff --git a/public/index.php b/public/index.php index 4176415..cf88a1b 100644 --- a/public/index.php +++ b/public/index.php @@ -105,6 +105,9 @@ if (FILE_CATALOG_FANCY_VIEW && $file_id) { $file['resolution'] = trim(shell_exec('wc -l < ' . escapeshellarg($file_path))) . ' lines'; } } + +$tos_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/TOS.txt'); +$privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); ?> <html> @@ -210,11 +213,20 @@ if (FILE_CATALOG_FANCY_VIEW && $file_id) { Users do not need an account to start uploading. <br><br> Click the button below and share the files with your friends today! - <br> - But, read <a href="/static/TOS.txt">TOS</a> and <a href="/static/PRIVACY.txt">Privacy Policy</a> - before - interacting with the - website. + <?php if ($tos_exists || $privacy_exists): ?> + <br> + But, read + <?php if ($tos_exists): ?> + <a href="/static/TOS.txt">TOS</a> + <?php endif; ?> + <?php if ($tos_exists && $privacy_exists): ?> and <?php endif; ?> + <?php if ($privacy_exists): ?> + <a href="/static/PRIVACY.txt">Privacy Policy</a> + <?php endif; ?> + before + interacting with the + website. + <?php endif; ?> </p> </div> </section> diff --git a/public/static/PRIVACY.txt b/public/static/PRIVACY.txt deleted file mode 100644 index 9cebe94..0000000 --- a/public/static/PRIVACY.txt +++ /dev/null @@ -1,2 +0,0 @@ -There is your privacy policy. -If you see this, then the administrator hasn't set privacy policy.
\ No newline at end of file diff --git a/public/static/TOS.txt b/public/static/TOS.txt deleted file mode 100644 index 897ed5e..0000000 --- a/public/static/TOS.txt +++ /dev/null @@ -1,2 +0,0 @@ -There is your TOS. -If you see this, then the administrator hasn't set TOS.
\ No newline at end of file |
