summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-08-15 22:41:54 +0500
committerilotterytea <iltsu@alright.party>2025-08-15 22:41:54 +0500
commit0d7ecc616d669f824f8416b47a0a986b46fa579b (patch)
tree4c5143d404e272f341876945bed7f42dc7d75238 /lib
parente971d763cb649a51d26f75e8764ffbcb2d9d7a2b (diff)
feat: registration page
Diffstat (limited to 'lib')
-rw-r--r--lib/partials.php11
-rw-r--r--lib/utils.php11
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/partials.php b/lib/partials.php
new file mode 100644
index 0000000..e11e194
--- /dev/null
+++ b/lib/partials.php
@@ -0,0 +1,11 @@
+<?php
+function html_navbar()
+{
+ echo '' ?>
+ <header>
+ <a href="/">
+ <img src="/static/brand/big.webp" alt="ilt.su">
+ </a>
+ </header>
+ <?php ;
+} \ No newline at end of file
diff --git a/lib/utils.php b/lib/utils.php
new file mode 100644
index 0000000..b81ddda
--- /dev/null
+++ b/lib/utils.php
@@ -0,0 +1,11 @@
+<?php
+function json_response(int $code, string|null $message, mixed $data)
+{
+ header('Content-Type: application/json');
+ http_response_code($code);
+ return json_encode([
+ 'status_code' => $code,
+ 'message' => $message,
+ 'data' => $data
+ ], JSON_UNESCAPED_SLASHES);
+} \ No newline at end of file