Commit new slackware.uk content (with themes).
This commit is contained in:
parent
085631e3d3
commit
e06c1db9cb
54 changed files with 1457 additions and 2572 deletions
21
html/toggletheme.php
Normal file
21
html/toggletheme.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
require ("includes/vars.php");
|
||||
$cookie_data = array(
|
||||
"expires" => "Tue, 31 Dec 2069 23:59:59 GMT",
|
||||
"domain" => ".slackware.uk",
|
||||
"path" => "/",
|
||||
"httponly" => true,
|
||||
"samesite" => "Lax"
|
||||
);
|
||||
if (!$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