cscg25 continues

This commit is contained in:
2025-03-24 22:03:34 +01:00
parent 4db3a89e70
commit 04a5de372e
61 changed files with 3096 additions and 110 deletions

View File

@@ -0,0 +1,14 @@
<?php
class AdminController
{
public function admin($router)
{
if($_SESSION["admin"] === false) {
return $router->view('admin', ['logs' => "Only access allowed for canteen admin!!!"]);
} else {
$admin = new AdminModel("/logs.txt","");
return $router->view('admin', ['logs' => $admin->read_logs("/logs.txt")]);
}
}
}