mirror of
https://github.com/itflow-org/itflow
synced 2026-03-19 04:04:51 +00:00
Add mass bulk mail
This commit is contained in:
148
admin_bulk_mail.php
Normal file
148
admin_bulk_mail.php
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?php
|
||||||
|
require_once "inc_all_admin.php";
|
||||||
|
|
||||||
|
|
||||||
|
$sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
||||||
|
WHERE contact_archived_at IS NULL
|
||||||
|
AND contact_email != ''
|
||||||
|
ORDER BY contact_primary DESC,
|
||||||
|
contact_important DESC"
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="post.php" method="post">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-envelope-open mr-2"></i>Bulk Mail</h3>
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="submit" class="btn btn-primary" name="send_bulk_mail_now">
|
||||||
|
<i class="fas fa-paper-plane mr-2"></i>Send Now
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
<h5>Email Message</h5>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<select type="text" class="form-control select2" name="mail_from" >
|
||||||
|
<option value="<?php echo $config_mail_from_email; ?>"><?php echo $config_mail_from_email; ?></option>
|
||||||
|
<option value="<?php echo $config_invoice_from_email; ?>"><?php echo $config_invoice_from_email; ?></option>
|
||||||
|
<option value="<?php echo $config_quote_from_email; ?>"><?php echo $config_quote_from_email; ?></option>
|
||||||
|
<option value="<?php echo $config_ticket_from_email; ?>"><?php echo $config_ticket_from_email; ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name" value="<?php echo nullable_htmlentities($config_mail_from_name); ?>" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="subject" placeholder="Subject" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<textarea class="form-control tinymce" name="body" placeholder="Type an email in here"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="datetime-local" class="form-control" name="queued_at">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
<h5>Select Contacts</h5>
|
||||||
|
<hr>
|
||||||
|
<div class="card">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" id="selectAllCheckbox" onchange="toggleCheckboxes()">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Title</th>
|
||||||
|
<th>Email</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$contact_id = intval($row['contact_id']);
|
||||||
|
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||||
|
$contact_title = nullable_htmlentities($row['contact_title']);
|
||||||
|
if (empty($contact_title)) {
|
||||||
|
$contact_title_display = "-";
|
||||||
|
} else {
|
||||||
|
$contact_title_display = "$contact_title";
|
||||||
|
}
|
||||||
|
$contact_email = nullable_htmlentities($row['contact_email']);
|
||||||
|
$contact_primary = intval($row['contact_primary']);
|
||||||
|
$contact_important = intval($row['contact_important']);
|
||||||
|
$contact_billing = intval($row['contact_billing']);
|
||||||
|
$contact_technical = intval($row['contact_technical']);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" name="contact[]" value="<?php echo $contact_id; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>" target="_blank">
|
||||||
|
<?php echo $contact_name; ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $contact_title_display; ?></td>
|
||||||
|
<td><?php echo $contact_email; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggleCheckboxes() {
|
||||||
|
// Get the state of the 'selectAllCheckbox'
|
||||||
|
var selectAllChecked = document.getElementById('selectAllCheckbox').checked;
|
||||||
|
|
||||||
|
// Find all checkboxes with the name 'contact[]' and set their state
|
||||||
|
var checkboxes = document.querySelectorAll('input[type="checkbox"][name="contact[]"]');
|
||||||
|
checkboxes.forEach(function(checkbox) {
|
||||||
|
checkbox.checked = selectAllChecked;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once "footer.php";
|
||||||
@@ -1,141 +1,177 @@
|
|||||||
<!-- Main Sidebar Container -->
|
<!-- Main Sidebar Container -->
|
||||||
<aside class="main-sidebar sidebar-dark-<?php echo nullable_htmlentities($config_theme); ?> d-print-none">
|
<aside class="main-sidebar sidebar-dark-<?php echo nullable_htmlentities($config_theme); ?> d-print-none">
|
||||||
|
|
||||||
<a class="brand-link pb-1 mt-1" href="clients.php">
|
<a class="brand-link pb-1 mt-1" href="clients.php">
|
||||||
<p class="h6"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i> Back | <strong>Administration</strong></p>
|
<p class="h6"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i> Back | <strong>Administration</strong></p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
|
||||||
<!-- Sidebar Menu -->
|
<!-- Sidebar Menu -->
|
||||||
<nav>
|
<nav>
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" data-accordion="false">
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" data-accordion="false">
|
||||||
|
|
||||||
<li class="nav-header">ACCESS</li>
|
<li class="nav-header">ACCESS</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="admin_users.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_users.php") {
|
||||||
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<i class="nav-icon fas fa-users"></i>
|
||||||
|
<p>Users</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_api.php") {
|
||||||
|
echo "active";
|
||||||
|
} ?>" href="admin_api.php">
|
||||||
|
<i class="nav-icon fas fa-key"></i>
|
||||||
|
<p>API Keys</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-header mt-3">TAGS & CATEGORIES</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="admin_tags.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_tags.php") {
|
||||||
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<i class="nav-icon fas fa-tags"></i>
|
||||||
|
<p>Tags</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="admin_categories.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_categories.php") {
|
||||||
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<i class="nav-icon fas fa-list-ul"></i>
|
||||||
|
<p>Categories</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<!-- ---------------------- TODO: Custom Fields ----------------------
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="admin_users.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_users.php") { echo "active"; } ?>">
|
<a href="settings_custom_fields.php" class="nav-link <?php //if (basename($_SERVER["PHP_SELF"]) == "settings_custom_fields.php") { echo "active"; }
|
||||||
<i class="nav-icon fas fa-users"></i>
|
?>">
|
||||||
<p>Users</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_api.php") { echo "active"; } ?>"
|
|
||||||
href="admin_api.php">
|
|
||||||
<i class="nav-icon fas fa-key"></i>
|
|
||||||
<p>API Keys</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-header mt-3">TAGS & CATEGORIES</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="admin_tags.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_tags.php") { echo "active"; } ?>">
|
|
||||||
<i class="nav-icon fas fa-tags"></i>
|
|
||||||
<p>Tags</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="admin_categories.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_categories.php") { echo "active"; } ?>">
|
|
||||||
<i class="nav-icon fas fa-list-ul"></i>
|
|
||||||
<p>Categories</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<!-- ---------------------- TODO: Custom Fields ----------------------
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="settings_custom_fields.php" class="nav-link <?php //if (basename($_SERVER["PHP_SELF"]) == "settings_custom_fields.php") { echo "active"; } ?>">
|
|
||||||
<i class="nav-icon fas fa-th-list"></i>
|
<i class="nav-icon fas fa-th-list"></i>
|
||||||
<p>Custom Fields</p>
|
<p>Custom Fields</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="admin_taxes.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_taxes.php") { echo "active"; } ?>">
|
<a href="admin_taxes.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_taxes.php") {
|
||||||
<i class="nav-icon fas fa-balance-scale"></i>
|
echo "active";
|
||||||
<p>Taxes</p>
|
} ?>">
|
||||||
</a>
|
<i class="nav-icon fas fa-balance-scale"></i>
|
||||||
</li>
|
<p>Taxes</p>
|
||||||
|
</a>
|
||||||
<li class="nav-item">
|
</li>
|
||||||
<a href="admin_account_types.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_account_types.php") { echo "active"; } ?>">
|
|
||||||
<i class="nav-icon fas fa-money-bill-wave"></i>
|
|
||||||
<p>Account Types</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-header mt-3">TEMPLATES</li>
|
<li class="nav-item">
|
||||||
|
<a href="admin_account_types.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_account_types.php") {
|
||||||
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<i class="nav-icon fas fa-money-bill-wave"></i>
|
||||||
|
<p>Account Types</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-header mt-3">TEMPLATES</li>
|
||||||
<a href="admin_vendor_templates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_vendor_templates.php") { echo "active"; } ?>">
|
|
||||||
<i class="nav-icon fas fa-building"></i>
|
|
||||||
<p>Vendor Templates</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="admin_software_templates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_software_templates.php") { echo "active"; } ?>">
|
<a href="admin_vendor_templates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_vendor_templates.php") {
|
||||||
<i class="nav-icon fas fa-rocket"></i>
|
echo "active";
|
||||||
<p>License Templates</p>
|
} ?>">
|
||||||
</a>
|
<i class="nav-icon fas fa-building"></i>
|
||||||
</li>
|
<p>Vendor Templates</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="admin_document_templates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_document_templates.php" || basename($_SERVER["PHP_SELF"]) == "admin_document_template_details.php") { echo "active"; } ?>">
|
<a href="admin_software_templates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_software_templates.php") {
|
||||||
<i class="nav-icon fas fa-file"></i>
|
echo "active";
|
||||||
<p>Document Templates</p>
|
} ?>">
|
||||||
</a>
|
<i class="nav-icon fas fa-rocket"></i>
|
||||||
</li>
|
<p>License Templates</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-header mt-3">MAINTENANCE</li>
|
<li class="nav-item">
|
||||||
|
<a href="admin_document_templates.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_document_templates.php" || basename($_SERVER["PHP_SELF"]) == "admin_document_template_details.php") {
|
||||||
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<i class="nav-icon fas fa-file"></i>
|
||||||
|
<p>Document Templates</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-header mt-3">MAINTENANCE</li>
|
||||||
<a href="admin_mail_queue.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_mail_queue.php") { echo "active"; } ?>">
|
|
||||||
<i class="nav-icon fas fa-mail-bulk"></i>
|
|
||||||
<p>Mail Queue</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="admin_logs.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_logs.php") { echo "active"; } ?>">
|
<a href="admin_mail_queue.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_mail_queue.php") {
|
||||||
<i class="nav-icon fas fa-history"></i>
|
echo "active";
|
||||||
<p>Audit Logs</p>
|
} ?>">
|
||||||
</a>
|
<i class="nav-icon fas fa-mail-bulk"></i>
|
||||||
</li>
|
<p>Mail Queue</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_backup.php") { echo "active"; } ?>"
|
<a href="admin_logs.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_logs.php") {
|
||||||
href="admin_backup.php">
|
echo "active";
|
||||||
<i class="nav-icon fas fa-cloud-upload-alt"></i>
|
} ?>">
|
||||||
<p>Backup</p>
|
<i class="nav-icon fas fa-history"></i>
|
||||||
</a>
|
<p>Audit Logs</p>
|
||||||
</li>
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="admin_debug.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_debug.php") { echo "active"; } ?>">
|
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_backup.php") {
|
||||||
<i class="nav-icon fa fa-bug"></i>
|
echo "active";
|
||||||
<p>Debug</p>
|
} ?>" href="admin_backup.php">
|
||||||
</a>
|
<i class="nav-icon fas fa-cloud-upload-alt"></i>
|
||||||
</li>
|
<p>Backup</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_update.php") { echo "active"; } ?>"
|
<a href="admin_debug.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_debug.php") {
|
||||||
href="admin_update.php">
|
echo "active";
|
||||||
<i class="nav-icon fas fa-download"></i>
|
} ?>">
|
||||||
<p>Update</p>
|
<i class="nav-icon fa fa-bug"></i>
|
||||||
</a>
|
<p>Debug</p>
|
||||||
</li>
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
<li class="nav-item">
|
||||||
</nav>
|
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_update.php") {
|
||||||
<!-- /.sidebar-menu -->
|
echo "active";
|
||||||
|
} ?>" href="admin_update.php">
|
||||||
|
<i class="nav-icon fas fa-download"></i>
|
||||||
|
<p>Update</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<div class="mb-3"></div>
|
<li class="nav-header"> Other</li>
|
||||||
|
|
||||||
</div>
|
<li class="nav-item">
|
||||||
<!-- /.sidebar -->
|
<a href="admin_bulk_mail.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "admin_bulk_mail.php") {
|
||||||
</aside>
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<i class="nav-icon fas fa-envelope"></i>
|
||||||
|
<p>Bulk Mail</p>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
|
||||||
|
<div class="mb-3"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
@@ -10,8 +10,8 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="post.php" method="post">
|
<form action="post.php" method="post">
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -25,19 +25,29 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<h5>Email Message</h5>
|
<h5>Email Message</h5>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" name="mail_from" placeholder="Email From" value="<?php echo nullable_htmlentities($config_mail_from_email); ?>" required>
|
<select type="text" class="form-control select2" name="mail_from">
|
||||||
|
<option value="<?php echo $config_mail_from_email; ?>">
|
||||||
|
<?php echo $config_mail_from_email; ?></option>
|
||||||
|
<option value="<?php echo $config_invoice_from_email; ?>">
|
||||||
|
<?php echo $config_invoice_from_email; ?></option>
|
||||||
|
<option value="<?php echo $config_quote_from_email; ?>">
|
||||||
|
<?php echo $config_quote_from_email; ?></option>
|
||||||
|
<option value="<?php echo $config_ticket_from_email; ?>">
|
||||||
|
<?php echo $config_ticket_from_email; ?></option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name" value="<?php echo nullable_htmlentities($config_mail_from_name); ?>" required>
|
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name"
|
||||||
|
value="<?php echo nullable_htmlentities($config_mail_from_name); ?>" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -45,7 +55,8 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<textarea class="form-control tinymce" name="body" placeholder="Type an email in here"></textarea>
|
<textarea class="form-control tinymce" name="body"
|
||||||
|
placeholder="Type an email in here"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -70,7 +81,8 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="checkbox" class="form-check-input" id="selectAllCheckbox" onchange="toggleCheckboxes()">
|
<input type="checkbox" class="form-check-input" id="selectAllCheckbox"
|
||||||
|
onchange="toggleCheckboxes()">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@@ -80,7 +92,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
$contact_id = intval($row['contact_id']);
|
$contact_id = intval($row['contact_id']);
|
||||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||||
@@ -96,27 +108,29 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
$contact_billing = intval($row['contact_billing']);
|
$contact_billing = intval($row['contact_billing']);
|
||||||
$contact_technical = intval($row['contact_technical']);
|
$contact_technical = intval($row['contact_technical']);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="checkbox" class="form-check-input" name="contact[]" value="<?php echo $contact_id; ?>">
|
<input type="checkbox" class="form-check-input" name="contact[]"
|
||||||
</div>
|
value="<?php echo $contact_id; ?>">
|
||||||
</td>
|
</div>
|
||||||
<td>
|
</td>
|
||||||
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>" target="_blank">
|
<td>
|
||||||
<?php echo $contact_name; ?>
|
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>"
|
||||||
</a>
|
target="_blank">
|
||||||
</td>
|
<?php echo $contact_name; ?>
|
||||||
<td><?php echo $contact_title_display; ?></td>
|
</a>
|
||||||
<td><?php echo $contact_email; ?></td>
|
</td>
|
||||||
</tr>
|
<td><?php echo $contact_title_display; ?></td>
|
||||||
<?php } ?>
|
<td><?php echo $contact_email; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -129,7 +143,7 @@ $sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
|||||||
function toggleCheckboxes() {
|
function toggleCheckboxes() {
|
||||||
// Get the state of the 'selectAllCheckbox'
|
// Get the state of the 'selectAllCheckbox'
|
||||||
var selectAllChecked = document.getElementById('selectAllCheckbox').checked;
|
var selectAllChecked = document.getElementById('selectAllCheckbox').checked;
|
||||||
|
|
||||||
// Find all checkboxes with the name 'contact[]' and set their state
|
// Find all checkboxes with the name 'contact[]' and set their state
|
||||||
var checkboxes = document.querySelectorAll('input[type="checkbox"][name="contact[]"]');
|
var checkboxes = document.querySelectorAll('input[type="checkbox"][name="contact[]"]');
|
||||||
checkboxes.forEach(function(checkbox) {
|
checkboxes.forEach(function(checkbox) {
|
||||||
@@ -140,4 +154,4 @@ function toggleCheckboxes() {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once "footer.php";
|
require_once "footer.php";
|
||||||
Reference in New Issue
Block a user