You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							42 lines
						
					
					
						
							962 B
						
					
					
				
			
		
		
	
	
							42 lines
						
					
					
						
							962 B
						
					
					
				<?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();
 |