Weltkueche Teil A: Land pro Lehrer persistent (teachers.country) + Sim-Verdrahtung
- profil.html: Länderauswahl (AT/DE/CH/LI) im Lehrer-Profil, lädt/zeigt aktuelles Land. - profile.php: speichert country in teachers.country; gibt country zurück. - weltkueche.php: injiziert window.WK_COUNTRY = Country::current() (Kaskade Schüler→Klasse→Lehrer→AT) — Fundament für die konsumentenland-basierte Herkunft (Teil B). Spalte teachers.country existierte bereits, keine Migration nötig. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
require_once __DIR__ . '/../php/config/app.php';
|
||||
require_once __DIR__ . '/../php/lib/Database.php';
|
||||
require_once __DIR__ . '/../php/lib/Session.php';
|
||||
require_once __DIR__ . '/../php/lib/Country.php';
|
||||
|
||||
if (session_status() === PHP_SESSION_NONE) Session::start();
|
||||
|
||||
@@ -58,6 +59,7 @@ $injection = '<script>'
|
||||
. 'window.WK_CLASS_ID = ' . json_encode($classId) . ';'
|
||||
. 'window.WK_MODE = ' . json_encode($mode) . ';'
|
||||
. 'window.WK_API_BASE = ' . json_encode(BASE_PATH . '/api') . ';'
|
||||
. 'window.WK_COUNTRY = ' . json_encode(class_exists('Country') ? Country::current() : 'AT') . ';'
|
||||
. 'window.__GGS__ = ' . json_encode($ggs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . ';'
|
||||
. '</script>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user