Start using new HTML5/CSS code.
This commit is contained in:
parent
6808d61199
commit
cb4688d7a6
23 changed files with 650 additions and 616 deletions
20
html/toggletheme.php
Normal file
20
html/toggletheme.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
$cookie_data = array(
|
||||
"expires" => mktime (23, 59, 59, 12, 31, 2069),
|
||||
"domain" => ".slackware.uk",
|
||||
"path" => "/",
|
||||
"httponly" => true,
|
||||
"samesite" => "Lax"
|
||||
);
|
||||
if ($_COOKIE['theme'] != "light") {
|
||||
$theme = "light";
|
||||
} else {
|
||||
$theme = "dark";
|
||||
}
|
||||
setcookie ("theme", $theme, $cookie_data);
|
||||
if (isset ($_SERVER['HTTP_REFERER'])) {
|
||||
header ("Location: " . $_SERVER['HTTP_REFERER'], true, 302);
|
||||
} else {
|
||||
header ("Location: /", true, 302);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue