This commit is contained in:
Bruno Rybársky 2023-06-10 13:28:16 +02:00
parent 9b883beb13
commit a6ea3abe90
No known key found for this signature in database
GPG Key ID: DFE2C061EF985CD4

@ -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();