diff --git a/php/php-dog/deleteProfil.php b/php/php-dog/deleteProfil.php new file mode 100644 index 0000000..9491722 --- /dev/null +++ b/php/php-dog/deleteProfil.php @@ -0,0 +1,54 @@ +dbConnection(); + +//var_dump($_POST); + +//IF REQUEST METHOD IS NOT EQUAL TO POST +if($_SERVER["REQUEST_METHOD"] != "POST") +{ + $returnData = new CMsg(0,404,'Page Not Found! REQUEST_METHOD'); + echo $returnData->jsonarray(); + return; +} + +if( + !isset($_POST['qr_id']) + || !isset($_POST['qr_id']) +) +{ + $fields = ['fields' => ['qr_id']]; + $returnData = new CMsg(0, 422, 'Please Fill in all Required Fields!', $fields); + echo $returnData->jsonarray(); + return; +} +else +{ + try + { + $stmt = $conn->prepare("DELETE FROM `dogs` WHERE `qr_id`=?"); + $stmt->execute([$qr_id]); + + if($stmt->rowCount()) + { + // delete upload dir + } + + } +} diff --git a/src/App.css b/src/App.css index a63ce2e..1985e48 100644 --- a/src/App.css +++ b/src/App.css @@ -27,7 +27,11 @@ img background: #ffffff; } - +.mantine-FileInput-input +{ + min-width: 300px; + text-align: center; +} @media print { diff --git a/src/components/DogNavbar.tsx b/src/components/DogNavbar.tsx index be6bd21..3b58e8f 100644 --- a/src/components/DogNavbar.tsx +++ b/src/components/DogNavbar.tsx @@ -26,8 +26,8 @@ const openDeleteModal = () => centered: true, children: ( - Are you sure you want to delete your profile? This action is destructive and you will have - to contact support to restore your data. + Wirklich Dein Profil löschen? Alle Daten gehen verloren und können nicht + wiederhergestellt werden! ), labels: { confirm: 'Account löschen', cancel: "Behalten, nicht löschen" },