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
// Init
error_reporting(NULL);
ob_start();
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
$message = '';
$error = '';
// Check token
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
$error = 'Unathenticated.';
}
exec (VESTA_CMD."v-add-cron-reports ".$user, $output, $return_var);
$message = __('Cronjob email reporting has been successfully enabled');
unset($output);
$result = array(
'message' => $message,
'error' => $error
);
print json_encode($result);