diff --git a/base/database.php b/base/database.php index 55fef28..c2c3d02 100644 --- a/base/database.php +++ b/base/database.php @@ -10,12 +10,12 @@ class DB extends PDO { $conn = null; try { - $dataAccess = parse_ini_file($config, true); + $dataAccess = parse_ini_file($config, true)["ZEDAT"]; $conn = new PDO( - "mysql:host={$dataAccess["ZEDAT"]["host"]};dbname={$dataAccess["ZEDAT"]["database"]};charset={$dataAccess["ZEDAT"]["charset"]}", - $dataAccess["ZEDAT"]["user"], - $dataAccess["ZEDAT"]["passwd"], + "mysql:host={$dataAccess["host"]};dbname={$dataAccess["database"]};charset={$dataAccess["charset"]}", + $dataAccess["user"], + $dataAccess["passwd"], [ PDO::ATTR_PERSISTENT => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, diff --git a/homework/1/colourSelector/index.php b/homework/1/colourSelector/index.php index d60346d..b0fa381 100644 --- a/homework/1/colourSelector/index.php +++ b/homework/1/colourSelector/index.php @@ -12,6 +12,7 @@ // PHP include_once "../../../base/settings.php"; include_once "../../../base/headers.php"; + Headers::html(); if (!isset($_COOKIE["validation"])) { setcookie("validation", "false"); @@ -25,8 +26,6 @@ unset($colour); } } - - Headers::html(); ?> diff --git a/homework/1/themeSwitcher/index.php b/homework/1/themeSwitcher/index.php index 6ccd8e0..5d8dec2 100644 --- a/homework/1/themeSwitcher/index.php +++ b/homework/1/themeSwitcher/index.php @@ -12,6 +12,7 @@ // PHP include_once "../../../base/settings.php"; include_once "../../../base/headers.php"; + Headers::html(); if (isset($_POST["theme"])) { $theme = $_POST["theme"]; @@ -21,8 +22,6 @@ } else if (isset($_COOKIE["theme"])) { $theme = $_COOKIE["theme"]; } - - Headers::html(); ?> diff --git a/tasks/counter/index.php b/tasks/counter/index.php index 14a3fda..f271c81 100644 --- a/tasks/counter/index.php +++ b/tasks/counter/index.php @@ -12,6 +12,7 @@ // PHP include_once "../../base/settings.php"; include_once "../../base/headers.php"; + Headers::html(); $fh = fopen("./data/counter.txt", "r+"); if (flock($fh, LOCK_EX)) { @@ -27,8 +28,6 @@ } flock($fh, LOCK_UN); fclose($fh); - - Headers::html(); ?>

Visitor count:

diff --git a/tasks/functions/funktionen.php b/tasks/functions/funktionen.php index 02b18ad..ccd8afe 100644 --- a/tasks/functions/funktionen.php +++ b/tasks/functions/funktionen.php @@ -10,6 +10,7 @@ diff --git a/tasks/guestBook/data/data.json b/tasks/guestBook/data/data.json index 65e1cc4..854754b 100644 --- a/tasks/guestBook/data/data.json +++ b/tasks/guestBook/data/data.json @@ -1 +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"},{"time":1716545229,"title":"More consistent padding","name":"Kilian","comment":"More unified padding across the sections of the page"},{"time":1716545296,"title":"Inject","name":"Kilian","comment":""},{"time":1716546110,"title":"JS Inject","name":"Kilian","comment":"