This commit is contained in:
Alexey Berezhok
2024-03-19 22:05:27 +03:00
commit 346a50856b
1572 changed files with 182163 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
use function Hestiacp\quoteshellarg\quoteshellarg;
include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
// Check token
verify_csrf($_GET);
if ($_GET["delete"] == 1) {
if (empty($_GET["notification_id"])) {
exec(HESTIA_CMD . "v-delete-user-notification " . $user . " all", $output, $return_var);
} else {
$v_id = quoteshellarg((int) $_GET["notification_id"]);
exec(
HESTIA_CMD . "v-delete-user-notification " . $user . " " . $v_id,
$output,
$return_var,
);
}
check_return_code($return_var, $output);
unset($output);
} else {
if (empty($_GET["notification_id"])) {
exec(
HESTIA_CMD . "v-acknowledge-user-notification " . $user . " all",
$output,
$return_var,
);
} else {
$v_id = quoteshellarg((int) $_GET["notification_id"]);
exec(
HESTIA_CMD . "v-acknowledge-user-notification " . $user . " " . $v_id,
$output,
$return_var,
);
check_return_code($return_var, $output);
unset($output);
}
}
exit();