37 lines
1.0 KiB
PHP
37 lines
1.0 KiB
PHP
<?php
|
|
|
|
include_once(__DIR__ . '/../../controller/DatabaseController.php');
|
|
include_once(__DIR__ . '/../../controller/DataController.php');
|
|
include_once(__DIR__ . '/../../controller/ApiController.php');
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
$api = (new ApiController());
|
|
|
|
if ($api->urlAuth($_GET['token']) == true ) {
|
|
|
|
if (isset($_GET['date'])) {
|
|
|
|
$date = $_GET['date'];
|
|
|
|
$data = DatabaseShowWithFK(
|
|
"Berufsschulberichte",
|
|
$Berufsschulberichte,
|
|
"*",
|
|
"DATUM = ?",
|
|
$date
|
|
);
|
|
} else {
|
|
$data = DatabaseShowWithFK(
|
|
"Berufsschulberichte",
|
|
$Berufsschulberichte,
|
|
);
|
|
}
|
|
echo $api->jsonSuccess($data);
|
|
$api->requestSave();
|
|
}
|
|
|
|
/**
|
|
* http://localhost:9000/api/v2/schoolReports.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3
|
|
* http://localhost:9000/api/v2/schoolReports.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3&date=2025-09-09
|
|
*/ |