notehub/html/colormode.php
Jan BELLON b18f8b32a1 Update 26 files
- /bdd/notehub.sql
- /doc/cahierdescharges.pdf
- /html/notes.php
- /html/profil.php
- /html/register.php
- /html/style.css
- /html/addcas.php
- /html/admin.php
- /html/colormode.php
- /html/data_usage.php
- /html/devoirs.php
- /html/favicon.ico
- /html/index.php
- /html/login.php
- /html/logout.php
- /html/main.js
- /html/img/notehub1.png
- /html/img/notehub2.png
- /html/img/default_pp.jpg
- /html/img/logo.png
- /html/img/notehub.png
- /html/img/notehub0.png
- /include/connect.php
- /include/functions.php
- /include/config.php
- /log/notehub.log
2025-03-01 23:57:27 +01:00

19 lines
376 B
PHP

<?php
session_start();
if (!isset($_SESSION['colormode']) || !isset($_GET['source'])) {
http_response_code(403);
exit();
}
if (!isset($_GET['mode'])) {
header("Location: " . $_GET['source']);
exit();
}
if (in_array($_GET['mode'], [0,1,2])){
$_SESSION['colormode'] = $_GET['mode'];
header("Location: " . $_GET['source']);
} else {
http_response_code(403);
exit();
}
?>