Made the transcription UI work

This commit is contained in:
2025-05-01 10:08:15 +02:00
parent 5762e6d5a1
commit ab3a0457e0
2 changed files with 83 additions and 56 deletions

View File

@@ -82,6 +82,7 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"); ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;");
} }
if(isset($_GET["cmd"])) {
$cmd = $_GET['cmd']; $cmd = $_GET['cmd'];
switch($cmd) { switch($cmd) {
@@ -153,5 +154,6 @@
default: default:
die("Loading React..."); die("Loading React...");
} }
}
?> ?>

25
insertion.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
if(isset($_GET["message"])) {
include "api.php";
echo $_GET["message"];
query("INSERT INTO `for_moderation`(`text`) VALUES (\"" . $conn->real_escape_string($_GET["message"]) . "\");");
header("Location: /insertion.php");
die();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Vkládání otázek</title>
</head>
<body>
<h1>Vkládání otázek na moderaci pro pana Stallmana</h1>
<form action="/insertion.php" method="get">
<label for="message">Obsah otázky:</label><br>
<textarea id="message" name="message" rows=8 cols=80></textarea><br><br>
<input type="submit" value="Odeslat!">
</form>
</body>
</html>