add mime type

This commit is contained in:
2023-06-10 11:04:08 +02:00
parent 5834a92a3f
commit 08098b5417
3 changed files with 26 additions and 8 deletions

View File

@@ -19,9 +19,9 @@ if (!empty($idcko)){
die("Nonexistent link");
}
while ($stmt1->fetch()) {
$stmt2 = $mysqli->prepare("SELECT `Content` FROM Content WHERE `ContentID` = ?");
$stmt2 = $mysqli->prepare("SELECT `Type`, `Content` FROM Content WHERE `ContentID` = ?");
$stmt2->bind_param("s", $contentid);
$stmt2->bind_result ($content);
$stmt2->bind_result ($type, $content);
$stmt2->execute();
$stmt2->store_result();
if ($stmt2->num_rows() < 1) {
@@ -33,6 +33,10 @@ if (!empty($idcko)){
$stmt3->bind_param('ssssss', $action, $idcko, $contentid, $curdate, $nickname, $ipcka);
$stmt3->execute();
$stmt3->store_result();
if ($type == 1){
}
header("Content-Type: $type");
echo $content;
}