The following files exists in this folder. Click to view.
disable-translation.php
get-problem.php
scentence/
scentence.php
submit-problem-result.php
disable-translation.php
16 lines ASCII Windows (CRLF)
<?php
include "../util/db_connect.php";
include "../util/user.php";
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$jsonData = file_get_contents('php://input');
// Decode the JSON data into a PHP associative array
$requestData = json_decode($jsonData, true);
$userId = user_id();
foreach ($requestData["translations"] as $transaltionResult) {
quick_statment("UPDATE translation_settings SET disabled=true WHERE user_id=? AND translation_id=?", "ii", $userId, $transaltionResult["id"]);
}
}