Show mime type

This commit is contained in:
Bruno Rybársky 2023-06-10 11:08:49 +02:00
parent 08098b5417
commit 9b883beb13
No known key found for this signature in database
GPG Key ID: DFE2C061EF985CD4

@ -51,16 +51,17 @@ if (!empty($action) && $_SESSION["password"] == $config["admin_pwd"]){
$stmt4->bind_result ($contentid, $type, $content);
$stmt4->execute();
$stmt4->store_result();
$out = "<table><tbody><tr><th>Content ID</th><th>Content</th><th>Button</th></tr>";
$out = "<table><tbody><tr><th>Content ID</th><th>Content</th><th>MIME type</th><th>Button</th></tr>";
while ($stmt4->fetch()) {
$id = htmlspecialchars($contentid);
if(empty($type)){
$content = htmlspecialchars($content);
$type = "Normal text";
}
else{
$content = "Binary data";
}
$out = $out . "<tr><td>$id</td><td>$content</td><td><button onclick=\"delcthis('$id')\">Delete</button></td></tr>";
$out = $out . "<tr><td>$id</td><td>$content</td><td>$type</td><td><button onclick=\"delcthis('$id')\">Delete</button></td></tr>";
}
$out = $out . "<tr><td><input id=\"addidc\" placeholder=\"Content ID\"></td><td><textarea id=\"addcontentc\" placeholder=\"Content\"></textarea></td><td><input id=\"addtypec\" placeholder=\"MIME Type(when set the data must be Base64)\"></td></td><td><button id=\"contentadder\" onclick=\"justaddc()\">Add</button></td></tr>";
$out = $out . "</tbody></table>";