Integrated new api interface.

This commit is contained in:
Alexander 2021-10-27 11:20:24 +03:00
commit 4306a4fb4f
116 changed files with 10371 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<?php
$TAB = 'NOTIFICATIONS';
error_reporting(NULL);
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Data
exec (VESTA_CMD."v-list-user-notifications $user json", $output, $return_var);
$notifications = json_decode(implode('', $output), true);
$notifications = array_reverse($notifications,true);
foreach($notifications as $key => $note){
$note['ID'] = $key;
$notifications[$key] = $note;
}
// Back uri
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
$result = array(
'result' => empty($notifications) ? [] : $notifications
);
echo json_encode($result);