force sync from /var/www/html/panel: 2025-09-08T20:36:30Z
This commit is contained in:
commit
4f717c9ee8
18119 changed files with 2566034 additions and 0 deletions
24
ControlPanel/modules/tickets/notificationCount.php
Executable file
24
ControlPanel/modules/tickets/notificationCount.php
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
require 'include/ticket.php';
|
||||
require 'include/TicketSettings.php';
|
||||
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$ticket = new Ticket($db);
|
||||
$TicketSettings = new TicketSettings($db);
|
||||
$notificationsEnabled = $TicketSettings->get('notifications_enabled');
|
||||
|
||||
if ($notificationsEnabled['notifications_enabled']) {
|
||||
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
||||
$status = $isAdmin ? 3 : 2;
|
||||
$ticketOwner = (!$isAdmin ? $_SESSION['user_id'] : null);
|
||||
|
||||
echo json_encode(
|
||||
array('notificationCount' => $ticket->notificationCount($ticketOwner, $status)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue