show lead name in notifications

This commit is contained in:
Suvodip
2024-08-17 18:42:50 +05:30
parent e643b06cc1
commit 0b92a5797e
3 changed files with 5 additions and 3 deletions

View File

@@ -489,12 +489,13 @@
try { try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("INSERT INTO appointment (appt_date, email, name, leadid, comment) VALUES (:appt_date, :email, :name, :leadid, :comment)"); $stmt = $conn->prepare("INSERT INTO appointment (appt_date, email, name, leadid, comment, lead_name) VALUES (:appt_date, :email, :name, :leadid, :comment, :lead_name)");
$stmt->bindParam(':appt_date', $_POST['appt_date']); $stmt->bindParam(':appt_date', $_POST['appt_date']);
$stmt->bindParam(':email', $_SESSION['email']); $stmt->bindParam(':email', $_SESSION['email']);
$stmt->bindParam(':name', $_SESSION['name']); $stmt->bindParam(':name', $_SESSION['name']);
$stmt->bindParam(':leadid', $_GET['id']); $stmt->bindParam(':leadid', $_GET['id']);
$stmt->bindParam(':comment', $_POST['comment']); $stmt->bindParam(':comment', $_POST['comment']);
$stmt->bindParam(':lead_name', $_POST['lead_name']);
$stmt->execute(); $stmt->execute();
$saved_message = "New Appointment save successfully"; $saved_message = "New Appointment save successfully";
} catch(PDOException $e) { } catch(PDOException $e) {
@@ -694,6 +695,7 @@
<label for="appt_date">Appointment Date</label> <label for="appt_date">Appointment Date</label>
<input type="datetime-local" name="appt_date" id="appt_date" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" /> <input type="datetime-local" name="appt_date" id="appt_date" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" />
</div> </div>
<input type="text" name="lead_name" id="lead_name" value="<?php echo $usersNameforSendMessage; ?>">
<div class="flex flex-col"> <div class="flex flex-col">
<label for="appt-comment">Description (if needed)</label> <label for="appt-comment">Description (if needed)</label>
<input type="text" name="comment" id="appt-comment" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" /> <input type="text" name="comment" id="appt-comment" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" />

View File

@@ -53,7 +53,7 @@
<button type="submit" class="w-full text-left" <?php echo $clickButton; ?>> <button type="submit" class="w-full text-left" <?php echo $clickButton; ?>>
<div class="flex flex-col w-full p-2 rounded-md shadow" style="border: 3px solid #F5F4FFE8; <?php echo $notification_bg; ?>"> <div class="flex flex-col w-full p-2 rounded-md shadow" style="border: 3px solid #F5F4FFE8; <?php echo $notification_bg; ?>">
<div class="flex flex-row place-items-center justify-between"> <div class="flex flex-row place-items-center justify-between">
<div class="flex flex-row place-items-center">🕑 Reminders for &nbsp;<?php echo $appt['name'].'&nbsp;&nbsp;'. $notification_batch; ?></div> <div class="flex flex-row place-items-center">🕑 Reminders for &nbsp;<?php echo $appt['lead_name'].'&nbsp;&nbsp;'. $notification_batch; ?></div>
<div><?php echo $appt['appt_date']; ?></div> <div><?php echo $appt['appt_date']; ?></div>
</div> </div>