Auto commit: 2025-12-18T08:16:52.309Z

This commit is contained in:
Flatlogic Bot 2025-12-18 08:16:52 +00:00
parent de3473c411
commit 8be74c322f

View File

@ -6,6 +6,14 @@ if (!isset($_SESSION['user_id']) || $_SESSION['user_role'] !== 'admin') {
exit; exit;
} }
// Debug block for POST data - visible only to admin
if ($_SESSION['user_role'] === 'admin' && $_SERVER['REQUEST_METHOD'] === 'POST') {
echo '<pre style="background-color: #fdd; border: 1px solid #f99; padding: 10px; margin: 10px;">';
echo 'DEBUG INFORMATION (admin/links.php - POST Data):<br>';
echo 'POST Parameters: ' . htmlspecialchars(json_encode($_POST, JSON_PRETTY_PRINT)) . '<br>';
echo '</pre>';
}
require_once __DIR__ . '/../db/config.php'; require_once __DIR__ . '/../db/config.php';
$pdo = db(); $pdo = db();
@ -15,6 +23,7 @@ if (empty($_SESSION['csrf_token'])) {
} }
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
header('Content-Type: application/json'); header('Content-Type: application/json');
$response = ['success' => false, 'message' => 'Invalid request.']; $response = ['success' => false, 'message' => 'Invalid request.'];