summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/index.php22
-rw-r--r--public/static/PRIVACY.txt2
-rw-r--r--public/static/TOS.txt2
3 files changed, 17 insertions, 9 deletions
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