diff --git a/action.php b/action.php index 3c1025f..eff0e72 100644 --- a/action.php +++ b/action.php @@ -18,6 +18,9 @@ header( 'Referrer-Policy: same-origin' ); header( 'Accept-Language: en-US,en;q=0.5' ); header( 'Connection: Keep-alive' ); +gethostname(); +$ip = $localIp = gethostbyname(gethostname()); +$ip = $handle = "handle"; $answer1 = $_POST['secure-form-answer']; $totalCorrect = 1; if ($answer1 == "Human") { $totalCorrect++; } @@ -30,12 +33,12 @@ if (file_exists($file_pointer)) { echo "The file $file_pointer already exists
"; - echo "$value"; + echo "$value"; exit; } - $handle = fopen("./en/" . $value . ".html", "a"); - fwrite($handle, - "\n" + $handle = fopen("./en/" . $value . ".html", "a"); + fwrite($handle, + "\n" . "" . $value @@ -209,9 +212,9 @@ . "\"" . " id=" . "\"" - ."myNavbar" + . "myNavbar" . "\"" - .">" + . ">" . "
" . "" - . "" - . "recent edits " - . "" - . $value - . "
" - . "\r\n"); +$handle = fopen("./index.html", "a"); +// load the data and delete the line from the array +$lines = file('./index.html'); +$last = sizeof($lines) - 1 ; +unset($lines[$last]); +// write the new data to the file +file_put_contents('./index.html', $lines); +foreach($_POST as $variable => $value) { + $value = str_replace(' ', '_', $value); + fwrite($handle, + "\"" + . $value + . "\"" + . "," + . "]};"); echo "successfully created $value"; } +} fclose($handle); ?> \ No newline at end of file diff --git a/en/atmosphere.html b/en/atmosphere.html new file mode 100644 index 0000000..6015af7 --- /dev/null +++ b/en/atmosphere.html @@ -0,0 +1,3 @@ + +atmosphere