mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Moved edit client, notification, and create contact note to the new ajax system, also updated the notificaiton count to be more efficient
This commit is contained in:
@@ -7,7 +7,7 @@ require_once "../check_login.php";
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// Check for the 'id' parameter
|
||||
if (!isset($_GET['id'])) {
|
||||
echo json_encode(['error' => 'ID missing.']);
|
||||
exit;
|
||||
}
|
||||
//if (!isset($_GET['id'])) {
|
||||
// echo json_encode(['error' => 'ID missing.']);
|
||||
// exit;
|
||||
//}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require_once "modals/notifications_modal.php";
|
||||
require_once "inc_confirm_modal.php";
|
||||
?>
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
<i class="fas fa-fw fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editClientModal<?php echo $client_id; ?>">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_client_edit.php"
|
||||
data-ajax-id="<?php echo $client_id; ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit Client
|
||||
</a>
|
||||
<?php if (lookupUserPermission("module_client") >= 3) { ?>
|
||||
@@ -167,8 +170,5 @@
|
||||
|
||||
<?php
|
||||
|
||||
require_once "modals/client_edit_modal.php";
|
||||
|
||||
require_once "modals/client_delete_modal.php";
|
||||
|
||||
require_once "modals/client_download_pdf_modal.php";
|
||||
|
||||
@@ -62,13 +62,16 @@
|
||||
|
||||
<!-- New Notifications Dropdown -->
|
||||
<?php
|
||||
$sql_notifications = mysqli_query($mysqli, "SELECT * FROM notifications WHERE notification_user_id = $session_user_id AND notification_dismissed_at IS NULL ORDER BY notification_id DESC LIMIT 8");
|
||||
$num_notifications = mysqli_num_rows($sql_notifications);
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('notification_id') AS num FROM notifications WHERE notification_user_id = $session_user_id AND notification_dismissed_at IS NULL"));
|
||||
$num_notifications = $row['num'];
|
||||
|
||||
?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#notificationsModal" data-toggle="modal">
|
||||
<a class="nav-link" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_notifications.php"
|
||||
>
|
||||
<i class="fas fa-bell"></i>
|
||||
<?php if ($num_notifications) { ?>
|
||||
<span class="badge badge-light badge-pill navbar-badge position-absolute" style="top: 1px; right: 3px;">
|
||||
|
||||
Reference in New Issue
Block a user