summaryrefslogtreecommitdiff
path: root/rules.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-08 21:53:36 +0500
committerilotterytea <iltsu@alright.party>2025-12-08 21:53:36 +0500
commit57472eab3c7b035392c6a5aa240593ecaa7d1ccf (patch)
tree9da30829290f225be2dab3d383549cbfda82ed19 /rules.php
parent6541d0f3888862ab049055fd418b700f73eed367 (diff)
upd: moved all /public/ files to the root folder
Diffstat (limited to 'rules.php')
-rw-r--r--rules.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/rules.php b/rules.php
new file mode 100644
index 0000000..027b994
--- /dev/null
+++ b/rules.php
@@ -0,0 +1,50 @@
+<?php
+include_once "../src/config.php";
+include_once "../src/partials.php";
+include_once "../src/accounts.php";
+
+authorize_user();
+
+$contents = "";
+
+$path = sprintf("%s/%s/txt/RULES", $_SERVER["DOCUMENT_ROOT"], INSTANCE_STATIC_FOLDER);
+
+if (is_file($path)) {
+ $contents = file_get_contents($path);
+ $contents = explode("\n", $contents);
+}
+?>
+
+<html>
+
+<head>
+ <title>The Rules of <?php echo 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>The Rules of <?php echo INSTANCE_NAME ?></h1>
+ <ol>
+ <?php
+ foreach ($contents as $line) {
+ echo "<li>$line</li>";
+ }
+ if (empty($contents)) {
+ echo "<i>No rules!</i>";
+ }
+ ?>
+ </ol>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+
+</html> \ No newline at end of file