summaryrefslogtreecommitdiffstats
path: root/consts.php
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2023-04-13 15:47:15 +0200
committerMaksymilian Jopek <maks@jopek.eu>2023-04-13 15:47:15 +0200
commit87ffa36c1bfa49259e48d94f09e64f83632f0071 (patch)
tree87a5f2157474c6b31a2efddaf8df5aad886ff070 /consts.php
downloadcms-master.tar.gz
cms-master.tar.zst
cms-master.zip
Diffstat (limited to 'consts.php')
-rw-r--r--consts.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/consts.php b/consts.php
new file mode 100644
index 0000000..0f5e44d
--- /dev/null
+++ b/consts.php
@@ -0,0 +1,13 @@
+<?php
+$UserType = [
+ "admin" => 1, 1 => "admin",
+ "user" => 2, 2 => "user"
+];
+function checkLoggedIn()
+{
+ if ($_SESSION["logged"] !== true) {
+ header("HTTP/1.0 403 Teapot not for you :'(");
+ header("Location: index.php");
+ exit();
+ }
+}