Marketplace icons stuff

This commit is contained in:
2025-08-20 13:06:32 -07:00
parent b53fcd8773
commit 6024055e26
3 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
require __DIR__ . '/../incl/util.php';
setJsonHeader();
checkClientDatabaseVersion();
$post = getPostData();
$birdicon = $post['birdicon'] ?? '';
$conn = newConnection();
$stmt = $conn->prepare("SELECT data FROM marketplaceicons WHERE birdicon = ?");
$stmt->bind_param("s", $birdicon);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
echo encrypt(json_encode(["success" => true, "data" => $row['data']]));
} else {
echo encrypt(json_encode(["success" => false, "message" => "Icon not found"]));
}
$stmt->close();
$conn->close();