This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. */ if (!isset($setupdone)) { $setupdone=TRUE; include "database.php"; $semester = ["WiSe 2025/26", "SoSe 2025", "WiSe 2024/25"]; $admins = ["beckmanf"]; function my_session_start() { $secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'); session_start([ 'use_strict_mode' => 1, 'cookie_httponly' => 1, 'cookie_secure' => $secure, // Only if using HTTPS 'cookie_samesite' => 'Strict', // or 'Lax' 'use_only_cookies' => 1 ]); // Set session timeout if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) { // 30 minutes session_unset(); session_destroy(); } $_SESSION['LAST_ACTIVITY'] = time(); } $pfp = array ( "ti" => array ( "name" => "Technische Informatik", "pnr" => ["1710080", "3707100"], "studiengang" => ["EI", "ME"] ), "dt" => array ( "name" => "Digitaltechnik", "pnr" => ["3976090"], "studiengang" => ["TI"] ), "amt" => array ( "name" => "Prüfungsamt", "pnr" => [], "studiengang" => [] ) ); $notenlabor = ["BE", "NB", "AB", "NM", "NA"]; $notenklausur = ["100","130","170","200","230","270","300","330","370","400","500"]; $notenamt = ["1"]; //amt is either 1 or not set, i.e "" $notendelete = ["00", "000"]; //Unset value in database "00" for labor, "000" for klausur $students = array ( "1234567" => array ( "vorname" => "Karl", "nachname" => "Meier", "studiengang" => "EI", "noten" => array ( "ti" => array ( "klausur" => "500", "labor" => "BE", "amt" => "" ), "dt" => [] ), "history" => ["nix passiert"] ), "1111111" => array ( "vorname" => "Claudia", "nachname" => "Darbo", "studiengang" => "ME", "noten" => array("ti" => [],"dt" => []), "history" => ["noch nix passiert"] ), "2222222" => array ( "vorname" => "Günther", "nachname" => "Kohl", "studiengang" => "TI", "noten" => array("ti" => [],"dt" => []), "history" => ["gar nix passiert", "oder doch?"] ) ); $groups = array ( "WiSe 2025/26" => array ( "ti" => array ( "G99-AA" => ["1234567", "1111111"], "G99-ZZ" => ["2222222", "1111111"] ) ), "SoSe 2025" => array ( "ti" => array ( "G99-AA" => ["1111111"], "G98-ZZ" => ["2222222"] ), "dt" => array ( "G99-KK" => ["1111111"], "G37-ZZ" => ["2222222","1234567"] ) ) ); db_read(); } //setupdone ?>