'niver', 'sid_length' => 64, 'cookie_secure' => true, 'cookie_httponly' => true, 'cookie_samesite' => 'Strict', 'gc_maxlifetime' => 604800, ]); $usernamePattern = "[a-z]{4,32}"; $passwordPattern = ".{10,1024}"; $prefixURL = "/capuche"; $rootPath = "/var/www/niver" . $prefixURL; $address = basename($_SERVER['PHP_SELF'], '.php'); $service = dirname($_SERVER['PHP_SELF']); if ($service != $prefixURL . "/auth" AND !isset($_SESSION['username'])) { header('Location: ' . $prefixURL . '/auth/'); exit; } define("DB_PATH", $rootPath . "/db/auth.db"); $dbPath = $rootPath . "/db/auth.db"; $theme = array( 'htColor' => "#FF0000", 'nicColor' => "#DA03E5", 'authColor' => "#00FF00", 'nsColor' => "#00FFFF", 'lightColor' => '#FFFFFF', 'darkColor' => '#2a2a2a', ); switch ($service) { case $prefixURL . "/ht": $theme = array('mainColor' => $theme['htColor']) + $theme; break; case $prefixURL . "/nic": $theme = array('mainColor' => $theme['nicColor']) + $theme; break; case $prefixURL . "/auth": $theme = array('mainColor' => $theme['authColor']) + $theme; break; case $prefixURL . "": $theme = array('mainColor' => $theme['authColor']) + $theme; break; case $prefixURL . "/ns": $theme = array('mainColor' => $theme['nsColor']) + $theme; break; } require "pages.inc.php"; require "fn.inc.php"; require_once 'lessphp/lib/Less/Autoloader.php'; Less_Autoloader::register(); $relativeLessFiles = array_diff(scandir($rootPath . "/less"), array('..', '.')); $relativeLessFiles = array_flip($relativeLessFiles); foreach ($relativeLessFiles as $relativeLessFile => $nothing) { $absoluteLessFiles[$rootPath . "/less/" . $relativeLessFile] = ""; } $options = array('cache_dir' => $rootPath . '/css/'); //, 'compress' => true $cssFileName = Less_Cache::Get($absoluteLessFiles, $options, $theme); ?>