blob: c6e58bfc83e1e9266bdb28b0483c5ef99db5d231 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3security::checkType(security::ADMIN);
4
5if (!security::checkParams("POST", [
6 ["id", security::PARAM_ISINT],
7 ["value", security::PARAM_ISINT]
8])) {
9 security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
10}
11
12$id = (int)$_POST["id"];
13$value = ($_POST["value"] == 1 ? 1 : 0);
14
15if (incidents::verify($id, $value)) {
16 security::go(visual::getContinueUrl("incidents.php", "verified".$value, "POST"));
17} else {
18 security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
19}