Create getThemeOpt

This commit is contained in:
billz 2020-06-30 16:53:52 +01:00
parent 2a1f531ffa
commit 9fef770143
1 changed files with 11 additions and 0 deletions

View File

@ -417,3 +417,14 @@ function formatDateAgo($datetime, $full = false)
if (!$full) $string = array_slice($string, 0, 1);
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
function getThemeOpt()
{
if (!isset($_COOKIE['theme'])) {
$theme = "custom.php";
} else {
$theme = $_COOKIE['theme'];
}
return 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
}