diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-08 01:37:19 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-08 01:37:19 +0400 |
| commit | 9a58eaae53bdd2a4fcdd66b1eb852c7db7970de9 (patch) | |
| tree | 8e83f5144674501a7e4c1739f4abc583ef78e065 /lib | |
| parent | 371d863870520da9a4f3383d7c52e1720c074d03 (diff) | |
feat: moderation system
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/partials.php | 10 | ||||
| -rw-r--r-- | lib/utils.php | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/partials.php b/lib/partials.php index c35fe43..afd36d6 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -23,6 +23,11 @@ function html_big_navbar() <a href="/uploaders.php"> <button>Uploaders</button> </a> + <?php if (isset($_SESSION['is_moderator'])): ?> + <a href="/mod.php"> + <button>Moderation</button> + </a> + <?php endif; ?> </div> </section> <?php ; @@ -49,6 +54,11 @@ function html_mini_navbar() <a href="/uploaders.php"> <button>Uploaders</button> </a> + <?php if (isset($_SESSION['is_moderator'])): ?> + <a href="/mod.php"> + <button>Moderation</button> + </a> + <?php endif; ?> </div> </section> <?php ; diff --git a/lib/utils.php b/lib/utils.php index 31d8778..eb868a2 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -1,5 +1,6 @@ <?php include_once $_SERVER['DOCUMENT_ROOT'] . '/../config.php'; +define('IS_JSON_REQUEST', $_SERVER['HTTP_ACCEPT'] == 'application/json'); function json_response(mixed $data, string|null $message, int $code = 200) { |
