Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
require 'include/ECM/EcmNotifications/EcmNotification.php';
if(!defined('sugarEntry') || !sugarEntry) die('-1');
if (!$_POST['job'] || $_POST['job']=='') die ('-1');
switch ($_POST['job']) {
case 'updateNotificationStatus': updateNotificationStatus($_POST['id'],$_POST['flag']); break;
case 'changeNotificationDate': changeNotificationDate($_POST['id'],$_POST['flag']); break;
case 'getLeaveadNotifications': getLeaveadNotifications($_POST['user_id']); break;
}
function updateNotificationStatus($id,$flag){
$EcmNotification = new EcmNotification();
echo $EcmNotification->setNotificationFlag($id,$flag);
unset($EcmNotification);
}
function changeNotificationDate($id,$flag){
$EcmNotification = new EcmNotification();
echo $EcmNotification->setNotificationDate($id,$flag);
unset($EcmNotification);
}
function getLeaveadNotifications($user_id){
$EcmNotification = new EcmNotification($user_id);
echo json_encode($EcmNotification->searchLeavedNotifications(), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE);
unset($EcmNotification);
}
?>