Show mime type
This commit is contained in:
parent
08098b5417
commit
9b883beb13
@ -51,16 +51,17 @@ if (!empty($action) && $_SESSION["password"] == $config["admin_pwd"]){
|
|||||||
$stmt4->bind_result ($contentid, $type, $content);
|
$stmt4->bind_result ($contentid, $type, $content);
|
||||||
$stmt4->execute();
|
$stmt4->execute();
|
||||||
$stmt4->store_result();
|
$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()) {
|
while ($stmt4->fetch()) {
|
||||||
$id = htmlspecialchars($contentid);
|
$id = htmlspecialchars($contentid);
|
||||||
if(empty($type)){
|
if(empty($type)){
|
||||||
$content = htmlspecialchars($content);
|
$content = htmlspecialchars($content);
|
||||||
|
$type = "Normal text";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$content = "Binary data";
|
$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 . "<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>";
|
$out = $out . "</tbody></table>";
|
||||||
|
Loading…
Reference in New Issue
Block a user