This commit is contained in:
Tristan Schneider 2021-01-09 16:42:37 +01:00
commit 7de49f16a6

View File

@ -14,6 +14,15 @@ function get_color_from_ip($ip) {
//header("refresh: 28"); //header("refresh: 28");
header("Cache-Control: no-cache, no-store, must-revalidate"); header("Cache-Control: no-cache, no-store, must-revalidate");
if (!is_dir("data")) {
// initialize everything
mkdir("data", 0755);
file_put_contents("data/sentences.txt", "<!-- automatically created empty sentences file -->\n");
file_put_contents("data/archive-links.txt", "<!-- automatically created empty archive links file -->\n");
file_put_contents("data/config.json", "{\n\n}\n");
print("<p>Data directory automatically initialized</p>");
}
if (array_key_exists("submitted", $_REQUEST)) { if (array_key_exists("submitted", $_REQUEST)) {
$word = urldecode($_REQUEST["submitted"]); $word = urldecode($_REQUEST["submitted"]);
//print("Jemand schreibt ".$word."<br>"); //print("Jemand schreibt ".$word."<br>");