mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
admin: merge acces-etudiante+file-access into acces.php, absorb system.php into parametres.php
This commit is contained in:
31
app/public/admin/acces.php
Normal file
31
app/public/admin/acces.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../../bootstrap.php';
|
||||
require_once __DIR__ . '/../../src/AdminAuth.php';
|
||||
require_once __DIR__ . '/../../src/ShareLink.php';
|
||||
|
||||
App::adminGuard();
|
||||
|
||||
// ── Liens d'accès étudiant·e ──────────────────────────────────────────────────
|
||||
$shareLink = ShareLink::make();
|
||||
$links = $shareLink->listAll();
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
||||
$baseUrl = $protocol . '://' . ($_SERVER['HTTP_HOST'] ?? 'localhost');
|
||||
|
||||
// ── Demandes d'accès aux fichiers ─────────────────────────────────────────────
|
||||
require_once APP_ROOT . '/src/Controllers/FileAccessController.php';
|
||||
|
||||
$controller = FileAccessController::create();
|
||||
$vars = $controller->handle();
|
||||
extract($vars);
|
||||
|
||||
// ── Page setup ────────────────────────────────────────────────────────────────
|
||||
$pageTitle = 'Accès';
|
||||
$isAdmin = true;
|
||||
$bodyClass = 'admin-body';
|
||||
|
||||
require_once APP_ROOT . '/templates/head.php';
|
||||
echo '<link rel="stylesheet" href="/assets/css/file-access.css">';
|
||||
include APP_ROOT . '/templates/header.php';
|
||||
include APP_ROOT . '/templates/admin/acces.php';
|
||||
require_once APP_ROOT . '/templates/admin/footer.php';
|
||||
Reference in New Issue
Block a user