This commit is contained in:
2023-06-10 13:28:16 +02:00
parent 9b883beb13
commit a6ea3abe90

View File

@ -77,12 +77,14 @@ if (!empty($action) && $_SESSION["password"] == $config["admin_pwd"]){
if ($action == "setcontent" && !empty($_POST["id"]) && !empty($_POST["content"])){
$stmt6 = $mysqli->prepare("INSERT INTO Content (`ContentID`, `Type`, `Content`) VALUES (?, ?, ?);");
$type = "";
if (!empty($_POST["type"])){
$decoded = base64_decode($_POST["content"]);
$stmt6->bind_param('sss', $_POST["id"], $_POST["type"], $decoded);
$type = $_POST["type"];
$stmt6->bind_param('sss', $_POST["id"], $type, $decoded);
}
else{
$stmt6->bind_param('sss', $_POST["id"], "", $_POST["content"]);
$stmt6->bind_param('sss', $_POST["id"], $type, $_POST["content"]);
}
$stmt6->execute();
$stmt6->store_result();