show lead name in notifications
This commit is contained in:
@@ -489,12 +489,13 @@
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$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(':email', $_SESSION['email']);
|
||||
$stmt->bindParam(':name', $_SESSION['name']);
|
||||
$stmt->bindParam(':leadid', $_GET['id']);
|
||||
$stmt->bindParam(':comment', $_POST['comment']);
|
||||
$stmt->bindParam(':lead_name', $_POST['lead_name']);
|
||||
$stmt->execute();
|
||||
$saved_message = "New Appointment save successfully";
|
||||
} catch(PDOException $e) {
|
||||
@@ -694,6 +695,7 @@
|
||||
<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;" />
|
||||
</div>
|
||||
<input type="text" name="lead_name" id="lead_name" value="<?php echo $usersNameforSendMessage; ?>">
|
||||
<div class="flex flex-col">
|
||||
<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;" />
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
// second & final query to get the page_view data
|
||||
|
||||
$sql = "SELECT * FROM cleads WHERE business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ORDER BY id DESC LIMIT :limit OFFSET :offset";
|
||||
$sql = "SELECT * FROM cleads WHERE business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ORDER BY id DESC LIMIT :limit OFFSET :offset";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bindValue(':businessVertical', "%".$businessVertical."%");
|
||||
$stmt->bindValue(':searchTerm', "%$searchTerm%");
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<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-row place-items-center justify-between">
|
||||
<div class="flex flex-row place-items-center">🕑 Reminders for <?php echo $appt['name'].' '. $notification_batch; ?></div>
|
||||
<div class="flex flex-row place-items-center">🕑 Reminders for <?php echo $appt['lead_name'].' '. $notification_batch; ?></div>
|
||||
|
||||
<div><?php echo $appt['appt_date']; ?></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user