2018-07-09 13:57:20 +02:00
|
|
|
<?php
|
2020-06-02 19:24:32 +02:00
|
|
|
$c = strtolower($_COOKIE['kustyle']);
|
|
|
|
if ($c && in_array($c, explode(',', $_GET['allowed']))) {
|
|
|
|
$is_custom = ($c == $_GET['custom']);
|
|
|
|
$style = $_COOKIE['kustyle'];
|
2018-07-09 13:57:20 +02:00
|
|
|
}
|
2020-06-02 19:24:32 +02:00
|
|
|
elseif ($_GET['custom']) {
|
|
|
|
$style = $_GET['custom'];
|
|
|
|
$is_custom = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$style = $_GET['default'];
|
|
|
|
$is_custom = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$url = '/css/'.
|
|
|
|
($is_custom ? 'custom/' : '').
|
|
|
|
strtolower($style).'.css?v='.
|
|
|
|
($is_custom ? $_GET['cv'] : $_GET['v']);
|
|
|
|
header('Location: ' . $url, true, 303);
|
|
|
|
die();
|
2018-07-09 13:57:20 +02:00
|
|
|
?>
|