forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (37 loc) · 962 Bytes
/
index.php
File metadata and controls
41 lines (37 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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();