Leave a Comment!
diff --git a/tasks/guestBook/data.json b/tasks/guestBook/data.json
deleted file mode 100644
index cb47af9..0000000
--- a/tasks/guestBook/data.json
+++ /dev/null
@@ -1,93 +0,0 @@
-[
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- {
- "time": 1715337098,
- "title": "The first",
- "name": "Kilian",
- "comment": "The first comment on here."
- },
- { "time": 1715338381, "title": "sdf", "name": "dsaf", "comment": "dsg" },
- {
- "time": 1715339761,
- "title": "Witzige Aufgabe",
- "name": "Kilian",
- "comment": "nun ja, also das funktioniert ja schon recht gut gell."
- },
- {
- "time": 1716539658,
- "title": "Progress Bar",
- "name": "Kilian",
- "comment": "Jetzt auch mit einem etwas geileren Progress Bar der einem die Character-Anzahl anzeigt.\r\nWesentlich geiler, wesentlich nicer, und Bootstraped"
- }
-]
diff --git a/tasks/guestBook/data/.htaccess b/tasks/guestBook/data/.htaccess
new file mode 100644
index 0000000..54aa684
--- /dev/null
+++ b/tasks/guestBook/data/.htaccess
@@ -0,0 +1,2 @@
+DENY FROM ALL
+ALLOW FROM 127.0.0.1
\ No newline at end of file
diff --git a/tasks/guestBook/data/data.json b/tasks/guestBook/data/data.json
new file mode 100644
index 0000000..1095930
--- /dev/null
+++ b/tasks/guestBook/data/data.json
@@ -0,0 +1 @@
+[{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715338381,"title":"sdf","name":"dsaf","comment":"dsg"},{"time":1715339761,"title":"Witzige Aufgabe","name":"Kilian","comment":"nun ja, also das funktioniert ja schon recht gut gell."},{"time":1716539658,"title":"Progress Bar","name":"Kilian","comment":"Jetzt auch mit einem etwas geileren Progress Bar der einem die Character-Anzahl anzeigt.\r\nWesentlich geiler, wesentlich nicer, und Bootstraped"},{"time":1716541941,"title":"New layout","name":"Kilian","comment":"New folder structure"}]
\ No newline at end of file
diff --git a/tasks/guestBook/index.php b/tasks/guestBook/index.php
index 9b90e7a..dcb31f4 100644
--- a/tasks/guestBook/index.php
+++ b/tasks/guestBook/index.php
@@ -6,8 +6,8 @@
Guest Book
-
-
+
+
@@ -22,7 +22,7 @@
$errors = $_SESSION["error"] ?? [];
$_SESSION["error"] = [];
- $string = file_get_contents("data.json") ?? "[]";
+ $string = file_get_contents("./data/data.json") ?? "[]";
$json = array_reverse(json_decode($string));
if (isset($_GET["p"]) && !is_numeric($_GET["p"])) {
diff --git a/tasks/guestBook/formValidation.js b/tasks/guestBook/js/formValidation.js
similarity index 100%
rename from tasks/guestBook/formValidation.js
rename to tasks/guestBook/js/formValidation.js
diff --git a/tasks/guestBook/textarea.js b/tasks/guestBook/js/textarea.js
similarity index 100%
rename from tasks/guestBook/textarea.js
rename to tasks/guestBook/js/textarea.js