Files
geograsim/App/index.php
T
Adminator 9a61f55cb1 Atlas: Infrastruktur + Team-Konventionen + Sprachregel Lernarbeit
- Design-System (assets/css/design-system.css) mit 21 Komponenten,
  iPad-Responsive-Breakpoints, Touch-Ziele 36px, Music-Player,
  Glossar-Tooltips
- Templates (sims/template.html + student/teacher-Dashboard)
- Docs: module-interface.md (inkl. 4a Sprachregel, 4b Leichte Sprache,
  4c iPad), content-architecture.md, crash-recovery.md, music-registry.md
- Admin-Infrastruktur: admin-modules.html + api/admin-modules.php
  (Titel, Emoji, Bild, Status, Dauer, Alter pro Modul)
- Inbox-System: _inbox/README.md + _status.md fuer Atlas + Briefings
  an Klima, Glossar, Lehrplan, Fluss
- Zentrale SFX-Pipeline (scripts/generate-sounds.py)
- DALL-E-Bilder: 8 Badges + 5 Glossar-Repraesentationsbilder (Querformat)
- Logo + Inter-Font lokal
- PHP-APIs: admin, glossar, levels, licenses, progress, waypoints,
  assignments, profile, tickets
- Spielsprache entfernt (admin-modules, admin-levels, schueler)
- Landing-Page-Bearbeitungen (Boote sichtbarer, Button-Hintergrund)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:51:14 +02:00

61 lines
1.7 KiB
PHP

<?php
/**
* GeoGraSim — Front Controller
* Alle Requests laufen ueber diese Datei (via .htaccess Rewrite).
*/
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/Response.php';
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
}
require_once __DIR__ . '/php/lib/Mailer.php';
require_once __DIR__ . '/php/templates/_scripts.php';
Session::start();
// Request-Pfad parsen
$requestUri = $_SERVER['REQUEST_URI'] ?? '/';
$basePath = BASE_PATH;
$path = parse_url($requestUri, PHP_URL_PATH);
// Base-Path entfernen
if (strpos($path, $basePath) === 0) {
$path = substr($path, strlen($basePath));
}
$path = trim($path, '/');
if ($path === '') $path = 'index';
// API-Routen
if (strpos($path, 'api/') === 0) {
$apiFile = preg_replace('/[^a-z0-9\-]/', '', substr($path, 4));
$apiPath = __DIR__ . '/php/api/' . $apiFile . '.php';
if (file_exists($apiPath)) {
require $apiPath;
exit;
}
Response::error('API-Endpunkt nicht gefunden', 404);
}
// Seiten-Routen
$page = preg_replace('/[^a-z0-9\-]/', '', $path);
$pageFile = __DIR__ . '/pages/' . $page . '.php';
if (file_exists($pageFile)) {
require $pageFile;
exit;
}
// Fallback: Original HTML-Dateien (Uebergangsphase)
$htmlFile = __DIR__ . '/' . $page . '.html';
if (file_exists($htmlFile)) {
readfile($htmlFile);
exit;
}
// 404
http_response_code(404);
echo '<!DOCTYPE html><html><body><h1>404 — Seite nicht gefunden</h1><p><a href="' . BASE_PATH . '/">Zur&uuml;ck zur Startseite</a></p></body></html>';