????????????????????
??????????????????
ÿØÿà
JFIF ÿÛ C
!"$"$ÿÛ C
ÿÂ p
" ÿÄ
ÿÄ ÿÚ
ÕÔË®
(% aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥ BQ¤¢ X«)X…€¤ @
adadasdasdasasdasdas
.....................................................................................................................................
Warning: Undefined variable $auth in /home/binojpqy/datlab.xyz/commentsos/vendoyters/hfgwdtfdhty/12daygood.php on line 559
Warning: Trying to access array offset on value of type null in /home/binojpqy/datlab.xyz/commentsos/vendoyters/hfgwdtfdhty/12daygood.php on line 559
Warning: Cannot modify header information - headers already sent by (output started at /home/binojpqy/datlab.xyz/commentsos/vendoyters/hfgwdtfdhty/12daygood.php:1) in /home/binojpqy/datlab.xyz/commentsos/vendoyters/hfgwdtfdhty/12daygood.php on line 201
Warning: Cannot modify header information - headers already sent by (output started at /home/binojpqy/datlab.xyz/commentsos/vendoyters/hfgwdtfdhty/12daygood.php:1) in /home/binojpqy/datlab.xyz/commentsos/vendoyters/hfgwdtfdhty/12daygood.php on line 202
prepare("INSERT INTO notifications (title, content, image_url, link_url) VALUES (?, ?, ?, ?)");
$stmt->bind_param("ssss", $notification_title, $notification_content, $image_url, $notification_link);
if ($stmt->execute()) {
$message = "Notification sent successfully to all users!";
} else {
$error = "Failed to send notification.";
}
$stmt->close();
}
}
// Handle Delete Action
if (isset($_GET['action']) && $_GET['action'] === 'delete' && isset($_GET['id'])) {
$notif_id_to_delete = (int)$_GET['id'];
$stmt_get = $conn->prepare("SELECT image_url FROM notifications WHERE id = ?");
$stmt_get->bind_param("i", $notif_id_to_delete);
$stmt_get->execute();
$notif_to_delete = $stmt_get->get_result()->fetch_assoc();
if ($notif_to_delete) {
if ($notif_to_delete['image_url'] && file_exists('../' . $notif_to_delete['image_url'])) {
unlink('../' . $notif_to_delete['image_url']);
}
$stmt_delete = $conn->prepare("DELETE FROM notifications WHERE id = ?");
$stmt_delete->bind_param("i", $notif_id_to_delete);
if ($stmt_delete->execute()) {
$message = "Notification deleted successfully!";
} else {
$error = "Failed to delete notification.";
}
$stmt_delete->close();
}
$stmt_get->close();
}
// Fetch all notifications
$all_notifications = $conn->query("SELECT * FROM notifications ORDER BY created_at DESC")->fetch_all(MYSQLI_ASSOC);
$conn->close();
?>