update email template id and fix comment duplicate post

This commit is contained in:
2025-12-31 06:45:00 +00:00
parent 48b931310d
commit 49d8a8ff5a

View File

@@ -320,7 +320,7 @@
if (!empty($_GET['send-email-id']) && is_numeric($_GET['send-email-id'])) { if (!empty($_GET['send-email-id']) && is_numeric($_GET['send-email-id'])) {
$url = "https://api.brevo.com/v3/smtp/email"; $url = "https://api.brevo.com/v3/smtp/email";
$apiKey = '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'; // better use env $apiKey = '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';
$data = [ $data = [
"to" => [ "to" => [
@@ -459,6 +459,7 @@
$stmt->bindParam(':leadid', $_GET['id']); $stmt->bindParam(':leadid', $_GET['id']);
$stmt->execute(); $stmt->execute();
echo "New Comment save successfully"; echo "New Comment save successfully";
echo "<script>window.location.href = '/edit-lead/?id=" . $_GET['id'] . "';</script>";
} catch(PDOException $e) { } catch(PDOException $e) {
echo "Error: " . $e->getMessage(); echo "Error: " . $e->getMessage();
} }
@@ -485,11 +486,11 @@
$commenter_first_name_letter = substr($commenter_name_parts[0], 0, 1); $commenter_first_name_letter = substr($commenter_name_parts[0], 0, 1);
$commenter_last_name_letter = substr($commenter_name_parts[count($commenter_name_parts) - 1], 0, 1); $commenter_last_name_letter = substr($commenter_name_parts[count($commenter_name_parts) - 1], 0, 1);
?> ?>
<div style=""> <div >
<div class="flex flex-row place-items-center" style="margin-top: 3px;"> <div class="flex flex-row place-items-center" style="margin-top: 3px;">
<p class=" p-2" style="background: linear-gradient(180deg, #E4C1F9 0%, rgba(129, 126, 242, 0.91) 100%); border-radius: 50%; font-size: 20px; color: #fff; font-weight: bold; text-transform: uppercase;"><?php echo $commenter_first_name_letter.$commenter_last_name_letter; ?></p> <p class=" p-2" style="background: linear-gradient(180deg, #E4C1F9 0%, rgba(129, 126, 242, 0.91) 100%); border-radius: 50%; font-size: 20px; color: #fff; font-weight: bold; text-transform: uppercase;"><?php echo $commenter_first_name_letter.$commenter_last_name_letter; ?></p>
<p ><b style="font-size: 16px;"> <?php echo $row['user'] ?></b><br><?php echo date("Y-m-d", strtotime($row['created_at'])) ?></p> <p><b style="font-size: 16px;"> <?php echo $row['user'] ?></b><br><?php echo date("Y-m-d", strtotime($row['created_at'])) ?></p>
<p style=""></p> <p></p>
</div> </div>
<p style="margin-top: 10px;"><?php echo $row['comments']; ?></p> <p style="margin-top: 10px;"><?php echo $row['comments']; ?></p>
</div> </div>
@@ -769,45 +770,46 @@
]; ];
let atheneumData = [ let atheneumData = [
{templateName: "Welcome mail", templateID: "125", verticals: "atheneum"}, {templateName: "Welcome mail", templateID: "199", verticals: "atheneum"},
{templateName: "Introduction mail", templateID: "126", verticals: "atheneum"}, {templateName: "Introduction mail", templateID: "339", verticals: "atheneum"},
{templateName: "DNP", templateID: "127", verticals: "atheneum"}, {templateName: "DNP", templateID: "332", verticals: "atheneum"},
{templateName: "MTT", templateID: "128", verticals: "atheneum"}, {templateName: "MTT", templateID: "333", verticals: "atheneum"},
{templateName: "SEN", templateID: "140", verticals: "atheneum"}, {templateName: "SEN", templateID: "334", verticals: "atheneum"},
{templateName: "PPTTC", templateID: "129", verticals: "atheneum"}, {templateName: "PPTTC", templateID: "335", verticals: "atheneum"},
{templateName: "NTT", templateID: "142", verticals: "atheneum"}, {templateName: "NTT", templateID: "336", verticals: "atheneum"},
{templateName: "CDA", templateID: "130", verticals: "atheneum"}, {templateName: "CDA", templateID: "337", verticals: "atheneum"},
{templateName: "TEFL", templateID: "131", verticals: "atheneum"}, {templateName: "TEFL", templateID: "338", verticals: "atheneum"},
{templateName: "TESOL LEVEL 7", templateID: "132", verticals: "atheneum"}, {templateName: "TESOL LEVEL 7", templateID: "339", verticals: "atheneum"},
{templateName: "TESOL", templateID: "134", verticals: "atheneum"}, {templateName: "TESOL", templateID: "340", verticals: "atheneum"},
{templateName: "ECCE", templateID: "135", verticals: "atheneum"}, {templateName: "ECCE", templateID: "342", verticals: "atheneum"},
{templateName: "Education administration & management", templateID: "136", verticals: "atheneum"}, {templateName: "Education administration & management", templateID: "343", verticals: "atheneum"},
{templateName: "10% OFF", templateID: "137", verticals: "atheneum"}, {templateName: "10% OFF", templateID: "344", verticals: "atheneum"},
{templateName: "15% OFF", templateID: "138", verticals: "atheneum"} {templateName: "15% OFF", templateID: "345", verticals: "atheneum"}
]; ];
let teenybeansData = [ let teenybeansData = [
{templateName: "Introduction- Teeny Beans", templateID: "108", verticals: "teenybeans"}, {templateName: "Introduction- Teeny Beans", templateID: "347", verticals: "teenybeans"},
{templateName: "DNP", templateID: "", verticals: "teenybeans"}, {templateName: "DNP", templateID: "349", verticals: "teenybeans"},
{templateName: "UNO", templateID: "109", verticals: "teenybeans"}, {templateName: "UNO", templateID: "350", verticals: "teenybeans"},
{templateName: "PRIMERO", templateID: "110", verticals: "teenybeans"}, {templateName: "PRIMERO", templateID: "351", verticals: "teenybeans"},
{templateName: "ILC", templateID: "112", verticals: "teenybeans"}, {templateName: "ILC", templateID: "352", verticals: "teenybeans"},
{templateName: "Complete Package", templateID: "113", verticals: "teenybeans"}, {templateName: "Complete Package", templateID: "353", verticals: "teenybeans"},
{templateName: "Bespoke- Marketing solution", templateID: "116", verticals: "teenybeans"}, {templateName: "Bespoke- Marketing solution", templateID: "354", verticals: "teenybeans"},
{templateName: "Bespoke- Academic solution", templateID: "114", verticals: "teenybeans"} {templateName: "Bespoke- Academic solution", templateID: "357", verticals: "teenybeans"},
{templateName: "Daycare", templateID: "319", verticals: "teenybeans"}
]; ];
let iimttData = [ let iimttData = [
{templateName: "B2B- Introduction", templateID: "117", verticals: "iimtt"}, {templateName: "B2B- Introduction", templateID: "362", verticals: "iimtt"},
{templateName: "B2B- Followup", templateID: "118", verticals: "iimtt"}, {templateName: "B2B- Followup", templateID: "363", verticals: "iimtt"},
{templateName: "B2C- Introduction", templateID: "119", verticals: "iimtt"}, {templateName: "B2C- Introduction", templateID: "364", verticals: "iimtt"},
{templateName: "B2C-Followup", templateID: "120", verticals: "iimtt"}, {templateName: "B2C-Followup", templateID: "365", verticals: "iimtt"},
]; ];
let bipData = [ let bipData = [
{templateName: "Introduction", templateID: "121", verticals: "bip"}, {templateName: "Introduction", templateID: "366", verticals: "bip"},
{templateName: "School visit invitation", templateID: "122", verticals: "bip"} {templateName: "School visit invitation", templateID: "368", verticals: "bip"}
]; ];
let buzzappData = [ let buzzappData = [
{templateName: "Introduction", templateID: "123", verticals: "buzzapp"}, {templateName: "Introduction", templateID: "358", verticals: "buzzapp"},
{templateName: "Follow up", templateID: "124", verticals: "buzzapp"} {templateName: "Follow up", templateID: "361", verticals: "buzzapp"}
]; ];
let templateWhatsappList = document.getElementById('templateWhatsappList'); let templateWhatsappList = document.getElementById('templateWhatsappList');