mirror of
https://github.com/itflow-org/itflow
synced 2026-11-11 07:01:16 +00:00
- Bell opens a dropdown panel instead of a modal: Unread/All tabs, grouped by day, type icons, relative times, click-through marks read, per-row read/unread, mark all as read - Unread badge refreshes every minute while the tab is visible - Notifications page rebuilt on the same backend: search, type filter, date range, read/unread toggles, proper empty states - Hide notifications for clients/modules the user cannot access - Normalise relative notification links so they work from /admin pages - Remove the old notifications modal and dismiss handlers
45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
* ITFlow - GET/POST request handler for misc (functionality that doesn't quite fit elsewhere)
|
|
*/
|
|
|
|
// Records to show per page
|
|
|
|
if(isset($_POST['change_records_per_page'])){
|
|
|
|
$records_per_page = intval($_POST['change_records_per_page']);
|
|
|
|
mysqli_query($mysqli,"UPDATE user_settings SET user_config_records_per_page = $records_per_page WHERE user_id = $session_user_id");
|
|
|
|
redirect();
|
|
|
|
}
|
|
|
|
// Revoke sharing (sharing itself is done via ajax.php)
|
|
if (isset($_GET['deactivate_shared_item'])) {
|
|
|
|
validateCSRFToken();
|
|
|
|
$item_id = intval($_GET['deactivate_shared_item']);
|
|
|
|
// Get details of the shared link
|
|
$sql = mysqli_query($mysqli, "SELECT item_type, item_related_id, item_client_id FROM shared_items WHERE item_id = $item_id");
|
|
$row = mysqli_fetch_assoc($sql);
|
|
$item_type = escapeSql($row['item_type']);
|
|
$item_related_id = intval($row['item_related_id']);
|
|
$client_id = intval($row['item_client_id']);
|
|
|
|
enforceClientAccess();
|
|
|
|
// Deactivate item id
|
|
mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_id = $item_id");
|
|
|
|
// Logging
|
|
logAudit("Sharing", "Delete", "$session_name deactivated shared $item_type link Item ID: $item_related_id. Share ID $item_id", $client_id, $item_id);
|
|
|
|
$_SESSION['alert_message'] = "Share Link deactivated";
|
|
|
|
redirect();
|
|
}
|