summaryrefslogtreecommitdiff
path: root/view.php
diff options
context:
space:
mode:
authorJonas Kohl <git@jonaskohl.de>2024-09-06 14:38:26 +0200
committerJonas Kohl <git@jonaskohl.de>2024-09-06 14:38:26 +0200
commit0540e04c77864186ce48193456634b897a11f5aa (patch)
tree92607cc903a9b0dc482ca14f3d33ab9c3707d78c /view.php
parent2d8a37e7ac46aa100f2e460b024d21bae2883f5b (diff)
Add mobile version
Diffstat (limited to 'view.php')
-rw-r--r--view.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/view.php b/view.php
new file mode 100644
index 0000000..d9ca226
--- /dev/null
+++ b/view.php
@@ -0,0 +1,13 @@
+<?php
+
+$next = $_GET["next"] ?? null;
+$view = $_GET["view"] ?? null;
+
+if ($view === "m")
+ setcookie("mv", "1", time()+60*60*24*90);
+elseif ($view === "d")
+ setcookie("mv", "0", time()+60*60*24*90);
+else
+ setcookie("mv", "", time()-3600);
+
+header("Location: $next");