summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-10 18:27:01 +0500
committerilotterytea <iltsu@alright.party>2025-12-10 18:27:01 +0500
commitb62ba9a6b7a17dd85ea2f8dd20ccc08187c0de62 (patch)
tree55317951517e06db2006c73ea82f0a63d648c63f
parentf7506dd67c1e376eb41c7b5c6e05d8a6fefa96ee (diff)
feat: privacy policy page
-rw-r--r--index.php1
-rw-r--r--privacy.php42
-rw-r--r--static/txt/PRIVACY.txt1
-rw-r--r--tos.php2
4 files changed, 44 insertions, 2 deletions
diff --git a/index.php b/index.php
index b412cb4..a4733e4 100644
--- a/index.php
+++ b/index.php
@@ -90,6 +90,7 @@ authorize_user();
?>
- <a href="/tos.php">Terms of Service</a>
+ - <a href="/privacy.php">Privacy Policy</a>
</p>
</div>
</div>
diff --git a/privacy.php b/privacy.php
new file mode 100644
index 0000000..16ce6ae
--- /dev/null
+++ b/privacy.php
@@ -0,0 +1,42 @@
+<?php
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/partials.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
+
+authorize_user();
+
+$path = "{$_SERVER['DOCUMENT_ROOT']}/static/txt/PRIVACY.txt";
+
+$contents = "<p>No privacy policy set!</p>";
+$last_updated = "Never";
+
+if (is_file($path)) {
+ $contents = file_get_contents($path);
+ $last_updated = date("F d, Y", filemtime($path));
+}
+?>
+
+<html>
+
+<head>
+ <title>Privacy Policy - <?= CONFIG['instance']['name'] ?></title>
+ <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
+ <link rel="stylesheet" href="/static/style.css">
+</head>
+
+<body>
+ <div class="container">
+ <div class="wrapper">
+ <?php html_navigation_bar() ?>
+ <div class="content row">
+ <div class="sidebar" style="min-width: 300px;"></div>
+ <div class="content">
+ <h1>Privacy Policy (Last updated: <?= $last_updated ?>)</h1>
+ <?= $contents ?>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+
+</html> \ No newline at end of file
diff --git a/static/txt/PRIVACY.txt b/static/txt/PRIVACY.txt
new file mode 100644
index 0000000..e200c20
--- /dev/null
+++ b/static/txt/PRIVACY.txt
@@ -0,0 +1 @@
+<i>Please edit /static/txt/PRIVACY.txt</i> \ No newline at end of file
diff --git a/tos.php b/tos.php
index d410555..08c1769 100644
--- a/tos.php
+++ b/tos.php
@@ -5,8 +5,6 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
authorize_user();
-$contents = "";
-
$path = "{$_SERVER['DOCUMENT_ROOT']}/static/txt/TOS.txt";
$contents = "<p>No rules!</p>";