changed repo structure

This commit is contained in:
2025-06-06 02:50:04 +02:00
parent e887de976a
commit 6e6ee357b8
8848 changed files with 2089898 additions and 9 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")]);
}
}
}

View File

@@ -0,0 +1,12 @@
<?php
class CanteenController
{
public function index($router)
{
$food = new CanteenModel(0);
if(isset($_GET['price'])) {
return $router->view('index', ['food' => $food->filterFood($_GET['price'])]);
}
return $router->view('index', ['food' => $food->getFood()]);
}
}