initial commit

This commit is contained in:
2026-07-22 01:12:45 +02:00
commit 124f2746ac
357 changed files with 159669 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
require_once "../config/config.php";
header('Content-Type: application/json; charset=utf-8');
try {
if ($_SERVER['REQUEST_METHOD'] !== 'POST') throw new RuntimeException('Method not allowed');
$id = (int)($_POST['id'] ?? 0);
if ($id <= 0) throw new RuntimeException('id fehlt');
$stmt = $pdo->prepare("DELETE FROM finance_expenses WHERE id=:id");
$stmt->execute([':id'=>$id]);
echo json_encode(['ok'=>true], JSON_UNESCAPED_UNICODE);
} catch (Throwable $e) {
http_response_code(400);
echo json_encode(['ok'=>false,'error'=>$e->getMessage()]);
}