true, "error" => "" ); $body = json_decode(file_get_contents('php://input'), true); if (array_key_exists('act', $body) && array_key_exists('ids', $body) && are_valid_ids($body["ids"])) { switch ($body['act']) { case "massread": mysqli_query($link, 'UPDATE Notifications SET Seen=1 WHERE ID in (' . implode(", ", $body["ids"]) . ')') or muoribene(mysqli_error($link), true); break; case "massdelete": mysqli_query($link, 'UPDATE Notifications SET Deleted=1 WHERE ID in (' . implode(", ", $body["ids"]) . ')') or muoribene(mysqli_error($link), true); break; default: http_response_code(400); $response["done"] = false; $response["error"] = "Unknown act."; } } else { http_response_code(400); $response["done"] = false; $response["error"] = "Bad request."; } echo(json_encode($response)); mysqli_close($link); exit(0); } $dbg .= $dlang . '
' . N; $dbg .= '
' . print_r($_GET, 1) . '
'; require '../../lib/notifs.php'; $notifs = notifs($link); $filtordon = false; if ($filtordon) { $filtordimgoff = 'imgs/cerca_act_off.svg'; $filtordimgon = 'imgs/cerca_act_on.svg'; } else { $filtordimgoff = 'imgs/cerca_off.svg'; $filtordimgon = 'imgs/cerca_on.svg'; } ?> Mustard - Notifs
"sev-normal", 2 => "sev-warning", 3 => "sev-error" ); $seen_class = array( 0 => "unseen", 1 => "seen" ); $deleted = array( 0 => "", 1 => "deleted" ); foreach ($notifs['notifs'] as $n) { echo("
" . "" . "" . "" . "

" . gmdate('d/m/Y H:i:s', round($n['Microtime'])) . ": " . $n["Notification"] . "

" . "
\n"); } ?>