blob: c6e58bfc83e1e9266bdb28b0483c5ef99db5d231 [file] [log] [blame]
<?php
require_once("core.php");
security::checkType(security::ADMIN);
if (!security::checkParams("POST", [
["id", security::PARAM_ISINT],
["value", security::PARAM_ISINT]
])) {
security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
}
$id = (int)$_POST["id"];
$value = ($_POST["value"] == 1 ? 1 : 0);
if (incidents::verify($id, $value)) {
security::go(visual::getContinueUrl("incidents.php", "verified".$value, "POST"));
} else {
security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
}