initial commit
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$status = $_GET['status'] ?? '';
|
||||
$message = $_GET['message'] ?? '';
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Push Notification senden</title>
|
||||
<link rel="stylesheet" href="assets/css/tailwind.min.css">
|
||||
</head>
|
||||
<body class="bg-gray-100 min-h-screen">
|
||||
|
||||
<div class="max-w-2xl mx-auto py-10 px-4">
|
||||
|
||||
<div class="bg-white shadow-lg rounded-lg p-8">
|
||||
|
||||
<h1 class="text-3xl font-bold mb-6">
|
||||
Push Notification senden
|
||||
</h1>
|
||||
|
||||
<?php if ($status === 'success'): ?>
|
||||
<div class="bg-green-100 border border-green-300 text-green-800 p-4 rounded mb-6">
|
||||
<?= htmlspecialchars($message) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($status === 'error'): ?>
|
||||
<div class="bg-red-100 border border-red-300 text-red-800 p-4 rounded mb-6">
|
||||
<?= htmlspecialchars($message) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="send.php" method="post" id="pushForm">
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block font-medium mb-2">
|
||||
Titel
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="title"
|
||||
required
|
||||
maxlength="255"
|
||||
class="w-full border rounded-lg p-3"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="block font-medium mb-2">
|
||||
Nachricht
|
||||
</label>
|
||||
<textarea
|
||||
name="message"
|
||||
required
|
||||
rows="6"
|
||||
class="w-full border rounded-lg p-3"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<label class="block font-medium mb-2">
|
||||
Priorität
|
||||
</label>
|
||||
|
||||
<select
|
||||
name="type"
|
||||
id="type"
|
||||
class="w-full border rounded-lg p-3"
|
||||
>
|
||||
<option value="info">Normal</option>
|
||||
<option value="warning">Wichtig</option>
|
||||
<option value="danger">Sehr Dringend</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg"
|
||||
>
|
||||
Senden
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('pushForm').addEventListener('submit', function(e) {
|
||||
|
||||
const type = document.getElementById('type').value;
|
||||
|
||||
if (type === 'danger') {
|
||||
|
||||
const confirmed = confirm(
|
||||
'Diese Nachricht wird als SEHR DRINGEND versendet.\n\nBist du sicher?'
|
||||
);
|
||||
|
||||
if (!confirmed) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user