getUserArray($session, 1); if (!$admin || (int)$admin['access'] !== 9) { die('

Access Denied: You are not Admin!

'); } // --------------------------------------------------------------------------- // Câmpuri // --------------------------------------------------------------------------- $email = $database->escape(trim($_POST['email'] ?? '')); $tribe = max(1, min(5, (int)($_POST['tribe'] ?? 1))); $location = $database->escape(trim($_POST['location'] ?? '')); $desc1 = $database->escape($_POST['desc1'] ?? ''); $desc2 = $database->escape($_POST['desc2'] ?? ''); $quest = $database->escape($_POST['quest'] ?? ''); // --------------------------------------------------------------------------- // Update // --------------------------------------------------------------------------- $database->query( "UPDATE " . TB_PREFIX . "users SET email = '$email', tribe = $tribe, location = '$location', desc1 = '$desc1', desc2 = '$desc2', quest = '$quest' WHERE id = $id" ); // --------------------------------------------------------------------------- // Log admin // --------------------------------------------------------------------------- $adminId = (int)$_SESSION['id']; $time = time(); // FIX: username + ID formatat $targetName = $database->getUserField($id, 'username', 0) ?: 'UID '.$id; $targetNameSafe = htmlspecialchars($targetName, ENT_QUOTES, 'UTF-8'); $logText = "Edited profile for user $targetNameSafe"; $logEsc = $database->escape($logText); $database->query( "INSERT INTO " . TB_PREFIX . "admin_log (`id`, `user`, `log`, `time`) " . "VALUES (0, '$adminId', '$logEsc', $time)" ); header("Location: ../../../Admin/admin.php?p=player&uid=" . $id); exit; ?>