summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emotes/upload.php5
-rw-r--r--index.php2
-rw-r--r--static/txt/RULES2
-rw-r--r--static/txt/TOS.txt1
-rw-r--r--tos.php (renamed from rules.php)22
5 files changed, 13 insertions, 19 deletions
diff --git a/emotes/upload.php b/emotes/upload.php
index 58836d6..3c43b48 100644
--- a/emotes/upload.php
+++ b/emotes/upload.php
@@ -136,9 +136,8 @@ if ($_SERVER['REQUEST_METHOD'] != "POST") {
</table>
<div>
- <label for="tos" class="inline">Do you accept <a href="/rules.php"
- target="_BLANK">the
- rules</a>?<span style="color:red;">*</span></label>
+ <label for="tos" class="inline">Do you accept <a href="/tos.php"
+ target="_BLANK">TOS</a>?<span style="color:red;">*</span></label>
<input type="checkbox" name="tos" value="1" required>
</div>
diff --git a/index.php b/index.php
index 6bc0503..b412cb4 100644
--- a/index.php
+++ b/index.php
@@ -88,6 +88,8 @@ authorize_user();
echo ')</a>';
}
?>
+
+ - <a href="/tos.php">Terms of Service</a>
</p>
</div>
</div>
diff --git a/static/txt/RULES b/static/txt/RULES
deleted file mode 100644
index 0ec5b9e..0000000
--- a/static/txt/RULES
+++ /dev/null
@@ -1,2 +0,0 @@
-Hey, admin! Write your rules in /static/txt/RULES file.
-If you see this, VI VON \ No newline at end of file
diff --git a/static/txt/TOS.txt b/static/txt/TOS.txt
new file mode 100644
index 0000000..2bd0e7a
--- /dev/null
+++ b/static/txt/TOS.txt
@@ -0,0 +1 @@
+<i>Please edit /static/txt/TOS.txt</i> \ No newline at end of file
diff --git a/rules.php b/tos.php
index 84e2b25..d410555 100644
--- a/rules.php
+++ b/tos.php
@@ -7,18 +7,21 @@ authorize_user();
$contents = "";
-$path = sprintf("%s/%s/txt/RULES", $_SERVER["DOCUMENT_ROOT"], INSTANCE_STATIC_FOLDER);
+$path = "{$_SERVER['DOCUMENT_ROOT']}/static/txt/TOS.txt";
+
+$contents = "<p>No rules!</p>";
+$last_updated = "Never";
if (is_file($path)) {
$contents = file_get_contents($path);
- $contents = explode("\n", $contents);
+ $last_updated = date("F d, Y", filemtime($path));
}
?>
<html>
<head>
- <title>The Rules of <?= CONFIG['instance']['name'] ?></title>
+ <title>Terms of Service - <?= CONFIG['instance']['name'] ?></title>
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/static/style.css">
</head>
@@ -30,17 +33,8 @@ if (is_file($path)) {
<div class="content row">
<div class="sidebar" style="min-width: 300px;"></div>
<div class="content">
- <h1>The Rules of <?= CONFIG['instance']['name'] ?></h1>
- <ol>
- <?php
- foreach ($contents as $line) {
- echo "<li>$line</li>";
- }
- if (empty($contents)) {
- echo "<i>No rules!</i>";
- }
- ?>
- </ol>
+ <h1>Terms of Service (Last updated: <?= $last_updated ?>)</h1>
+ <?= $contents ?>
</div>
</div>
</div>