Merge branch 'main' into DEV
This commit is contained in:
commit
3d170a38d8
1 file changed
+14
-2
@@ -1,4 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
include_once __DIR__ . '/../controller/DatabaseController.php';
|
||||||
|
include_once __DIR__ . '/../controller/RoutesController.php';
|
||||||
|
|
||||||
$conn = db_connect();
|
$conn = db_connect();
|
||||||
$view = $_GET['view'] ?? 'show';
|
$view = $_GET['view'] ?? 'show';
|
||||||
$selectedService = $_GET['service'];
|
$selectedService = $_GET['service'];
|
||||||
@@ -8,8 +11,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_overtime'])) {
|
|||||||
$datum = $_POST['ot_date'];
|
$datum = $_POST['ot_date'];
|
||||||
$minuten = intval($_POST['ot_minutes']);
|
$minuten = intval($_POST['ot_minutes']);
|
||||||
$grund = $conn->real_escape_string($_POST['ot_reason']);
|
$grund = $conn->real_escape_string($_POST['ot_reason']);
|
||||||
$insert_sql = "INSERT INTO Ueberstunden (DATUM, MINUTEN, GRUND) VALUES ('$datum', $minuten, '$grund')";
|
|
||||||
$conn->query($insert_sql);
|
DatabaseInsert(
|
||||||
|
"Ueberstunden",
|
||||||
|
"DATUM, MINUTEN, GRUND",
|
||||||
|
$datum,
|
||||||
|
$minuten,
|
||||||
|
$grund
|
||||||
|
);
|
||||||
|
|
||||||
|
redirectToWebsite((new getSpecificData())->getReferer());
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Gesamtsumme berechnen ---
|
// --- Gesamtsumme berechnen ---
|
||||||
|
|||||||
Reference in new issue
Block a user