diff options
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) { |
