diff --git a/autoload.php b/autoload.php
new file mode 100644
index 0000000..6f70463
--- /dev/null
+++ b/autoload.php
@@ -0,0 +1,24 @@
+
\ No newline at end of file
diff --git a/logo_mini.png b/logo_mini.png
new file mode 100755
index 0000000..b06467d
Binary files /dev/null and b/logo_mini.png differ
diff --git a/public/counter.txt b/public/counter.txt
new file mode 100644
index 0000000..9d60796
--- /dev/null
+++ b/public/counter.txt
@@ -0,0 +1 @@
+11
\ No newline at end of file
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..b7c743e
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,82 @@
+ $value ) {
+ setcookie( $key, $value, $past, '/' );
+}
+
+session_set_cookie_params(60); // 60 sec keine Erhöhung des counters in Datei counter.text
+$counterstand = htmlentities(intval(file_get_contents("counter.txt"))); //zählt die Aurufe
+
+if(!isset($_SESSION['counter_ip'])){
+ $counterstand++; //echo $counterstand;
+ file_put_contents("counter.txt", $counterstand);
+ $_SESSION['counter_ip'] = true;
+}
+
+require __DIR__ . ("/../init.php");
+
+$pathInfo = $_SERVER['PATH_INFO']; //var_dump ($pathInfo);
+
+$routes = [
+ '/index' => [
+ 'controller' => 'loginController',
+ 'method' => 'index' // index Methode anwenden
+ ],
+ '/hbc' => [
+ 'controller' => 'loginController',
+ 'method' => 'hbc' // index Methode anwenden
+ ],
+ '/stb' => [
+ 'controller' => 'loginController',
+ 'method' => 'stb' // index Methode anwenden
+ ],
+ '/fotos' => [
+ 'controller' => 'loginController',
+ 'method' => 'fotos' // index Methode anwenden
+ ],
+ '/blog' => [
+ 'controller' => 'loginController',
+ 'method' => 'blog' // index Methode anwenden
+ ],
+ '/login' => [
+ 'controller' => 'loginController',
+ 'method' => 'login' // index Methode anwenden
+ ],
+ '/logout' => [
+ 'controller' => 'loginController',
+ 'method' => 'logout' // index Methode anwenden
+ ],
+ '/impressum' => [
+ 'controller' => 'loginController',
+ 'method' => 'impressum' // index Methode anwenden
+ ],
+ '/dashboard' => [
+ 'controller' => 'loginController',
+ 'method' => 'dashboard' // dashboard Methode anwenden
+ ],
+ '/settings' => [
+ 'controller' => 'loginController',
+ 'method' => 'settings' // dashboard Methode anwenden
+ ],
+];
+
+// Wenn in der PATH_INFO eine seite gespeichert wurde (z.B. /index oder /post) kann
+// sie aus dem array $routes ausgelesen werden. Im array ist gespeichert, welcher
+// controller zu verwenden ist und welche Methode des controllers anzuwenden ist
+
+if (isset($routes[$pathInfo])) { // ist eine PATH_INFO gesetzt?
+ $route = $routes[$pathInfo]; // zwischenspeichern
+ $controller = $container->make($route['controller']); // make für den controller setzen
+ $method = $route['method']; // Methode holen
+ $controller->$method(); // Controller führt Methode aus
+} else {
+ header("Location: /home/public/index.php/index");
+ die();
+}
+?>
diff --git a/scandir.php b/scandir.php
new file mode 100755
index 0000000..f015fc7
--- /dev/null
+++ b/scandir.php
@@ -0,0 +1,41 @@
+
+
+
+
+
+ ScanDir-Test
+
+
+
+
+
+
+
+
+
+
+
+
+".$dir."";
+ $pictures = array();
+ var_dump($pictures);
+ echo "";
+ $pictures = scandir($dir);
+ var_dump($pictures);
+ echo "";
+ var_dump(scandir($dir));
+
+ foreach($pictures as $picture)
+ {
+ echo "".$picture."
";
+ }
+
+?>
+
+
+
+
diff --git a/src/Core/AbstractController.php b/src/Core/AbstractController.php
new file mode 100755
index 0000000..672b3fb
--- /dev/null
+++ b/src/Core/AbstractController.php
@@ -0,0 +1,14 @@
+
diff --git a/src/Core/AbstractModel.php b/src/Core/AbstractModel.php
new file mode 100755
index 0000000..586f0f9
--- /dev/null
+++ b/src/Core/AbstractModel.php
@@ -0,0 +1,26 @@
+$offset);
+ }
+
+ public function offsetGet ($offset) {
+ return $this->$offset;
+ }
+
+ public function offsetSet ($offset, $value) {
+ $this->$offset = $value;
+ }
+
+ public function offsetUnset ($offset) {
+ unset ($this->$offset);
+ }
+ }
+
+ ?>
diff --git a/src/Core/AbstractRepository.php b/src/Core/AbstractRepository.php
new file mode 100755
index 0000000..12df8a8
--- /dev/null
+++ b/src/Core/AbstractRepository.php
@@ -0,0 +1,38 @@
+pdo = $pdo;
+ }
+
+ abstract public function getTableName();
+ abstract public function getModelName();
+
+ function all() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+ $stmt = $this->pdo->query("SELECT * FROM `$table`");
+ $posts = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $posts;
+ }
+
+ function find($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $stmt = $this->pdo->prepare("SELECT * FROM `$table` WHERE id = :id");
+ $stmt->execute(['id' => $id]);
+ $stmt->setFetchMode(PDO::FETCH_CLASS, $model);
+ $post = $stmt->fetch(PDO::FETCH_CLASS);
+
+ return $post;
+ }
+
+}
+ ?>
diff --git a/src/Core/Container.php b/src/Core/Container.php
new file mode 100644
index 0000000..29ea49f
--- /dev/null
+++ b/src/Core/Container.php
@@ -0,0 +1,76 @@
+receips = [
+ 'loginService' => function() {
+ return new LoginService(
+ $this->make('usersRepository')
+ );
+ },
+ 'loginController' => function() {
+ return new LoginController(
+ $this->make('loginService')
+ );
+ },
+ 'postsController' => function() {
+ return new PostsController( //neuer PostsController
+ $this->make('postsRepository'),
+ $this->make('commentsRepository')
+ );
+ },
+ 'usersRepository' => function() {
+ return new UsersRepository(
+ $this->make("pdo")
+ );
+ },
+ 'postsRepository' => function() {
+ return new PostsRepository(
+ $this->make("pdo")
+ );
+ },
+ 'commentsRepository' => function() {
+ return new CommentsRepository(
+ $this->make("pdo")
+ );
+ },
+ 'pdo' => function() {
+ $servername = "mysqle8e6.netcup.net";
+ $port = "3306";
+ $username = "k46054_hbc";
+ $password = "cXZm/E97dKvZy6Cg*";
+ $dbname="k46054_hbc";
+
+ $pdo = new PDO("mysql:host=$servername;dbname=$dbname;port=$port", $username, $password);
+
+ // Attribut wegen Sicherheit auf false setzen
+ $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
+ return $pdo;
+ }
+ ];
+ }
+
+ public function make($name) {
+ if (!empty($this->instances[$name])){
+ return $this->instances[$name]; // DB-Verbindung besteht
+ }
+ // sonst ERZEUGE return $this->instances[$name
+ if (isset($this->receips[$name])) {
+ $this->instances[$name] = $this->receips[$name]();
+ }
+ return $this->instances[$name];
+ }
+}
+?>
diff --git a/src/User/LoginController.php b/src/User/LoginController.php
new file mode 100755
index 0000000..f7f9990
--- /dev/null
+++ b/src/User/LoginController.php
@@ -0,0 +1,105 @@
+loginService = $loginService;
+ }
+
+ public function index(){
+ $this->loginService->index();
+ $this->render("user/index", []);
+ }
+
+ public function blog(){
+ $this->loginService->blog();
+ $this->render("user/blog", []);
+ }
+
+ public function hbc(){
+ $this->loginService->hbc();
+ $this->render("user/hbc", []);
+ }
+
+ public function stb(){
+// $this->loginService->stb();
+ $this->loginService->check();
+ $this->render("user/stb", []);
+ }
+
+ public function fotos(){
+ $this->loginService->fotos();
+ $this->render("user/fotos", []);
+ }
+
+ public function impressum(){
+ $this->loginService->impressum();
+ $this->render("user/impressum", []);
+ }
+
+ public function admin(){
+ $this->loginService->check();
+ $this->render("user/admin", []);
+ }
+
+ public function dashboard(){
+ $this->render("user/dashboard", []);
+ }
+
+ public function settings() {
+ echo "
";
+ $msg = "";
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'] - 1;
+ $_SESSION['id'] = $id;
+ }
+
+ if (isset($_GET['save'])) {
+ $save = $_GET['save'];
+ echo $msg = $this->loginService->saveOneUser();
+ }
+ $users = $this->loginService->getAllUsers();
+ if (isset($_SESSION['id'])) { $id = $_SESSION['id']; }else{ $id=0;}
+ $user = $users[$id];
+ echo "
";
+ $this->render("user/settings", [
+ 'users' => $users,
+ 'user' => $user,
+ 'msg' => $msg
+ ]);
+ }
+
+ public function logout() {
+ $this->loginService->logout();
+ $this->render("user/logout", []);
+ }
+
+ public function login(){
+ $error = false;
+ if(!empty($_POST['username']) And !empty($_POST['password'])) {
+ $username = $_POST['username'];
+ $password = $_POST['password'];
+ if ($this->loginService->attempt($username, $password)) {
+
+ if ($_SESSION['rechte'] == "admin") {
+ $users = $this->loginService->getAllUsers();
+ $_SESSION['login'] = $username;
+ $this->render("user/admin", [
+ 'users' => $users
+ ]);
+ return;
+ } else {
+ header ("Location: dashboard");
+ return;
+ }
+ } else { $error = true; }
+ }
+ $this->render("user/login", [
+ 'error' => $error // Übergabe an view
+ ]);
+ } // end login
+
+} // end class
+?>
diff --git a/src/User/LoginController_1.php b/src/User/LoginController_1.php
new file mode 100755
index 0000000..75940c0
--- /dev/null
+++ b/src/User/LoginController_1.php
@@ -0,0 +1,109 @@
+loginService = $loginService;
+ }
+
+ public function index(){
+ $this->loginService->index();
+ $this->render("user/index", []);
+ }
+
+ public function blog(){
+ $this->loginService->blog();
+ $this->render("user/blog", []);
+ }
+
+ public function hbc(){
+ $this->loginService->hbc();
+ $this->render("user/hbc", []);
+ }
+
+ public function stb(){
+// $this->loginService->stb();
+ $this->loginService->check();
+ $this->render("user/stb", []);
+ }
+
+ public function fotos(){
+ $this->loginService->fotos();
+ $this->render("user/fotos", []);
+ }
+
+ public function impressum(){
+ $this->loginService->impressum();
+ $this->render("user/impressum", []);
+ }
+
+ public function admin(){
+ $this->loginService->check();
+ //$this->loginService->admin();
+ $this->render("user/admin", []);
+ }
+
+ public function dashboard(){
+ //$this->loginService->check();
+ $this->render("user/dashboard", []);
+ }
+
+ public function settings() {
+ echo "
";
+ $msg = "";
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'] - 1;
+ $_SESSION['id'] = $id;
+ }
+
+ if (isset($_GET['save'])) {
+ $save = $_GET['save'];
+ echo $msg = $this->loginService->saveOneUser();
+ }
+ $users = $this->loginService->getAllUsers(); // ok
+ if (isset($_SESSION['id'])) {
+ echo $id = $_SESSION['id'];
+ }else{$id=0;}
+ $user = $users[$id];
+
+ echo "
";
+ $this->render("user/settings", [
+ 'users' => $users,
+ 'user' => $user,
+ 'msg' => $msg
+ ]);
+ }
+
+ public function logout() {
+ $this->loginService->logout();
+ $this->render("user/logout", []);
+ //header("Location: user/login"); // weiterleitung zum login
+ }
+
+ public function login(){
+ $error = false;
+ if(!empty($_POST['username']) And !empty($_POST['password'])) {
+ $username = $_POST['username'];
+ $password = $_POST['password'];
+ if ($this->loginService->attempt($username, $password)) {
+ if ($_SESSION['rechte'] == "admin") {
+ $users = $this->loginService->getAllUsers();
+ $_SESSION['login'] = $username;
+ //$_SESSION['id'] = $user['id'];
+ $this->render("user/admin", [
+ 'users' => $users
+ ]);
+ return;
+ } else {
+ header ("Location: dashboard");
+ return;
+ }
+ } else { $error = true; }
+ }
+ $this->render("user/login", [
+ 'error' => $error // Übergabe an view
+ ]);
+ } // end login
+ } // end class ?>
diff --git a/src/User/LoginService.php b/src/User/LoginService.php
new file mode 100755
index 0000000..4983052
--- /dev/null
+++ b/src/User/LoginService.php
@@ -0,0 +1,133 @@
+usersRepository = $usersRepository; // LoginService hat jetzt Zugriff auf DB
+ }
+
+ public function check() {
+ if (isset($_SESSION['login'])) {
+ return true;
+ } else {
+ header("Location: login");
+ //die(); // hier könnte auch eine exeption ausgeführt werden
+ }
+ }
+
+ function getUser($id) {
+ global $pdo;
+ $_SESSION['userid'] = $id;
+ $statement = $pdo->prepare("SELECT * FROM users WHERE id = :id");
+ $result = $statement->execute(array('id' => $_SESSION['userid']));
+ $user = $statement->fetch();
+ return $user;
+ }
+
+ public function getAllUsers() {
+ $users = $this->usersRepository->allUserNames();
+ return $users;
+ }
+
+ public function saveOneUser() {
+ $msg = $this->usersRepository->saveUserData();
+ //echo $msg;
+ return $msg;
+ }
+
+
+ public function attempt($username, $password) {
+ $user = $this->usersRepository->findByUserName($username); // user aus db
+ if(empty($user)) {
+ return false; // Nutzer nicht vorhanden
+ }
+ if (password_verify($password, $user->password )) { //echo ("Login erfolgreich!");
+ $_SESSION['login'] = $user->username;
+ $_SESSION['id'] = $user->id;
+ $_SESSION['rechte'] = $user->rechte;
+ $_SESSION['seite'] = $user->seite;
+ //session_regenerate_id(true);
+ return true; // Login erfolgreich
+ } else {
+ return false;
+ }
+ }
+
+ public function index() {
+ unset($_SESSION['login']);
+ //unset($_SESSION['id']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function logout() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function hbc() {
+ unset($_SESSION['login']);
+// session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function stb() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function fotos() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function blog() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function admin() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function settings() {
+ //unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+/*
+ public function ostfriesland() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function rheinruhr() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function nordpark() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function natur() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function auswahl() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function about() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+*/
+ public function impressum() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+}
+?>
diff --git a/src/User/UserModel.php b/src/User/UserModel.php
new file mode 100755
index 0000000..14c92ae
--- /dev/null
+++ b/src/User/UserModel.php
@@ -0,0 +1,22 @@
+
diff --git a/src/User/UsersRepository.php b/src/User/UsersRepository.php
new file mode 100755
index 0000000..616d04f
--- /dev/null
+++ b/src/User/UsersRepository.php
@@ -0,0 +1,116 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $stmt = $this->pdo->prepare("SELECT * FROM `$table` WHERE id = :id");
+ $stmt->execute(['id' => $id]);
+ $stmt->setFetchMode(PDO::FETCH_CLASS, $model);
+ $user = $stmt->fetch(PDO::FETCH_CLASS);
+// var_dump($user); //die();
+ return $user;
+ }
+
+ public function findByUserName($username) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $stmt = $this->pdo->prepare("SELECT * FROM `$table` WHERE username = :username");
+ $stmt->execute(['username' => $username]);
+ $stmt->setFetchMode(PDO::FETCH_CLASS, $model);
+ $user = $stmt->fetch(PDO::FETCH_CLASS);
+ //var_dump($user); die();
+ return $user;
+ }
+
+ public function allUserNames() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table`";
+ $stmt = $this->pdo->query($strSQL);
+ $users = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $users;
+ }
+
+
+// *****************************************************************************
+ public function saveUserData() {
+ $error_msg = $success_msg = "";
+
+ if (isset($_GET['save'])) {
+ $save = $_GET['save'];
+ $userid = trim($_POST['id']);
+ $id = trim($_POST['id']);
+ $user = $this->findByUserID($id);
+
+ if ($save == 'personal_data') {
+ $vorname = trim($_POST['vorname']);
+ $nachname = trim($_POST['nachname']);
+ if ($vorname == "" || $nachname == "") {
+ $error_msg = "Bitte Vor- und Nachname ausfüllen.";
+ } else {
+ $statement = $this->pdo->prepare("UPDATE users SET vorname = :vorname, nachname = :nachname, updated_at=NOW() WHERE id = :id");
+ $result = $statement->execute(array('vorname' => $vorname, 'nachname'=> $nachname, 'id' => $id));
+ $success_msg = "Daten erfolgreich gespeichert.";
+ }
+ // emai geändert
+ } else if ($save == 'email') {
+ $passwort = $_POST['passwort'];
+ $email = trim($_POST['email']);
+ $email2 = trim($_POST['email2']);
+ if ($email != $email2) {
+ $error_msg = "Die eingegebenen E-Mail-Adressen stimmten nicht überein.";
+ } else if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
+ $error_msg = "Bitte eine gültige E-Mail-Adresse eingeben.";
+ } else
+ if (password_verify($passwort, $user['password'])) {
+ $error_msg = "Bitte korrektes Passwort eingeben.";
+ } else {
+ $statement = $this->pdo->prepare("UPDATE users SET email = :email WHERE id = :userid");
+ $result = $statement->execute(array('email' => $email, 'userid' => $user['id'] ));
+ $success_msg = "E-Mail-Adresse erfolgreich gespeichert!";
+
+ }
+ // PW Änderung
+ } else if ($save == 'passwort') {
+ $passwortAlt = $_POST['passwortAlt'];
+ $passwortNeu = trim($_POST['passwortNeu']);
+ $passwortNeu2 = trim($_POST['passwortNeu2']);
+
+ if ($passwortNeu != $passwortNeu2) {
+ $error_msg = "Die eingegebenen Passwörter stimmten nicht überein.";
+ } else if($passwortNeu == "") {
+ $error_msg = "Das Passwort darf nicht leer sein.";
+ } else if(!password_verify($passwortAlt, $user['password'])) {
+ $error_msg = "Bitte korrektes Passwort eingeben";
+ } else {
+ $passwort_hash = password_hash($passwortNeu, PASSWORD_DEFAULT);
+ //$oasswort_hash = password_hash($passwordNeu, PASSWORD_BCRYPT);
+
+ $statement = $this->pdo->prepare("UPDATE users SET password = :password WHERE id = :userid");
+ $result = $statement->execute(array('password' => $passwort_hash, 'userid' => $user['id'] ));
+
+ $success_msg = "Passwort erfolgreich gespeichert.";
+ }
+ }
+ } // Ende if save = personel data, ...
+ return $error_msg." - ".$success_msg;
+ } // Ende Funktion
+
+ }
+?>
diff --git a/stb/.DS_Store b/stb/.DS_Store
new file mode 100755
index 0000000..e9a0871
Binary files /dev/null and b/stb/.DS_Store differ
diff --git a/stb/._.DS_Store b/stb/._.DS_Store
new file mode 100755
index 0000000..28c42fb
Binary files /dev/null and b/stb/._.DS_Store differ
diff --git a/stb/autoload.php b/stb/autoload.php
new file mode 100755
index 0000000..d6d2d74
--- /dev/null
+++ b/stb/autoload.php
@@ -0,0 +1,38 @@
+base_dir: ".$base_dir; //die();
+
+ $len = strlen($prefix);
+ if (strncmp($prefix, $class, $len) !== 0) {
+ // no, move to the next registered autoloader
+ return;
+ }
+
+ // get the relative class name
+ $relative_class = substr($class, $len);
+ // replace the namespace prefix with the base directory, replace namespace
+ // separators with directory separators in the relative class name, append
+ // with .php
+ //echo "relative class: ".$relative_class; //die();
+ $file = ($base_dir . str_replace('\\', '/', $relative_class) . '.php');
+ //echo "file: ".$file; //die();
+ // if the file exists, require it
+ if (file_exists($file)) {
+ require $file;
+ //echo "file required: ".$file; //die();
+ } else {
+ //echo "kein File: ".$file." vorhanden "; //die();
+ }
+});
diff --git a/stb/exceptions.php b/stb/exceptions.php
new file mode 100755
index 0000000..6eff33c
--- /dev/null
+++ b/stb/exceptions.php
@@ -0,0 +1,4 @@
+
diff --git a/stb/img/ArrowDown.gif b/stb/img/ArrowDown.gif
new file mode 100755
index 0000000..55ea91b
Binary files /dev/null and b/stb/img/ArrowDown.gif differ
diff --git a/stb/img/ArrowLeft.gif b/stb/img/ArrowLeft.gif
new file mode 100755
index 0000000..4a76d18
Binary files /dev/null and b/stb/img/ArrowLeft.gif differ
diff --git a/stb/img/ArrowRight.gif b/stb/img/ArrowRight.gif
new file mode 100755
index 0000000..0cd8c96
Binary files /dev/null and b/stb/img/ArrowRight.gif differ
diff --git a/stb/img/ArrowUp.gif b/stb/img/ArrowUp.gif
new file mode 100755
index 0000000..6833837
Binary files /dev/null and b/stb/img/ArrowUp.gif differ
diff --git a/stb/img/ArrowUp.jpg b/stb/img/ArrowUp.jpg
new file mode 100755
index 0000000..758d89c
Binary files /dev/null and b/stb/img/ArrowUp.jpg differ
diff --git a/stb/img/Gendersign.svg.png b/stb/img/Gendersign.svg.png
new file mode 100755
index 0000000..74606c0
Binary files /dev/null and b/stb/img/Gendersign.svg.png differ
diff --git a/stb/img/Male_and_female_sign.svg (1).png b/stb/img/Male_and_female_sign.svg (1).png
new file mode 100755
index 0000000..b230fe1
Binary files /dev/null and b/stb/img/Male_and_female_sign.svg (1).png differ
diff --git a/stb/img/Male_and_female_sign.svg.png b/stb/img/Male_and_female_sign.svg.png
new file mode 100755
index 0000000..b6246c3
Binary files /dev/null and b/stb/img/Male_and_female_sign.svg.png differ
diff --git a/stb/img/addr.jpg b/stb/img/addr.jpg
new file mode 100755
index 0000000..d3e88cc
Binary files /dev/null and b/stb/img/addr.jpg differ
diff --git a/stb/img/admArrowUp.gif b/stb/img/admArrowUp.gif
new file mode 100755
index 0000000..d700c7a
Binary files /dev/null and b/stb/img/admArrowUp.gif differ
diff --git a/stb/img/alive.png b/stb/img/alive.png
new file mode 100755
index 0000000..90e2b0d
Binary files /dev/null and b/stb/img/alive.png differ
diff --git a/stb/img/doc.jpg b/stb/img/doc.jpg
new file mode 100755
index 0000000..0209b27
Binary files /dev/null and b/stb/img/doc.jpg differ
diff --git a/stb/img/f.jpg b/stb/img/f.jpg
new file mode 100755
index 0000000..3f650f9
Binary files /dev/null and b/stb/img/f.jpg differ
diff --git a/stb/img/favicon.ico b/stb/img/favicon.ico
new file mode 100755
index 0000000..5f627bc
Binary files /dev/null and b/stb/img/favicon.ico differ
diff --git a/stb/img/female.gif b/stb/img/female.gif
new file mode 100755
index 0000000..18fcacd
Binary files /dev/null and b/stb/img/female.gif differ
diff --git a/stb/img/g.jpg b/stb/img/g.jpg
new file mode 100755
index 0000000..d2180be
Binary files /dev/null and b/stb/img/g.jpg differ
diff --git a/stb/img/gender_1.jpg b/stb/img/gender_1.jpg
new file mode 100755
index 0000000..1650a7e
Binary files /dev/null and b/stb/img/gender_1.jpg differ
diff --git a/stb/img/iall.png b/stb/img/iall.png
new file mode 100755
index 0000000..5a195c5
Binary files /dev/null and b/stb/img/iall.png differ
diff --git a/stb/img/iged.png b/stb/img/iged.png
new file mode 100755
index 0000000..05b3f87
Binary files /dev/null and b/stb/img/iged.png differ
diff --git a/stb/img/ihelp.png b/stb/img/ihelp.png
new file mode 100755
index 0000000..9466e9c
Binary files /dev/null and b/stb/img/ihelp.png differ
diff --git a/stb/img/ilist.png b/stb/img/ilist.png
new file mode 100755
index 0000000..80070c0
Binary files /dev/null and b/stb/img/ilist.png differ
diff --git a/stb/img/imail.png b/stb/img/imail.png
new file mode 100755
index 0000000..86cb2d5
Binary files /dev/null and b/stb/img/imail.png differ
diff --git a/stb/img/ipdf.png b/stb/img/ipdf.png
new file mode 100755
index 0000000..a89c554
Binary files /dev/null and b/stb/img/ipdf.png differ
diff --git a/stb/img/iphotos.png b/stb/img/iphotos.png
new file mode 100755
index 0000000..c7769ac
Binary files /dev/null and b/stb/img/iphotos.png differ
diff --git a/stb/img/iprint.png b/stb/img/iprint.png
new file mode 100755
index 0000000..6840796
Binary files /dev/null and b/stb/img/iprint.png differ
diff --git a/stb/img/isheet.png b/stb/img/isheet.png
new file mode 100755
index 0000000..c8858ee
Binary files /dev/null and b/stb/img/isheet.png differ
diff --git a/stb/img/ixls.png b/stb/img/ixls.png
new file mode 100755
index 0000000..18b8a39
Binary files /dev/null and b/stb/img/ixls.png differ
diff --git a/stb/img/m.jpg b/stb/img/m.jpg
new file mode 100755
index 0000000..431e86d
Binary files /dev/null and b/stb/img/m.jpg differ
diff --git a/stb/img/mail.jpg b/stb/img/mail.jpg
new file mode 100755
index 0000000..c1e678e
Binary files /dev/null and b/stb/img/mail.jpg differ
diff --git a/stb/img/male.gif b/stb/img/male.gif
new file mode 100755
index 0000000..c1f4daf
Binary files /dev/null and b/stb/img/male.gif differ
diff --git a/stb/img/mob.jpg b/stb/img/mob.jpg
new file mode 100755
index 0000000..ddb8ecd
Binary files /dev/null and b/stb/img/mob.jpg differ
diff --git a/stb/img/nopic.jpg b/stb/img/nopic.jpg
new file mode 100755
index 0000000..dd9c1b4
Binary files /dev/null and b/stb/img/nopic.jpg differ
diff --git a/stb/img/pic.jpg b/stb/img/pic.jpg
new file mode 100755
index 0000000..a155cb3
Binary files /dev/null and b/stb/img/pic.jpg differ
diff --git a/stb/img/sfemale.gif b/stb/img/sfemale.gif
new file mode 100755
index 0000000..8ff3c20
Binary files /dev/null and b/stb/img/sfemale.gif differ
diff --git a/stb/img/smale.gif b/stb/img/smale.gif
new file mode 100755
index 0000000..635309c
Binary files /dev/null and b/stb/img/smale.gif differ
diff --git a/stb/img/t.jpg b/stb/img/t.jpg
new file mode 100755
index 0000000..ea6bc8d
Binary files /dev/null and b/stb/img/t.jpg differ
diff --git a/stb/img/tel.jpg b/stb/img/tel.jpg
new file mode 100755
index 0000000..8eec804
Binary files /dev/null and b/stb/img/tel.jpg differ
diff --git a/stb/img/th.jpg b/stb/img/th.jpg
new file mode 100755
index 0000000..e710385
Binary files /dev/null and b/stb/img/th.jpg differ
diff --git a/stb/img/tng_female.gif b/stb/img/tng_female.gif
new file mode 100755
index 0000000..cf7eff5
Binary files /dev/null and b/stb/img/tng_female.gif differ
diff --git a/stb/img/tng_male.gif b/stb/img/tng_male.gif
new file mode 100755
index 0000000..28ef175
Binary files /dev/null and b/stb/img/tng_male.gif differ
diff --git a/stb/img/u.jpg b/stb/img/u.jpg
new file mode 100755
index 0000000..3d9dc05
Binary files /dev/null and b/stb/img/u.jpg differ
diff --git a/stb/img/u.png b/stb/img/u.png
new file mode 100755
index 0000000..272e0e7
Binary files /dev/null and b/stb/img/u.png differ
diff --git a/stb/init.php b/stb/init.php
new file mode 100755
index 0000000..f171f59
--- /dev/null
+++ b/stb/init.php
@@ -0,0 +1,147 @@
+
+, <; in
+// entsprechende ", <, >, ... gewandelt werden. XSS => cross site scripting
+function e($str) {
+ return (htmlentities($str, ENT_QUOTES, 'UTF-8'));
+}
+// prüft alle Eingabefelder
+function test_input($data) {
+ $data = trim($data);
+ $data = stripslashes($data);
+ $data = htmlspecialchars($data);
+ return $data;
+}
+// Die Funktion wandelt das amerikanische Datum in eine deutsche um
+function date_german($datum) { // Eingabe: 2013-10-20
+list($jahr, $monat, $tag) = explode("-", $datum);
+return("$tag.$monat.$jahr"); // Ausgabe: 20.10.2013
+}
+// die Funktion wandelt ein datum in ein reines Jahr
+function jahr($datum) {
+ if ($datum != 0) {
+ $jahr = date("Y",strtotime($datum));
+ } else { $jahr = '????';}
+return $jahr;
+}
+// Geburtstag - Todestag
+function date_period($person) { // Eingabe: 2013-10-20
+ list($jahr, $monat, $tag) = explode("-", $person['day_of_birth']);
+ $period = ("$tag.$monat.$jahr");
+ list($jahr, $monat, $tag) = explode("-", $person['day_of_death']);
+ if ($tag != 0) {$period = $period." - "."$tag.$monat.$jahr";}
+ $period = "(".$period.")";
+ return $period;
+}
+function periode($person){
+ if (($person->day_of_birth)!= 0){
+ $birth = DateTime::createFromFormat('Y-m-d', $person->day_of_birth);
+ $period = "(".$birth->format('Y')."-";
+ } else { $period = "( - ";}
+ if ($person->day_of_death >=1){$death = DateTime::createFromFormat('Y-m-d', $person->day_of_death);
+ $period = $period.$death->format('Y').")";
+ } else { $period = $period." )"; }
+ return $period;
+}
+// Alter der Person
+function alter($person) {
+ if ($person['day_of_birth'] != 0){ // Geburtstag eingetragen
+ $geburtstag = new DateTime($person['day_of_birth']);
+ if ($person['day_of_death'] != 0){ // Todestag eingetragen
+ $todestag = new DateTime(date($person['day_of_death']));
+ $alter = $geburtstag->diff($todestag);
+ return $alter->format('%y'); // Alter ausgeben
+ } else {
+ if ($person['place_of_death'] != ""){ // Ort des Todes
+ return $alter = "† ?"; // kein Alter möglich
+ } else {
+ $heute = new DateTime(date('Y-m-d')); // Alter lebender Person
+ $alter = $geburtstag->diff($heute);
+ return $alter->format('%y');
+ }
+ }
+ } else {
+ if ($person['place_of_death'] != ""){ // Ort des Todes
+ return $alter = "† ?";} // kein Ort des Todes
+ else {return $alter = "?";} // kein Geburtstag eingetragen
+ }
+}
+
+//convert date from yyyy-mm-dd database format to dd MMM yyyy gedcom format
+function date_ged($incoming) {
+ // define the months
+ $months = array ("00" => "00", "01" => "Jan", "02" => "Feb", "03" => "Mrz", "04" => "Apr",
+ "05" => "Mai", "06" => "Jun", "07" => "Jul", "08" => "Aug", "09" => "Sep",
+ "10" => "Okt", "11" => "Nov", "12" => "Dez");
+ $work = explode("-", $incoming);
+ if ($work[1] == "00" OR $work[2] == "00") {
+ $retval = "$work[0]"; // if month or day unknown, just return year
+ } else {
+ $replacemonth = strtr($work[1], $months); // reformat whole date to dd MMM yyyy
+ $retval = "$work[2] $replacemonth $work[0]";
+ }
+ return $retval; // return the string for gedcom DATE
+}
+// return GET['index'], set SESION['index'], OR return default
+function getAndSetSession($index, $session, $default){
+ if ((isset($_GET[$index])) || !empty($_GET[$index])){
+ $_SESSION[$session] = $_GET[$index];
+ } else {
+ if (!isset($_SESSION[$session])){
+ $_SESSION[$session] = $default;
+ }
+ }
+ return $_SESSION[$session];
+}
+
+function getUmlauteArray() {
+ return array(
+ 'ü'=>'ü',
+ 'ä'=>'ä',
+ 'ö'=>'ö', 'Ö'=>'Ö',
+ 'ß'=>'ß', 'à '=>'à', 'á'=>'á', 'â'=>'â', 'ã'=>'ã',
+ 'ù'=>'ù', 'ú'=>'ú', 'û'=>'û',
+ 'Ù'=>'Ù', 'Ú'=>'Ú', 'Û'=>'Û', 'Ãœ'=>'Ü',
+ 'ò'=>'ò', 'ó'=>'ó', 'ô'=>'ô',
+ 'è'=>'è', 'é'=>'é', 'ê'=>'ê', 'ë'=>'ë',
+ 'À'=>'À', 'Ã'=>'Á', 'Â'=>'Â', 'Ã'=>'Ã', 'Ä'=>'Ä', 'Ã…'=>'Å',
+ 'Ç'=>'Ç', 'È'=>'È', 'É'=>'É', 'Ê'=>'Ê', 'Ë'=>'Ë', 'ÃŒ'=>'Ì',
+ 'Ã'=>'Í', 'ÃŽ'=>'Î', 'Ã'=>'Ï',
+ 'Ñ'=>'Ñ',
+ 'Ã’'=>'Ò', 'Ó'=>'Ó', 'Ô'=>'Ô', 'Õ'=>'Õ', 'Ø'=>'Ø',
+ 'Ã¥'=>'å',
+ 'æ'=>'æ',
+ 'ç'=>'ç',
+ 'ì'=>'ì', 'Ã'=>'í', 'î'=>'î', 'ï'=>'ï',
+ 'ð'=>'ð',
+ 'ñ'=>'ñ',
+ 'õ'=>'õ',
+ 'ø'=>'ø',
+ 'ý'=>'ý', 'ÿ'=>'ÿ',
+ '€'=>'€' );
+ }
+
+function fixeUmlauteDb() {
+ $umlaute = $this->getUmlauteArray();
+ foreach ($umlaute as $key => $value){
+ $sql = "UPDATE table SET tracks = REPLACE(row, '{$key}', '{$value}') WHERE row LIKE '%{$key}%'";
+ }
+}
+// Container dient zur erzeugung von instances nach festgelegten Bauanleitungen (receipts)
+// Hier wird eine neue class gebildet
+$container = new App\Core\Container();
+//var_dump($container); // erster Test, ob der code läuft
+
+//$usersRepository = $container->make("usersRepository");
+//var_dump($usersRepository); // zweiter Test, nachdem UsersRepository erzeugt wurde
+
+//var_dump($usersRepository->all()); // dritter Test, alle user auslesen; function aus AbstractRepostory
+
+// nächster Test, finde user "Erik"; function aus init.php
+//var_dump($usersRepository->findByUserName("test"));
+//die();
+?>
diff --git a/stb/init_alt.php b/stb/init_alt.php
new file mode 100755
index 0000000..d8295ff
--- /dev/null
+++ b/stb/init_alt.php
@@ -0,0 +1,143 @@
+
+, <; in
+// entsprechende ", <, >, ... gewandelt werden. XSS => cross site scripting
+function e($str) {
+ return (htmlentities($str, ENT_QUOTES, 'UTF-8'));
+}
+// prüft alle Eingabefelder
+function test_input($data) {
+ $data = trim($data);
+ $data = stripslashes($data);
+ $data = htmlspecialchars($data);
+ return $data;
+}
+// Die Funktion wandelt das amerikanische Datum in eine deutsche um
+function date_german($datum) { // Eingabe: 2013-10-20
+list($jahr, $monat, $tag) = explode("-", $datum);
+return("$tag.$monat.$jahr"); // Ausgabe: 20.10.2013
+}
+// die Funktion wandelt ein datum in ein reines Jahr
+function jahr($datum) {
+ if ($datum != 0) {
+ $jahr = date("Y",strtotime($datum));
+ } else { $jahr = '????';}
+return $jahr;
+}
+// Geburtstag - Todestag
+function date_period($person) { // Eingabe: 2013-10-20
+ list($jahr, $monat, $tag) = explode("-", $person['day_of_birth']);
+ $period = ("$tag.$monat.$jahr");
+ list($jahr, $monat, $tag) = explode("-", $person['day_of_death']);
+ if ($tag != 0) {$period = $period." - "."$tag.$monat.$jahr";}
+ $period = "(".$period.")";
+ return $period;
+}
+function periode($person){
+ if (($person->day_of_birth)!= 0){
+ $birth = DateTime::createFromFormat('Y-m-d', $person->day_of_birth);
+ $period = "(".$birth->format('Y')."-";
+ } else { $period = "( - ";}
+ if ($person->day_of_death >=1){$death = DateTime::createFromFormat('Y-m-d', $person->day_of_death);
+ $period = $period.$death->format('Y').")";
+ } else { $period = $period." )"; }
+ return $period;
+}
+// Alter der Person
+function alter($person) {
+ if ($person['day_of_birth'] != 0){ // Geburtstag eingetragen
+ $geburtstag = new DateTime($person['day_of_birth']);
+ if ($person['day_of_death'] != 0){ // Todestag eingetragen
+ $todestag = new DateTime(date($person['day_of_death']));
+ $alter = $geburtstag->diff($todestag);
+ return $alter->format('%y'); // Alter ausgeben
+ } else {
+ if ($person['place_of_death'] != ""){ // Ort des Todes
+ return $alter = "† ?"; // kein Alter möglich
+ } else {
+ $heute = new DateTime(date('Y-m-d')); // Alter lebender Person
+ $alter = $geburtstag->diff($heute);
+ return $alter->format('%y');
+ }
+ }
+ } else {return $alter = "?";} // kein Geburtstag eingetragen
+}
+
+//convert date from yyyy-mm-dd database format to dd MMM yyyy gedcom format
+function date_ged($incoming) {
+ // define the months
+ $months = array ("00" => "00", "01" => "Jan", "02" => "Feb", "03" => "Mrz", "04" => "Apr",
+ "05" => "Mai", "06" => "Jun", "07" => "Jul", "08" => "Aug", "09" => "Sep",
+ "10" => "Okt", "11" => "Nov", "12" => "Dez");
+ $work = explode("-", $incoming);
+ if ($work[1] == "00" OR $work[2] == "00") {
+ $retval = "$work[0]"; // if month or day unknown, just return year
+ } else {
+ $replacemonth = strtr($work[1], $months); // reformat whole date to dd MMM yyyy
+ $retval = "$work[2] $replacemonth $work[0]";
+ }
+ return $retval; // return the string for gedcom DATE
+}
+// return GET['index'], set SESION['index'], OR return default
+function getAndSetSession($index, $session, $default){
+ if ((isset($_GET[$index])) || !empty($_GET[$index])){
+ $_SESSION[$session] = $_GET[$index];
+ } else {
+ if (!isset($_SESSION[$session])){
+ $_SESSION[$session] = $default;
+ }
+ }
+ return $_SESSION[$session];
+}
+
+function getUmlauteArray() {
+ return array(
+ 'ü'=>'ü',
+ 'ä'=>'ä',
+ 'ö'=>'ö', 'Ö'=>'Ö',
+ 'ß'=>'ß', 'à '=>'à', 'á'=>'á', 'â'=>'â', 'ã'=>'ã',
+ 'ù'=>'ù', 'ú'=>'ú', 'û'=>'û',
+ 'Ù'=>'Ù', 'Ú'=>'Ú', 'Û'=>'Û', 'Ãœ'=>'Ü',
+ 'ò'=>'ò', 'ó'=>'ó', 'ô'=>'ô',
+ 'è'=>'è', 'é'=>'é', 'ê'=>'ê', 'ë'=>'ë',
+ 'À'=>'À', 'Ã'=>'Á', 'Â'=>'Â', 'Ã'=>'Ã', 'Ä'=>'Ä', 'Ã…'=>'Å',
+ 'Ç'=>'Ç', 'È'=>'È', 'É'=>'É', 'Ê'=>'Ê', 'Ë'=>'Ë', 'ÃŒ'=>'Ì',
+ 'Ã'=>'Í', 'ÃŽ'=>'Î', 'Ã'=>'Ï',
+ 'Ñ'=>'Ñ',
+ 'Ã’'=>'Ò', 'Ó'=>'Ó', 'Ô'=>'Ô', 'Õ'=>'Õ', 'Ø'=>'Ø',
+ 'Ã¥'=>'å',
+ 'æ'=>'æ',
+ 'ç'=>'ç',
+ 'ì'=>'ì', 'Ã'=>'í', 'î'=>'î', 'ï'=>'ï',
+ 'ð'=>'ð',
+ 'ñ'=>'ñ',
+ 'õ'=>'õ',
+ 'ø'=>'ø',
+ 'ý'=>'ý', 'ÿ'=>'ÿ',
+ '€'=>'€' );
+ }
+
+function fixeUmlauteDb() {
+ $umlaute = $this->getUmlauteArray();
+ foreach ($umlaute as $key => $value){
+ $sql = "UPDATE table SET tracks = REPLACE(row, '{$key}', '{$value}') WHERE row LIKE '%{$key}%'";
+ }
+}
+// Container dient zur erzeugung von instances nach festgelegten Bauanleitungen (receipts)
+// Hier wird eine neue class gebildet
+$container = new App\Core\Container();
+//var_dump($container); // erster Test, ob der code läuft
+
+//$usersRepository = $container->make("usersRepository");
+//var_dump($usersRepository); // zweiter Test, nachdem UsersRepository erzeugt wurde
+
+//var_dump($usersRepository->all()); // dritter Test, alle user auslesen; function aus AbstractRepostory
+
+// nächster Test, finde user "Erik"; function aus init.php
+//var_dump($usersRepository->findByUserName("test"));
+//die();
+?>
diff --git a/stb/photos/female.jpg b/stb/photos/female.jpg
new file mode 100755
index 0000000..c331e07
Binary files /dev/null and b/stb/photos/female.jpg differ
diff --git a/stb/photos/jann_boergmann.jpg b/stb/photos/jann_boergmann.jpg
new file mode 100755
index 0000000..e64712c
Binary files /dev/null and b/stb/photos/jann_boergmann.jpg differ
diff --git a/stb/photos/male.jpg b/stb/photos/male.jpg
new file mode 100755
index 0000000..f48bc07
Binary files /dev/null and b/stb/photos/male.jpg differ
diff --git a/stb/photos/thumb21_backer.jpg b/stb/photos/thumb21_backer.jpg
new file mode 100755
index 0000000..ecd9453
Binary files /dev/null and b/stb/photos/thumb21_backer.jpg differ
diff --git a/stb/photos/thumb_Annie_Pfluger_klein.jpg b/stb/photos/thumb_Annie_Pfluger_klein.jpg
new file mode 100755
index 0000000..9fba03b
Binary files /dev/null and b/stb/photos/thumb_Annie_Pfluger_klein.jpg differ
diff --git a/stb/photos/thumb_agneta_van_echten_klein.jpg b/stb/photos/thumb_agneta_van_echten_klein.jpg
new file mode 100755
index 0000000..6ff83ba
Binary files /dev/null and b/stb/photos/thumb_agneta_van_echten_klein.jpg differ
diff --git a/stb/photos/thumb_alida_backer.jpg b/stb/photos/thumb_alida_backer.jpg
new file mode 100755
index 0000000..2553ecf
Binary files /dev/null and b/stb/photos/thumb_alida_backer.jpg differ
diff --git a/stb/photos/thumb_alma_feeken.jpg b/stb/photos/thumb_alma_feeken.jpg
new file mode 100755
index 0000000..137a1d4
Binary files /dev/null and b/stb/photos/thumb_alma_feeken.jpg differ
diff --git a/stb/photos/thumb_anita_schoenwald_klein.jpg b/stb/photos/thumb_anita_schoenwald_klein.jpg
new file mode 100755
index 0000000..d368b48
Binary files /dev/null and b/stb/photos/thumb_anita_schoenwald_klein.jpg differ
diff --git a/stb/photos/thumb_anna_wolters_klein.jpg b/stb/photos/thumb_anna_wolters_klein.jpg
new file mode 100755
index 0000000..f403142
Binary files /dev/null and b/stb/photos/thumb_anna_wolters_klein.jpg differ
diff --git a/stb/photos/thumb_annelie_janssen_klein.jpg b/stb/photos/thumb_annelie_janssen_klein.jpg
new file mode 100755
index 0000000..dedece2
Binary files /dev/null and b/stb/photos/thumb_annelie_janssen_klein.jpg differ
diff --git a/stb/photos/thumb_antje_wolters_klein.jpg b/stb/photos/thumb_antje_wolters_klein.jpg
new file mode 100755
index 0000000..62b6eec
Binary files /dev/null and b/stb/photos/thumb_antje_wolters_klein.jpg differ
diff --git a/stb/photos/thumb_anton_posny_klein.jpg b/stb/photos/thumb_anton_posny_klein.jpg
new file mode 100755
index 0000000..37b4f4b
Binary files /dev/null and b/stb/photos/thumb_anton_posny_klein.jpg differ
diff --git a/stb/photos/thumb_artur_warfsmann_klein.jpg b/stb/photos/thumb_artur_warfsmann_klein.jpg
new file mode 100755
index 0000000..4e161a8
Binary files /dev/null and b/stb/photos/thumb_artur_warfsmann_klein.jpg differ
diff --git a/stb/photos/thumb_august_biehl_klein.jpg b/stb/photos/thumb_august_biehl_klein.jpg
new file mode 100755
index 0000000..9f4e8b1
Binary files /dev/null and b/stb/photos/thumb_august_biehl_klein.jpg differ
diff --git a/stb/photos/thumb_barbara_elter_klein.jpg b/stb/photos/thumb_barbara_elter_klein.jpg
new file mode 100755
index 0000000..c2b1ff3
Binary files /dev/null and b/stb/photos/thumb_barbara_elter_klein.jpg differ
diff --git a/stb/photos/thumb_berta_collmann.jpg b/stb/photos/thumb_berta_collmann.jpg
new file mode 100755
index 0000000..2fb4b00
Binary files /dev/null and b/stb/photos/thumb_berta_collmann.jpg differ
diff --git a/stb/photos/thumb_christa_lange_klein.jpg b/stb/photos/thumb_christa_lange_klein.jpg
new file mode 100755
index 0000000..ae15009
Binary files /dev/null and b/stb/photos/thumb_christa_lange_klein.jpg differ
diff --git a/stb/photos/thumb_dieter_backer.jpg b/stb/photos/thumb_dieter_backer.jpg
new file mode 100755
index 0000000..5f5dbc0
Binary files /dev/null and b/stb/photos/thumb_dieter_backer.jpg differ
diff --git a/stb/photos/thumb_dirk_eilert_fischer_klein.jpg b/stb/photos/thumb_dirk_eilert_fischer_klein.jpg
new file mode 100755
index 0000000..9c1fb09
Binary files /dev/null and b/stb/photos/thumb_dirk_eilert_fischer_klein.jpg differ
diff --git a/stb/photos/thumb_dirk_janssen_klein.jpg b/stb/photos/thumb_dirk_janssen_klein.jpg
new file mode 100755
index 0000000..73afaa8
Binary files /dev/null and b/stb/photos/thumb_dirk_janssen_klein.jpg differ
diff --git a/stb/photos/thumb_edda_ocken_klein.jpg b/stb/photos/thumb_edda_ocken_klein.jpg
new file mode 100755
index 0000000..f261053
Binary files /dev/null and b/stb/photos/thumb_edda_ocken_klein.jpg differ
diff --git a/stb/photos/thumb_edda_vosteen-roehrs_klein.jpg b/stb/photos/thumb_edda_vosteen-roehrs_klein.jpg
new file mode 100755
index 0000000..9c5a7f0
Binary files /dev/null and b/stb/photos/thumb_edda_vosteen-roehrs_klein.jpg differ
diff --git a/stb/photos/thumb_eduard_dahlheimer_klein.jpg b/stb/photos/thumb_eduard_dahlheimer_klein.jpg
new file mode 100755
index 0000000..1865eb0
Binary files /dev/null and b/stb/photos/thumb_eduard_dahlheimer_klein.jpg differ
diff --git a/stb/photos/thumb_ehme_gerdes_klein.jpg b/stb/photos/thumb_ehme_gerdes_klein.jpg
new file mode 100755
index 0000000..14aad1d
Binary files /dev/null and b/stb/photos/thumb_ehme_gerdes_klein.jpg differ
diff --git a/stb/photos/thumb_ehti_gerdes_klein.jpg b/stb/photos/thumb_ehti_gerdes_klein.jpg
new file mode 100755
index 0000000..aef3afb
Binary files /dev/null and b/stb/photos/thumb_ehti_gerdes_klein.jpg differ
diff --git a/stb/photos/thumb_elfriede_koenig_klein.jpg b/stb/photos/thumb_elfriede_koenig_klein.jpg
new file mode 100755
index 0000000..0c74ff6
Binary files /dev/null and b/stb/photos/thumb_elfriede_koenig_klein.jpg differ
diff --git a/stb/photos/thumb_elise_hilkea_boergmann_klein.jpg b/stb/photos/thumb_elise_hilkea_boergmann_klein.jpg
new file mode 100755
index 0000000..6c4534d
Binary files /dev/null and b/stb/photos/thumb_elise_hilkea_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_elke_boergmann_klein.jpg b/stb/photos/thumb_elke_boergmann_klein.jpg
new file mode 100755
index 0000000..74e357f
Binary files /dev/null and b/stb/photos/thumb_elke_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_elke_hasnik_klein.jpg b/stb/photos/thumb_elke_hasnik_klein.jpg
new file mode 100755
index 0000000..26ceba7
Binary files /dev/null and b/stb/photos/thumb_elke_hasnik_klein.jpg differ
diff --git a/stb/photos/thumb_ella_posny.jpg b/stb/photos/thumb_ella_posny.jpg
new file mode 100755
index 0000000..b058bf1
Binary files /dev/null and b/stb/photos/thumb_ella_posny.jpg differ
diff --git a/stb/photos/thumb_elli_holling_klein.jpg b/stb/photos/thumb_elli_holling_klein.jpg
new file mode 100755
index 0000000..bb68ca7
Binary files /dev/null and b/stb/photos/thumb_elli_holling_klein.jpg differ
diff --git a/stb/photos/thumb_emil_gerdes_klein.jpg b/stb/photos/thumb_emil_gerdes_klein.jpg
new file mode 100755
index 0000000..efdaf39
Binary files /dev/null and b/stb/photos/thumb_emil_gerdes_klein.jpg differ
diff --git a/stb/photos/thumb_erich_warfsmann_klein.jpg b/stb/photos/thumb_erich_warfsmann_klein.jpg
new file mode 100755
index 0000000..0e502bd
Binary files /dev/null and b/stb/photos/thumb_erich_warfsmann_klein.jpg differ
diff --git a/stb/photos/thumb_erika_dutkewitz_klein.jpg b/stb/photos/thumb_erika_dutkewitz_klein.jpg
new file mode 100755
index 0000000..95d6fcb
Binary files /dev/null and b/stb/photos/thumb_erika_dutkewitz_klein.jpg differ
diff --git a/stb/photos/thumb_erna_boergmann_klein.jpg b/stb/photos/thumb_erna_boergmann_klein.jpg
new file mode 100755
index 0000000..a71ab3e
Binary files /dev/null and b/stb/photos/thumb_erna_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_ernst_vosteen_klein.jpg b/stb/photos/thumb_ernst_vosteen_klein.jpg
new file mode 100755
index 0000000..ce25c2d
Binary files /dev/null and b/stb/photos/thumb_ernst_vosteen_klein.jpg differ
diff --git a/stb/photos/thumb_eti_gerdes_klein.jpg b/stb/photos/thumb_eti_gerdes_klein.jpg
new file mode 100755
index 0000000..0b1af08
Binary files /dev/null and b/stb/photos/thumb_eti_gerdes_klein.jpg differ
diff --git a/stb/photos/thumb_fidi_boergmann_klein.jpg b/stb/photos/thumb_fidi_boergmann_klein.jpg
new file mode 100755
index 0000000..5650292
Binary files /dev/null and b/stb/photos/thumb_fidi_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_foline_klein.jpg b/stb/photos/thumb_foline_klein.jpg
new file mode 100755
index 0000000..eed9e7b
Binary files /dev/null and b/stb/photos/thumb_foline_klein.jpg differ
diff --git a/stb/photos/thumb_frieda_dahlheimer_klein.jpg b/stb/photos/thumb_frieda_dahlheimer_klein.jpg
new file mode 100755
index 0000000..d73536f
Binary files /dev/null and b/stb/photos/thumb_frieda_dahlheimer_klein.jpg differ
diff --git a/stb/photos/thumb_frieda_tietjen_klein.jpg b/stb/photos/thumb_frieda_tietjen_klein.jpg
new file mode 100755
index 0000000..710733f
Binary files /dev/null and b/stb/photos/thumb_frieda_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_fulke_van_echten_klein.jpg b/stb/photos/thumb_fulke_van_echten_klein.jpg
new file mode 100755
index 0000000..09c4758
Binary files /dev/null and b/stb/photos/thumb_fulke_van_echten_klein.jpg differ
diff --git a/stb/photos/thumb_gerd_posny.jpg b/stb/photos/thumb_gerd_posny.jpg
new file mode 100755
index 0000000..3f3c3b5
Binary files /dev/null and b/stb/photos/thumb_gerd_posny.jpg differ
diff --git a/stb/photos/thumb_gerda_elter_klein.jpg b/stb/photos/thumb_gerda_elter_klein.jpg
new file mode 100755
index 0000000..b5d111c
Binary files /dev/null and b/stb/photos/thumb_gerda_elter_klein.jpg differ
diff --git a/stb/photos/thumb_gerhard_dahlheimer_klein.jpg b/stb/photos/thumb_gerhard_dahlheimer_klein.jpg
new file mode 100755
index 0000000..83f0156
Binary files /dev/null and b/stb/photos/thumb_gerhard_dahlheimer_klein.jpg differ
diff --git a/stb/photos/thumb_gerhard_wartke_klein.jpg b/stb/photos/thumb_gerhard_wartke_klein.jpg
new file mode 100755
index 0000000..f3ceef0
Binary files /dev/null and b/stb/photos/thumb_gerhard_wartke_klein.jpg differ
diff --git a/stb/photos/thumb_grete_backer.jpg b/stb/photos/thumb_grete_backer.jpg
new file mode 100755
index 0000000..ffcca0f
Binary files /dev/null and b/stb/photos/thumb_grete_backer.jpg differ
diff --git a/stb/photos/thumb_gunnar_moeller_klein.jpg b/stb/photos/thumb_gunnar_moeller_klein.jpg
new file mode 100755
index 0000000..276813b
Binary files /dev/null and b/stb/photos/thumb_gunnar_moeller_klein.jpg differ
diff --git a/stb/photos/thumb_gustav_tietjen_klein.jpg b/stb/photos/thumb_gustav_tietjen_klein.jpg
new file mode 100755
index 0000000..0550f7e
Binary files /dev/null and b/stb/photos/thumb_gustav_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_harald_boergmann_klein.jpg b/stb/photos/thumb_harald_boergmann_klein.jpg
new file mode 100755
index 0000000..c5dabfe
Binary files /dev/null and b/stb/photos/thumb_harald_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_heike_boergmann_klein.jpg b/stb/photos/thumb_heike_boergmann_klein.jpg
new file mode 100755
index 0000000..ecd095d
Binary files /dev/null and b/stb/photos/thumb_heike_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_heiner_dahlheimer_klein.jpg b/stb/photos/thumb_heiner_dahlheimer_klein.jpg
new file mode 100755
index 0000000..34a4772
Binary files /dev/null and b/stb/photos/thumb_heiner_dahlheimer_klein.jpg differ
diff --git a/stb/photos/thumb_helfried_heinz_klein.jpg b/stb/photos/thumb_helfried_heinz_klein.jpg
new file mode 100755
index 0000000..c253fa2
Binary files /dev/null and b/stb/photos/thumb_helfried_heinz_klein.jpg differ
diff --git a/stb/photos/thumb_helmut_boergmann_klein.jpg b/stb/photos/thumb_helmut_boergmann_klein.jpg
new file mode 100755
index 0000000..ea3aa24
Binary files /dev/null and b/stb/photos/thumb_helmut_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_herbert_boergmann_klein.jpg b/stb/photos/thumb_herbert_boergmann_klein.jpg
new file mode 100755
index 0000000..62084bd
Binary files /dev/null and b/stb/photos/thumb_herbert_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_hermann_feeken.jpg b/stb/photos/thumb_hermann_feeken.jpg
new file mode 100755
index 0000000..4e600bc
Binary files /dev/null and b/stb/photos/thumb_hermann_feeken.jpg differ
diff --git a/stb/photos/thumb_hermann_kuepker_klein.jpg b/stb/photos/thumb_hermann_kuepker_klein.jpg
new file mode 100755
index 0000000..0dbb9ae
Binary files /dev/null and b/stb/photos/thumb_hermann_kuepker_klein.jpg differ
diff --git a/stb/photos/thumb_hertha_boergmann_klein.jpg b/stb/photos/thumb_hertha_boergmann_klein.jpg
new file mode 100755
index 0000000..c3382dd
Binary files /dev/null and b/stb/photos/thumb_hertha_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_hertha_hartlieb.jpg b/stb/photos/thumb_hertha_hartlieb.jpg
new file mode 100755
index 0000000..76a4c0e
Binary files /dev/null and b/stb/photos/thumb_hertha_hartlieb.jpg differ
diff --git a/stb/photos/thumb_hilke_johanna_fischer_klein.jpg b/stb/photos/thumb_hilke_johanna_fischer_klein.jpg
new file mode 100755
index 0000000..91cdd95
Binary files /dev/null and b/stb/photos/thumb_hilke_johanna_fischer_klein.jpg differ
diff --git a/stb/photos/thumb_hinrich_boergmann_klein_1.jpg b/stb/photos/thumb_hinrich_boergmann_klein_1.jpg
new file mode 100755
index 0000000..e22e367
Binary files /dev/null and b/stb/photos/thumb_hinrich_boergmann_klein_1.jpg differ
diff --git a/stb/photos/thumb_hinrich_tietjen_klein.jpg b/stb/photos/thumb_hinrich_tietjen_klein.jpg
new file mode 100755
index 0000000..fc5e8c1
Binary files /dev/null and b/stb/photos/thumb_hinrich_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_hinrich_warfsmann_klein.jpg b/stb/photos/thumb_hinrich_warfsmann_klein.jpg
new file mode 100755
index 0000000..2356dad
Binary files /dev/null and b/stb/photos/thumb_hinrich_warfsmann_klein.jpg differ
diff --git a/stb/photos/thumb_inge_warfsmann_klein.jpg b/stb/photos/thumb_inge_warfsmann_klein.jpg
new file mode 100755
index 0000000..ccea227
Binary files /dev/null and b/stb/photos/thumb_inge_warfsmann_klein.jpg differ
diff --git a/stb/photos/thumb_jakob_behrends.jpg b/stb/photos/thumb_jakob_behrends.jpg
new file mode 100755
index 0000000..9a896cf
Binary files /dev/null and b/stb/photos/thumb_jakob_behrends.jpg differ
diff --git a/stb/photos/thumb_jan_hendrick_klein.jpg b/stb/photos/thumb_jan_hendrick_klein.jpg
new file mode 100755
index 0000000..3683ac0
Binary files /dev/null and b/stb/photos/thumb_jan_hendrick_klein.jpg differ
diff --git a/stb/photos/thumb_jann_boergmann_klein.jpg b/stb/photos/thumb_jann_boergmann_klein.jpg
new file mode 100755
index 0000000..2e55e7a
Binary files /dev/null and b/stb/photos/thumb_jann_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_jann_van_echten_klein.jpg b/stb/photos/thumb_jann_van_echten_klein.jpg
new file mode 100755
index 0000000..c0c621d
Binary files /dev/null and b/stb/photos/thumb_jann_van_echten_klein.jpg differ
diff --git a/stb/photos/thumb_jantje_elise_andreesen_klein.jpg b/stb/photos/thumb_jantje_elise_andreesen_klein.jpg
new file mode 100755
index 0000000..c60c467
Binary files /dev/null and b/stb/photos/thumb_jantje_elise_andreesen_klein.jpg differ
diff --git a/stb/photos/thumb_jens_boergmann_klein.jpg b/stb/photos/thumb_jens_boergmann_klein.jpg
new file mode 100755
index 0000000..1092e6b
Binary files /dev/null and b/stb/photos/thumb_jens_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_johann_jansen_van_echten_klein.jpg b/stb/photos/thumb_johann_jansen_van_echten_klein.jpg
new file mode 100755
index 0000000..bbaa65f
Binary files /dev/null and b/stb/photos/thumb_johann_jansen_van_echten_klein.jpg differ
diff --git a/stb/photos/thumb_johanne_boergmann_klein.jpg b/stb/photos/thumb_johanne_boergmann_klein.jpg
new file mode 100755
index 0000000..176d3f4
Binary files /dev/null and b/stb/photos/thumb_johanne_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_karin_devries_klein.jpg b/stb/photos/thumb_karin_devries_klein.jpg
new file mode 100755
index 0000000..3c79805
Binary files /dev/null and b/stb/photos/thumb_karin_devries_klein.jpg differ
diff --git a/stb/photos/thumb_karl_elter_klein.jpg b/stb/photos/thumb_karl_elter_klein.jpg
new file mode 100755
index 0000000..cbd1ee9
Binary files /dev/null and b/stb/photos/thumb_karl_elter_klein.jpg differ
diff --git a/stb/photos/thumb_karl_wolters_klein.jpg b/stb/photos/thumb_karl_wolters_klein.jpg
new file mode 100755
index 0000000..1167e65
Binary files /dev/null and b/stb/photos/thumb_karl_wolters_klein.jpg differ
diff --git a/stb/photos/thumb_kathrin_boergmann_klein.jpg b/stb/photos/thumb_kathrin_boergmann_klein.jpg
new file mode 100755
index 0000000..b19bb89
Binary files /dev/null and b/stb/photos/thumb_kathrin_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_katrin_luettge_klein.jpg b/stb/photos/thumb_katrin_luettge_klein.jpg
new file mode 100755
index 0000000..f9a98fe
Binary files /dev/null and b/stb/photos/thumb_katrin_luettge_klein.jpg differ
diff --git a/stb/photos/thumb_katrin_lüttge_klein.jpg b/stb/photos/thumb_katrin_lüttge_klein.jpg
new file mode 100755
index 0000000..19d0950
Binary files /dev/null and b/stb/photos/thumb_katrin_lüttge_klein.jpg differ
diff --git a/stb/photos/thumb_kea_woltmann_klein.jpg b/stb/photos/thumb_kea_woltmann_klein.jpg
new file mode 100755
index 0000000..cd0564b
Binary files /dev/null and b/stb/photos/thumb_kea_woltmann_klein.jpg differ
diff --git a/stb/photos/thumb_klaas_boergmann_klein.jpg b/stb/photos/thumb_klaas_boergmann_klein.jpg
new file mode 100755
index 0000000..2b574b1
Binary files /dev/null and b/stb/photos/thumb_klaas_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_kurt_tietjen_klein.jpg b/stb/photos/thumb_kurt_tietjen_klein.jpg
new file mode 100755
index 0000000..1eb627b
Binary files /dev/null and b/stb/photos/thumb_kurt_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_levke_deVries_klein.jpg b/stb/photos/thumb_levke_deVries_klein.jpg
new file mode 100755
index 0000000..e6fec90
Binary files /dev/null and b/stb/photos/thumb_levke_deVries_klein.jpg differ
diff --git a/stb/photos/thumb_lisa_willms_klein.jpg b/stb/photos/thumb_lisa_willms_klein.jpg
new file mode 100755
index 0000000..0983469
Binary files /dev/null and b/stb/photos/thumb_lisa_willms_klein.jpg differ
diff --git a/stb/photos/thumb_manda_vosteen_klein.jpg b/stb/photos/thumb_manda_vosteen_klein.jpg
new file mode 100755
index 0000000..6f0a40f
Binary files /dev/null and b/stb/photos/thumb_manda_vosteen_klein.jpg differ
diff --git a/stb/photos/thumb_manfred_moeller.jpg b/stb/photos/thumb_manfred_moeller.jpg
new file mode 100755
index 0000000..13040e8
Binary files /dev/null and b/stb/photos/thumb_manfred_moeller.jpg differ
diff --git a/stb/photos/thumb_marei_deVries_klein.jpg b/stb/photos/thumb_marei_deVries_klein.jpg
new file mode 100755
index 0000000..ef42e9d
Binary files /dev/null and b/stb/photos/thumb_marei_deVries_klein.jpg differ
diff --git a/stb/photos/thumb_martha_tietjen_klein.jpg b/stb/photos/thumb_martha_tietjen_klein.jpg
new file mode 100755
index 0000000..75720df
Binary files /dev/null and b/stb/photos/thumb_martha_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_maxi_klein.jpg b/stb/photos/thumb_maxi_klein.jpg
new file mode 100755
index 0000000..c903fc1
Binary files /dev/null and b/stb/photos/thumb_maxi_klein.jpg differ
diff --git a/stb/photos/thumb_miene_warfsmann_klein.jpg b/stb/photos/thumb_miene_warfsmann_klein.jpg
new file mode 100755
index 0000000..c621d11
Binary files /dev/null and b/stb/photos/thumb_miene_warfsmann_klein.jpg differ
diff --git a/stb/photos/thumb_mona_posny_klein.jpg b/stb/photos/thumb_mona_posny_klein.jpg
new file mode 100755
index 0000000..ccbe9ab
Binary files /dev/null and b/stb/photos/thumb_mona_posny_klein.jpg differ
diff --git a/stb/photos/thumb_monika_heinz_klein.jpg b/stb/photos/thumb_monika_heinz_klein.jpg
new file mode 100755
index 0000000..ade23f5
Binary files /dev/null and b/stb/photos/thumb_monika_heinz_klein.jpg differ
diff --git a/stb/photos/thumb_morten_deVries_klein.jpg b/stb/photos/thumb_morten_deVries_klein.jpg
new file mode 100755
index 0000000..d4e65ad
Binary files /dev/null and b/stb/photos/thumb_morten_deVries_klein.jpg differ
diff --git a/stb/photos/thumb_peter_koenig_klein.jpg b/stb/photos/thumb_peter_koenig_klein.jpg
new file mode 100755
index 0000000..b2f4dab
Binary files /dev/null and b/stb/photos/thumb_peter_koenig_klein.jpg differ
diff --git a/stb/photos/thumb_rainer_willms_klein.jpg b/stb/photos/thumb_rainer_willms_klein.jpg
new file mode 100755
index 0000000..f7de2f2
Binary files /dev/null and b/stb/photos/thumb_rainer_willms_klein.jpg differ
diff --git a/stb/photos/thumb_reinhard_elter_klein.jpg b/stb/photos/thumb_reinhard_elter_klein.jpg
new file mode 100755
index 0000000..84371f0
Binary files /dev/null and b/stb/photos/thumb_reinhard_elter_klein.jpg differ
diff --git a/stb/photos/thumb_reinhard_willms_klein.jpg b/stb/photos/thumb_reinhard_willms_klein.jpg
new file mode 100755
index 0000000..f1beed3
Binary files /dev/null and b/stb/photos/thumb_reinhard_willms_klein.jpg differ
diff --git a/stb/photos/thumb_richard_hartlieb.jpg b/stb/photos/thumb_richard_hartlieb.jpg
new file mode 100755
index 0000000..981fa12
Binary files /dev/null and b/stb/photos/thumb_richard_hartlieb.jpg differ
diff --git a/stb/photos/thumb_roswitha_behrends.jpg b/stb/photos/thumb_roswitha_behrends.jpg
new file mode 100755
index 0000000..d90b2fa
Binary files /dev/null and b/stb/photos/thumb_roswitha_behrends.jpg differ
diff --git a/stb/photos/thumb_sientje_fink_klein.jpg b/stb/photos/thumb_sientje_fink_klein.jpg
new file mode 100755
index 0000000..cb9c389
Binary files /dev/null and b/stb/photos/thumb_sientje_fink_klein.jpg differ
diff --git a/stb/photos/thumb_steffen_boergmann_klein.jpg b/stb/photos/thumb_steffen_boergmann_klein.jpg
new file mode 100755
index 0000000..3d986c2
Binary files /dev/null and b/stb/photos/thumb_steffen_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_steffen_deVries_klein.jpg b/stb/photos/thumb_steffen_deVries_klein.jpg
new file mode 100755
index 0000000..d7b4fa5
Binary files /dev/null and b/stb/photos/thumb_steffen_deVries_klein.jpg differ
diff --git a/stb/photos/thumb_sylvia_backer.jpg b/stb/photos/thumb_sylvia_backer.jpg
new file mode 100755
index 0000000..d4b8b62
Binary files /dev/null and b/stb/photos/thumb_sylvia_backer.jpg differ
diff --git a/stb/photos/thumb_theda_buss_klein.jpg b/stb/photos/thumb_theda_buss_klein.jpg
new file mode 100755
index 0000000..c296a04
Binary files /dev/null and b/stb/photos/thumb_theda_buss_klein.jpg differ
diff --git a/stb/photos/thumb_theda_warfsmann_klein.jpg b/stb/photos/thumb_theda_warfsmann_klein.jpg
new file mode 100755
index 0000000..e65aeb7
Binary files /dev/null and b/stb/photos/thumb_theda_warfsmann_klein.jpg differ
diff --git a/stb/photos/thumb_thorsten_siebels.jpg b/stb/photos/thumb_thorsten_siebels.jpg
new file mode 100755
index 0000000..6e42756
Binary files /dev/null and b/stb/photos/thumb_thorsten_siebels.jpg differ
diff --git a/stb/photos/thumb_tina_siebels.jpg b/stb/photos/thumb_tina_siebels.jpg
new file mode 100755
index 0000000..73eb751
Binary files /dev/null and b/stb/photos/thumb_tina_siebels.jpg differ
diff --git a/stb/photos/thumb_tjako_backer.jpg b/stb/photos/thumb_tjako_backer.jpg
new file mode 100755
index 0000000..e15ab96
Binary files /dev/null and b/stb/photos/thumb_tjako_backer.jpg differ
diff --git a/stb/photos/thumb_ursula_vosteen_klein.jpg b/stb/photos/thumb_ursula_vosteen_klein.jpg
new file mode 100755
index 0000000..0f64ad4
Binary files /dev/null and b/stb/photos/thumb_ursula_vosteen_klein.jpg differ
diff --git a/stb/photos/thumb_volkert_holling_klein.jpg b/stb/photos/thumb_volkert_holling_klein.jpg
new file mode 100755
index 0000000..b095acb
Binary files /dev/null and b/stb/photos/thumb_volkert_holling_klein.jpg differ
diff --git a/stb/photos/thumb_waltraut_buss_klein.jpg b/stb/photos/thumb_waltraut_buss_klein.jpg
new file mode 100755
index 0000000..8cd1835
Binary files /dev/null and b/stb/photos/thumb_waltraut_buss_klein.jpg differ
diff --git a/stb/photos/thumb_werner_tietjen_klein.jpg b/stb/photos/thumb_werner_tietjen_klein.jpg
new file mode 100755
index 0000000..da9568a
Binary files /dev/null and b/stb/photos/thumb_werner_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_werner_willms_klein.jpg b/stb/photos/thumb_werner_willms_klein.jpg
new file mode 100755
index 0000000..857b110
Binary files /dev/null and b/stb/photos/thumb_werner_willms_klein.jpg differ
diff --git a/stb/photos/thumb_werner_woltmann_klein.jpg b/stb/photos/thumb_werner_woltmann_klein.jpg
new file mode 100755
index 0000000..5d96833
Binary files /dev/null and b/stb/photos/thumb_werner_woltmann_klein.jpg differ
diff --git a/stb/photos/thumb_wilfried_boergmann_klein.jpg b/stb/photos/thumb_wilfried_boergmann_klein.jpg
new file mode 100755
index 0000000..54dcfa8
Binary files /dev/null and b/stb/photos/thumb_wilfried_boergmann_klein.jpg differ
diff --git a/stb/photos/thumb_wilhelmiene_wartke_klein.jpg b/stb/photos/thumb_wilhelmiene_wartke_klein.jpg
new file mode 100755
index 0000000..02bfd4a
Binary files /dev/null and b/stb/photos/thumb_wilhelmiene_wartke_klein.jpg differ
diff --git a/stb/photos/thumb_willi_tietjen_klein.jpg b/stb/photos/thumb_willi_tietjen_klein.jpg
new file mode 100755
index 0000000..b9e0fdf
Binary files /dev/null and b/stb/photos/thumb_willi_tietjen_klein.jpg differ
diff --git a/stb/photos/thumb_willm_buss_klein.jpg b/stb/photos/thumb_willm_buss_klein.jpg
new file mode 100755
index 0000000..349b6b7
Binary files /dev/null and b/stb/photos/thumb_willm_buss_klein.jpg differ
diff --git a/stb/photos/thumb_wolfgang_dutkewitz_klein.jpg b/stb/photos/thumb_wolfgang_dutkewitz_klein.jpg
new file mode 100755
index 0000000..1ec88a3
Binary files /dev/null and b/stb/photos/thumb_wolfgang_dutkewitz_klein.jpg differ
diff --git a/stb/photos/thumb_xx_devries_klein.jpg b/stb/photos/thumb_xx_devries_klein.jpg
new file mode 100755
index 0000000..085cd70
Binary files /dev/null and b/stb/photos/thumb_xx_devries_klein.jpg differ
diff --git a/stb/photos/thumb_xx_hasnik_klein.jpg b/stb/photos/thumb_xx_hasnik_klein.jpg
new file mode 100755
index 0000000..36ddceb
Binary files /dev/null and b/stb/photos/thumb_xx_hasnik_klein.jpg differ
diff --git a/stb/photos/thumb_xx_roehrs_klein.jpg b/stb/photos/thumb_xx_roehrs_klein.jpg
new file mode 100755
index 0000000..155499a
Binary files /dev/null and b/stb/photos/thumb_xx_roehrs_klein.jpg differ
diff --git a/stb/photos/thumb_xxx_vosteen_klein.jpg b/stb/photos/thumb_xxx_vosteen_klein.jpg
new file mode 100755
index 0000000..f6e6bcd
Binary files /dev/null and b/stb/photos/thumb_xxx_vosteen_klein.jpg differ
diff --git a/stb/photos/thumb_zeeke_johanna_van_echten.jpg b/stb/photos/thumb_zeeke_johanna_van_echten.jpg
new file mode 100755
index 0000000..5d4ca1c
Binary files /dev/null and b/stb/photos/thumb_zeeke_johanna_van_echten.jpg differ
diff --git a/stb/photos/thumb__backer.jpg b/stb/photos/thumb__backer.jpg
new file mode 100755
index 0000000..efa9684
Binary files /dev/null and b/stb/photos/thumb__backer.jpg differ
diff --git a/stb/photos/thumb___klein.jpg b/stb/photos/thumb___klein.jpg
new file mode 100755
index 0000000..5927fa9
Binary files /dev/null and b/stb/photos/thumb___klein.jpg differ
diff --git a/stb/public/index.php b/stb/public/index.php
new file mode 100755
index 0000000..63988ce
--- /dev/null
+++ b/stb/public/index.php
@@ -0,0 +1,81 @@
+ [
+ 'controller' => 'loginController',
+ 'method' => 'homepages' // show Methode anwenden
+ ],
+ '/index' => [
+// 'controller' => 'loginController',
+ 'controller' => 'personController',
+ 'method' => 'index' // index Methode anwenden
+ ],
+ '/remarks' => [
+ 'controller' => 'personController',
+ 'method' => 'comment' //'show' // show Methode anwenden
+ ],
+ '/baum' => [
+ 'controller' => 'personController',
+ 'method' => 'baum' // show Methode anwenden
+ ],
+ '/nachkommen' => [
+ 'controller' => 'personController',
+ 'method' => 'nachkommen' // nachfahren Methode anwenden
+ ],
+ '/showlist' => [
+ 'controller' => 'personController',
+ 'method' => 'showlist' // show Methode anwenden
+ ],
+ '/showlist_1' => [
+ 'controller' => 'personController',
+ 'method' => 'showlist_1' // show Methode anwenden
+ ],
+ '/familienblatt' => [
+ 'controller' => 'personController',
+ 'method' => 'familienblatt' // show Methode anwenden
+ ],
+ '/familientafel' => [
+ 'controller' => 'personController',
+ 'method' => 'familientafel' // show Methode anwenden
+ ],
+ '/update' => [
+ 'controller' => 'personController',
+ 'method' => 'update' // show Methode anwenden
+ ],
+ '/login' => [
+ 'controller' => 'loginController',
+ 'method' => 'login' // index Methode anwenden
+ ],
+ '/logout' => [
+ 'controller' => 'loginController',
+ 'method' => 'logout' // index Methode anwenden
+ ],
+ '/dashboard' => [
+ 'controller' => 'loginController',
+ 'method' => 'dashboard' // dashboard Methode anwenden
+ ],
+ '/privat' => [
+ 'controller' => 'loginController',
+ 'method' => 'privat' // index Methode anwenden
+ ],
+ '/impressum' => [
+ 'controller' => 'loginController',
+ 'method' => 'impressum' // index Methode anwenden
+ ],
+ ];
+
+// Wenn in der PATH_INFO eine seite gespeichert wurde (z.B. /index oder /post)
+// kann sie aus dem array $routes ausgelesen werden. In diesem array ist gespeichert,
+// welcher controller zu verwenden ist und welche Methode des controllers anzuwenden ist
+// var_dump($routes[$pathInfo]);die();
+ if (isset($routes[$pathInfo])) { // ist eine PATH_INFO gesetzt?
+ $route = $routes[$pathInfo]; // zwischenspeichern
+ $controller = $container->make($route['controller']); // make für den controller setzen
+ $method = $route['method']; // Methode holen
+ $controller->$method(); // Controller führt Methode aus
+ }
+?>
diff --git a/stb/src/Core/AbstractController.php b/stb/src/Core/AbstractController.php
new file mode 100755
index 0000000..672b3fb
--- /dev/null
+++ b/stb/src/Core/AbstractController.php
@@ -0,0 +1,14 @@
+
diff --git a/stb/src/Core/AbstractModel.php b/stb/src/Core/AbstractModel.php
new file mode 100755
index 0000000..d9fb330
--- /dev/null
+++ b/stb/src/Core/AbstractModel.php
@@ -0,0 +1,25 @@
+$offset);
+ }
+
+ public function offsetGet ($offset) {
+ return $this->$offset;
+ }
+
+ public function offsetSet ($offset, $value) {
+ $this->$offset = $value;
+ }
+
+ public function offsetUnset ($offset) {
+ unset ($this->$offset);
+ }
+ }
+
+ ?>
diff --git a/stb/src/Core/AbstractRepository.php b/stb/src/Core/AbstractRepository.php
new file mode 100755
index 0000000..c463da8
--- /dev/null
+++ b/stb/src/Core/AbstractRepository.php
@@ -0,0 +1,358 @@
+pdo = $pdo;
+ }
+//************************************************************************
+ abstract public function getTableName();
+ abstract public function getModelName();
+//************************************************************************
+ function all() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table`
+ ORDER BY last_name, day_of_birth";
+ $stmt = $this->pdo->query($strSQL);
+ $persons = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $persons;
+ }
+
+//****************************** nach Alter aufsteigend *******************
+ function allByBirthday() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table`
+ ORDER BY day_of_birth, last_name";
+ $stmt = $this->pdo->query($strSQL);
+ $persons = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $persons;
+ }
+//************************************************************************
+ function allNamesBySex($sex) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT member_id, first_name, last_name, father_id, birth_name, gender,
+ day_of_birth, place_of_birth
+ FROM `$table`
+ WHERE gender = '$sex'
+ ORDER BY last_name, day_of_birth";
+ //$strSQL = "SELECT * FROM `$table` ORDER BY last_name, day_of_birth";
+ $stmt = $this->pdo->query($strSQL);
+ $persons = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $persons;
+ }
+
+//************************************************************************
+ function find($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table` WHERE member_id = :id";
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute(['id' => $id]);
+ $stmt->setFetchMode(PDO::FETCH_CLASS, $model);
+ $person = $stmt->fetch(PDO::FETCH_CLASS);
+ return $person;
+ }
+
+//****************************** nachfahren Anfangsbuchstaben *************
+ function findBy($char) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ if ($char != 'alle') {
+ $strSQL = "SELECT * FROM `$table`
+ WHERE (UPPER(SUBSTRING(last_name,1,1))=\"".$char."\")
+ ORDER BY last_name, day_of_birth";
+ } else {
+ $strSQL = "SELECT * FROM `$table`
+ ORDER BY last_name, day_of_birth";
+ }
+ $stmt = $this->pdo->query($strSQL);
+ $persons_char = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $persons_char;
+ }
+
+// ************************** Select father and mother of person by id
+ function father($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table`WHERE member_id = $id";
+ // echo $strSQL;
+ $stmt = $this->pdo->query($strSQL);
+ $father = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $father;
+ }
+
+ // ************************** Select mother and mother of person by id
+ function mother($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT mother_id FROM `$table`WHERE member_id = $id";
+ $stmt = $this->pdo->query($strSQL);
+ $mother = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $mother;
+ }
+
+// ***************** Select groups (children, siblings, couples, persons(sex))
+ function children($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT member_id, first_name, last_name, birth_name, gender, member_img,
+ day_of_birth, place_of_birth, day_of_death, place_of_death, mother_id, father_id
+ FROM `$table`
+ WHERE (father_id = $id)
+ UNION
+ SELECT member_id, first_name, last_name, birth_name, gender, member_img,
+ day_of_birth, place_of_birth, day_of_death, place_of_death, mother_id, father_id
+ FROM `$table`
+ WHERE (mother_id = $id)
+ ORDER BY day_of_birth";
+ $stmt = $this->pdo->query($strSQL);
+ $children = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $children;
+ }
+
+// Kindeskinder laden
+ function child_children($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT member_id, first_name, last_name, birth_name, gender, member_img,
+ day_of_birth, place_of_birth, day_of_death, place_of_death, mother_id, father_id
+ FROM `$table`
+ WHERE ((father_id = $id) OR (mother_id = $id))
+ ORDER BY member_id";
+ $stmt = $this->pdo->query($strSQL);
+ $child_children = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $child_children;
+ }
+
+ // ************************** Select siblings of person by id
+ function siblings($f_id, $id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table`
+ WHERE ((father_id = $f_id) AND (member_id != $id) AND (father_id != 0))
+ ORDER BY day_of_birth";
+ $stmt = $this->pdo->query($strSQL);
+ $siblings = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $siblings;
+ }
+
+ // ************************** Select unmarried people by sex and first charof last_name
+ function ledige_char($sex,$char) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ if ($sex == 1){
+ $str_sex = "man_id";
+ } else {
+ $str_sex = "woman_id";
+ }
+
+ if ($char != 'alle') {
+ $strSQL = "SELECT member_id, first_name, last_name, day_of_birth, day_of_death, gender
+ FROM gen_member
+ WHERE (((UPPER(SUBSTRING(last_name,1,1))=\"".$char."\")
+ AND (gender = ".$sex.")) AND (member_id NOT IN (
+ SELECT ".$str_sex. " FROM gen_partner))) ORDER BY last_name";
+ } else {
+ $strSQL = "SELECT member_id, first_name, last_name, day_of_birth, day_of_death, gender
+ FROM gen_member
+ WHERE ((gender = ".$sex.") AND (member_id NOT IN (
+ SELECT ".$str_sex. " FROM gen_partner))) ORDER BY last_name";
+ }
+ $statement = $this->pdo->query($strSQL);
+ $ledige = $statement->fetchALL(PDO::FETCH_CLASS, $model);
+ return $ledige;
+ }
+
+// **************** returns a list of couples ****************************
+ function couples($char){
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+ #echo "
".$table ." - ".$model."
";
+ if ($char != "alle") {
+ $WHERE = " AND (UPPER(SUBSTRING(last_name,1,1))=\"".$char."\")";
+ } else {
+ $WHERE = "";
+ }
+ #echo "
".$table; die();
+ $strSQL_2 = "SELECT member_id, first_name, last_name, birth_name FROM `$table`
+ LEFT JOIN gen_partner ON gen_member.member_id = gen_partner.man_id
+ WHERE (gen_member.member_id = gen_partner.man_id) ".$WHERE. "
+ ORDER BY gen_partner.man_id";
+ $statement = $this->pdo->query($strSQL_2);
+ $par_men = $statement->fetchALL(PDO::FETCH_CLASS, $model); // maried men
+ //var_dump($par_men); die();
+
+ $par_woman = array();
+ foreach ($par_men as $man){
+ $id = $man['member_id'];
+ $gen = 02;
+
+ $str_id = "gen_partner.woman_id";
+
+ $strSQL = "SELECT * FROM gen_member
+ LEFT JOIN gen_partner ON gen_member.member_id = $str_id
+ WHERE ((man_id = $id) OR (woman_id = $id))
+ ORDER BY par_von DESC";
+ $stmt = $this->pdo->query($strSQL);
+ $par_women[] = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ }
+
+ $couples = array();
+ $couple = array();
+ $i = 0;
+ foreach ($par_men as $man) {
+ $couple = [
+ 'm_member_id' => $man['member_id'],
+ 'm_first_name' => $man['first_name'],
+ 'm_last_name' => $man['last_name'],
+ 'm_birth_name' => $man['birth_name'],
+ 'f_member_id' => $par_women[$i][0]['member_id'],
+ 'f_first_name' => $par_women[$i][0]['first_name'],
+ 'f_last_name' => $par_women[$i][0]['last_name'],
+ 'f_birth_name' => $par_women[$i][0]['birth_name'],
+ ];
+ $couples[] = $couple;
+ //die();
+ $i++;
+ }
+ return $couples;
+ }
+
+ // ******************** returns a lst of members by first char of last_name
+ function parents($char){
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+ if ($char != "alle") {
+ $WHERE = "((gen_m1.member_id = gen_member.father_id) AND
+ (gen_m2.member_id = gen_member.mother_id)) AND
+ (UPPER(SUBSTRING(gen_member.last_name,1,1))=\"".$char."\")";
+ } else {
+ $WHERE = "((gen_m1.member_id = gen_member.father_id) AND
+ (gen_m2.member_id = gen_member.mother_id))";
+ }
+ $strSQL = "SELECT
+ gen_member.member_id,
+ gen_member.gender,
+ gen_member.first_name,
+ gen_member.last_name,
+ gen_member.birth_name,
+ gen_member.day_of_birth,
+ gen_member.day_of_death,
+
+ gen_m1.member_id AS m_member_id,
+ gen_m1.first_name AS m_first_name,
+ gen_m1.last_name AS m_last_name,
+ gen_m1.birth_name AS m_birth_name,
+ gen_m1.day_of_birth AS m_day_of_birth,
+ gen_m1.day_of_death AS m_day_of_death,
+
+ gen_m2.member_id AS f_member_id,
+ gen_m2.first_name AS f_first_name,
+ gen_m2.last_name AS f_last_name,
+ gen_m2.birth_name AS f_birth_name,
+ gen_m2.day_of_birth AS f_day_of_birth,
+ gen_m2.day_of_death AS f_day_of_death
+ FROM gen_member, gen_member AS gen_m1, gen_member AS gen_m2
+ WHERE ".$WHERE.
+ //" ORDER BY gen_member.last_name, gen_member.day_of_birth";
+ " ORDER BY gen_member.last_name, gen_member.day_of_birth"; //member_id";
+ //echo $strSQL; die;
+ $statement = $this->pdo->query($strSQL);
+ $parents = $statement->fetchALL(PDO::FETCH_CLASS, $model);
+ return $parents;
+ }
+
+// ******************** returns a lst of members, father and mother and their children
+ function family($char){
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+ //$char = "alle";
+ if ($char != "alle") {
+ $WHERE = "((gen_m1.member_id = gen_member.father_id) AND
+ (gen_m2.member_id = gen_member.mother_id)) AND
+ (UPPER(SUBSTRING(gen_member.last_name,1,1))=\"".$char."\")";
+ } else {
+ $WHERE = "((gen_m1.member_id = gen_member.father_id) AND
+ (gen_m2.member_id = gen_member.mother_id)) ";
+ }
+ //if ($char == "alle") {$firstChar = "";} else {$firstChar = $char;}
+ $strSQL = "SELECT gen_member.member_id, gen_member.first_name, gen_member.last_name, gen_member.father_id,
+ gen_m1.first_name AS m_first_name, gen_m1.last_name AS m_last_name,
+ gen_m2.first_name AS f_first_name, gen_m2.last_name AS f_last_name
+ FROM gen_member, gen_member AS gen_m1, gen_member AS gen_m2
+ WHERE ".$WHERE."
+ ORDER BY gen_member.last_name, gen_member.day_of_birth"; //member_id";
+
+ //echo $strSQL; die();
+ $statement = $this->pdo->query($strSQL);
+ $family = $statement->fetchALL(PDO::FETCH_CLASS, $model);
+ return $family;
+ }
+
+//************************************************************************
+ // Basis des Stammbaum (Parent_id = NULL)
+ function get_root($baum){
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $p = 999;
+ if ($baum != 0) {
+ $strSQL = "SELECT * FROM gen_member
+ WHERE member_id = ".$baum."
+ ORDER BY last_name, day_of_birth";
+ } else {
+ $strSQL = "SELECT member_id, first_name, last_name, day_of_birth, parent_id
+ FROM gen_member
+ WHERE parent_id = $p
+ ORDER BY parent_id, member_id ASC";
+ }
+ //echo $strSQL; die();
+
+ $statement = $this->pdo->query($strSQL);
+ $root = $statement->fetchALL(PDO::FETCH_CLASS, $model);
+ //var_dump($root); die();
+ return $root;
+ }
+// ******************** update functions ****************************
+ // ****************** update data for father and mother
+ public function updateForFather($member_id, $father_id) {
+ $table = $this->getTableName();
+ $data = [
+ 'father_id' => $father_id,
+ 'member_id' => $member_id
+ ];
+ $sql = "UPDATE gen_member SET father_id=:father_id WHERE member_id=:member_id";
+ $stmt= $this->pdo->prepare($sql);
+ $stmt->execute($data);
+ }
+
+//************************************************************************
+ public function updateForMother($member_id, $mother_id) {
+ $table = $this->getTableName();
+ $data = [
+ 'mother_id' => $mother_id,
+ 'member_id' => $member_id
+ ];
+ $sql = "UPDATE gen_member SET mother_id=:mother_id WHERE member_id=:member_id";
+ $stmt= $this->pdo->prepare($sql);
+ $stmt->execute($data);
+ }
+}
diff --git a/stb/src/Core/Container.php b/stb/src/Core/Container.php
new file mode 100755
index 0000000..afc68c5
--- /dev/null
+++ b/stb/src/Core/Container.php
@@ -0,0 +1,108 @@
+receips = [
+ 'loginService' => function() {
+ return new LoginService(
+ $this->make('usersRepository')
+ );
+ },
+ 'loginController' => function() {
+ return new LoginController(
+ $this->make('loginService')
+ );
+ },
+ 'personController' => function() {
+ return new PersonController( //neuer PersonsController
+ $this->make('personRepository'),
+ $this->make('remarkRepository'),
+ $this->make('partnerRepository'),
+ $this->make('wohnorteRepository'),
+ $this->make('ereignisseRepository'),
+ $this->make('adressenRepository')
+ );
+ },
+ 'usersRepository' => function() {
+ return new UsersRepository(
+ $this->make("pdo")
+ );
+ },
+ 'personRepository' => function() {
+ return new PersonRepository(
+ $this->make("pdo")
+ );
+ },
+ 'remarkRepository' => function() {
+ return new RemarkRepository(
+ $this->make("pdo")
+ );
+ },
+ 'partnerRepository' => function() {
+ return new PartnerRepository(
+ $this->make("pdo")
+ );
+ },
+ 'wohnorteRepository' => function() {
+ return new WohnorteRepository(
+ $this->make("pdo")
+ );
+ },
+ 'ereignisseRepository' => function() {
+ return new EreignisseRepository(
+ $this->make("pdo")
+ );
+ },
+ 'adressenRepository' => function() {
+ return new AdressenRepository(
+ $this->make("pdo")
+ );
+ },
+ 'pdo' => function() {
+ $servername = "mysqle8e6.netcup.net";
+ $port = "3306";
+ $username = "k46054_hbc";
+ $password = "cXZm/E97dKvZy6Cg*";
+ $dbname="k46054_hbc";
+
+ $pdo = new PDO("mysql:host=$servername;dbname=$dbname;port=$port", $username, $password);
+
+ //$pdo = new PDO('mysql:host=localhost;dbname=stammbaum;charset=utf8','root','');
+ $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
+ return $pdo;
+ }
+ ];
+ }
+
+ public function make($name)
+ {
+ if (!empty($this->instances[$name]))
+ {
+ return $this->instances[$name]; // DB-Verbindung besteht
+ }
+ // sonst ERZEUGE return $this->instances[$name
+ if (isset($this->receips[$name])) {
+ $this->instances[$name] = $this->receips[$name]();
+ }
+ return $this->instances[$name];
+ }
+}
+
+?>
diff --git a/stb/src/Person/AdressenModel.php b/stb/src/Person/AdressenModel.php
new file mode 100755
index 0000000..4447ce9
--- /dev/null
+++ b/stb/src/Person/AdressenModel.php
@@ -0,0 +1,17 @@
+
diff --git a/stb/src/Person/AdressenRepository.php b/stb/src/Person/AdressenRepository.php
new file mode 100755
index 0000000..1f4fb69
--- /dev/null
+++ b/stb/src/Person/AdressenRepository.php
@@ -0,0 +1,64 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table` WHERE adr_id = $id";
+ $stmt = $this->pdo->query($strSQL);
+ $adresse = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $adresse;
+ }
+
+
+ public function getAdrAll() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table` ORDER BY adr_ort";
+ $stmt = $this->pdo->query($strSQL);
+ $adressen = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $adressen;
+ }
+
+ public function insertForAdresse() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $adr_id = test_input($_POST['adr_id']);
+ $adr_plz = test_input($_POST['adr_plz']);
+ $adr_ort = test_input($_POST['adr_ort']);
+ $adr_strasse = test_input($_POST['adr_strasse']);
+ $adr_land = test_input($_POST['adr_land']);
+ $adr_phone = ""; //test_input($_POST['adr_land']);
+
+
+ if ($_POST['submit'] == "submit") {
+ $strSQL = "INSERT INTO gen_adresse (adr_plz, adr_ort, adr_strasse, adr_land)
+ VALUES ('".$adr_plz."', '".$adr_ort."', '".$adr_strasse."', '".$adr_land."')";
+ }
+
+ if ($_POST['submit'] == "update") {
+ $strSQL = "UPDATE gen_adresse
+ SET adr_plz='".$adr_plz."', adr_ort='".$adr_ort."', adr_strasse='".$adr_strasse."', adr_land='".$adr_land."'
+ WHERE adr_id ='".$adr_id."'";
+ }
+
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+}
+ ?>
diff --git a/stb/src/Person/EreignisseModel.php b/stb/src/Person/EreignisseModel.php
new file mode 100755
index 0000000..d8bcf59
--- /dev/null
+++ b/stb/src/Person/EreignisseModel.php
@@ -0,0 +1,15 @@
+
diff --git a/stb/src/Person/EreignisseRepository.php b/stb/src/Person/EreignisseRepository.php
new file mode 100755
index 0000000..a94392e
--- /dev/null
+++ b/stb/src/Person/EreignisseRepository.php
@@ -0,0 +1,52 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table` WHERE (member_id_f = $id)
+ ORDER BY issue_date";
+ $stmt = $this->pdo->query($strSQL);
+ $ereignisse = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $ereignisse;
+ }
+
+ public function insertForIssue() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $issue_id = test_input($_POST['issue_id']);
+ $member_id_f = test_input($_POST['member_id_f']);
+ $issue_date = test_input($_POST['issue_date']);
+ $issue_text = test_input($_POST['issue']);
+
+ if ($_POST['submit'] == "update") {
+ $strSQL = "UPDATE gen_ereignis
+ SET issue_date='".$issue_date."', issue='".$issue_text."'
+ WHERE issue_id ='".$issue_id."'";
+ }
+ if ($_POST['submit'] == "submit") {
+ $strSQL = "INSERT INTO gen_ereignis (member_id_f, issue_date, issue)
+ VALUES ('".$member_id_f."', '".$issue_date."', '".$issue_text."')";
+ }
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+
+}
+
+ ?>
diff --git a/stb/src/Person/PartnerModel.php b/stb/src/Person/PartnerModel.php
new file mode 100755
index 0000000..23ee6ec
--- /dev/null
+++ b/stb/src/Person/PartnerModel.php
@@ -0,0 +1,22 @@
+
diff --git a/stb/src/Person/PartnerRepository.php b/stb/src/Person/PartnerRepository.php
new file mode 100755
index 0000000..89d922f
--- /dev/null
+++ b/stb/src/Person/PartnerRepository.php
@@ -0,0 +1,109 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table` ORDER BY par_von DESC";
+
+ $stmt = $this->pdo->query($strSQL);
+ $partners_id = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $partners_id;
+ }
+*/
+// **************************************************************************
+ public function allByPartner($id,$m_gender) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ if ($m_gender == 01) {
+ $str_id = "gen_partner.woman_id";
+ } else {
+ $str_id = "gen_partner.man_id";}
+
+ $strSQL = "SELECT * FROM gen_member
+ LEFT JOIN gen_partner ON gen_member.member_id = $str_id
+ WHERE ((man_id = $id) OR (woman_id = $id))
+ ORDER BY par_von DESC";
+
+ $stmt = $this->pdo->query($strSQL);
+ $partner = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $partner;
+ }
+// ***********************************************************************
+/*
+ public function allPartnerBySex($sex) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ if ($sex == 01) {
+ $str_id = "gen_partner.woman_id";
+ } else { $str_id = "gen_partner.man_id";}
+
+ $strSQL = "SELECT * FROM gen_member
+ LEFT JOIN gen_partner ON gen_member.member_id = $str_id
+ WHERE ((gen_partner.man_id = gen_member.member_id) OR (gen_partner.woman_id = gen_member.member_id))
+ ORDER BY par_id ASC";
+
+ $stmt = $this->pdo->query($strSQL);
+ $partner = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $partner;
+ }
+*/
+// ********************************************************************
+ public function insertForPartner() {
+ $table = $this->getTableName();
+
+ $par_id = test_input($_POST['par_id']);
+ $man_id = test_input($_POST['man_id']);
+ $woman_id = test_input($_POST['woman_id']);
+ $par_von = test_input($_POST['par_von']);
+ $par_ort = test_input($_POST['par_ort']);
+ $par_devorce = test_input($_POST['par_devorce']);
+
+ $data = [
+ 'man_id' => $man_id,
+ 'woman_id' => $woman_id,
+ 'par_von' => $par_von,
+ 'par_ort' => $par_ort,
+ 'par_devorce' => $par_devorce
+ ];
+
+ //var_dump($_POST); die();
+ if ($_POST['submit'] == "submit") {
+ $sql = "INSERT INTO `$table` (`man_id`, `woman_id`, `par_von`, `par_ort`, `par_devorce`)
+ VALUES (:man_id, :woman_id, :par_von, :par_ort, :par_devorce)";
+
+ $stmt= $this->pdo->prepare($sql);
+ $stmt->execute($data);
+ }
+
+ if ($_POST['submit'] == "update") {
+
+ $data['par_id'] = $par_id;
+ $sql = "UPDATE gen_partner
+ SET man_id = :man_id, woman_id = :woman_id, par_von = :par_von, par_ort = :par_ort, par_devorce = :par_devorce
+ WHERE par_id = :par_id";
+
+ $stmt= $this->pdo->prepare($sql);
+ $stmt->execute($data);
+ }
+ }
+
+}
+
+ ?>
diff --git a/stb/src/Person/PersonController.php b/stb/src/Person/PersonController.php
new file mode 100755
index 0000000..7bc37fc
--- /dev/null
+++ b/stb/src/Person/PersonController.php
@@ -0,0 +1,736 @@
+personRepository = $personRepository;
+ $this->remarkRepository = $remarkRepository;
+ $this->partnerRepository = $partnerRepository;
+ $this->wohnorteRepository = $wohnorteRepository;
+ $this->ereignisseRepository = $ereignisseRepository;
+ $this->adressenRepository = $adressenRepository;
+ }
+
+// ****************** functions ************************************************
+// Returns true when the user is checked in, else false
+ function is_checked_in() {
+ if (isset($_SESSION['login'])) {
+ return true;
+ } else {
+ header("Location: login");
+ die(); // hier könnte auch eine exeption ausgeführt werden
+ }
+ }
+// Returns true when the user is admin, else false
+ function is_admin() {
+ if (isset($_SESSION['login'])) {
+ //echo "Login: ".$_SESSION['login']."
";
+ if ($_SESSION['login'] == 'h.boergmann@t-online.de') {
+ return true;}
+ } else {
+ //header("Location: login");
+ header("Location: ./../../public/index.php/login");
+
+ die(); // hier könnte auch eine exeption ausgeführt werden
+ }
+ }
+// **************** End functions **********************************************
+// ********************** start site *** ***************************************
+ public function index() {
+ $this->is_checked_in(); // returns true or goto login
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'];
+ $_SESSION['id'] = $id;
+ } else {
+ if (isset($_SESSION['id'])) {
+ $id = $_SESSION['id'];
+ } else {
+ $id = 2;
+ $_SESSION['id'] = 2;
+ }
+ }
+ $person = $this->personRepository->find($id);
+ $persons = $this->personRepository->all();
+ $this->render ("person/index", [
+ 'person' => $person,
+ 'persons' => $persons
+ ]);
+ }
+
+// ******************** show family tree ***************************************
+ public function baum() {
+ global $anz_gen, $partner, $ladezeit;
+ $sql_start = microtime(1); // ladezeit messen
+ $this->is_checked_in(); // returns true or goto login
+ if (isset($_GET['anz'])) { // Anzahl Generationen
+ $anz_gen = $_GET['anz'];
+ $_SESSION['anz'] = $anz_gen;
+ } else {
+ if (isset($_SESSION['anz'])) {
+ $anz_gen = $_SESSION['anz'];
+ } else { $anz_gen = 4; }
+ }
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'];
+ $_SESSION['id'] = $id;
+ } else {
+ if (isset($_SESSION['id'])) {
+ $id = $_SESSION['id'];
+ } else { $id = 1; }
+ }
+ if (isset($_GET['baum'])) { // beginn des stammbaums
+ $baum = $_GET['baum'];
+ $_SESSION['baum'] = $baum;
+ } else {
+ if (isset($_SESSION['baum'])) {
+ $baum = $_SESSION['baum'];
+ } else { $baum = 0; }
+ }
+
+ if ($anz_gen == 5) { // Stammväter
+ //echo $baum;die();
+ $roots = $this->personRepository->get_root(0); // alle roots
+ //var_dump($roots); die();
+ $root = $this->personRepository->get_root($baum); // selected root
+ //var_dump($root);die();
+ $sex = 1;
+ $persons = $this->personRepository->allByBirthday(); // nach Alter
+ $person_man = $this->personRepository->allNamesBySex($sex);
+ //var_dump($person_man); die();
+ $family = [
+ 'persons' => $persons,
+ 'person_man' => $person_man,
+ 'roots' => $roots, // all root persons
+ 'root' => $root, // selected root
+ 'anz' => $anz_gen, // Anzahl
+ 'baum' => $baum // SEESSION[baum]
+ ];
+
+ } else {
+ $f_id = $m_id = ""; // dummy
+ $family = $this->get_fam($f_id, $m_id, $id);
+ }
+
+ $sql_end = microtime(1);
+ $ladezeit = $sql_end - $sql_start;
+ //var_dump($partner);die();
+ $this->render ("person/baum", $family);
+ }
+
+
+// ******************** show family on one sheet *******************************
+ public function familienblatt() {
+ global $ladezeit;
+ $sql_start = microtime(1);
+ $this->is_checked_in(); // returns true or goto login
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'];
+ $_SESSION['id'] = $id;
+ $person = $this->personRepository->find($id); // Person finden
+ }
+ $gender = $person['gender'];
+ $fa_id = $mo_id = ""; // dummy
+ $family = $this->get_fam($fa_id,$mo_id,$id);
+ $sql_end = microtime(1);
+ $ladezeit = $sql_end - $sql_start;
+ $this->render ("person/familienblatt", $family);
+ }
+
+// ******************* show family table ***************************************
+ public function familientafel() {
+ global $ladezeit;
+ $sql_start = microtime(1);
+ $this->is_checked_in(); // returns true or goto login
+ //var_dump($_GET);die();
+ if (isset($_GET['id'])) { // neue Person
+ $id = $_GET['id'];
+ $_SESSION['id'] = $id;
+ $person = $this->personRepository->find($id);
+ $gender = $person['gender'];
+ $fa_id = 0; //müssen gesetzt sein
+ $mo_id = 0;
+ $family = $this->get_fam($fa_id,$mo_id,$id);
+ }
+ if (isset($_GET['fam_id'])) { // neue Familie: Person wird zu Vater
+ $id = $_GET['fam_id'];
+ $_SESSION['id'] = $id;
+ $child = $this->personRepository->find($id); // load child fam_id
+ $gend = $child['gender'];
+ $id = $child['member_id']; // load partner of child (new mother)
+ $person = $this->personRepository->find($id); //neuer Vater oder Mutter
+ //var_dump($person);die();
+
+ $partner = $this->partnerRepository->allByPartner($id, $gend); // Partner laden
+ if (!empty($partner)) {
+ $anz = count($partner)-1; // letzter Partner (-1)
+ $fa_id = $partner[$anz]['man_id'];
+ $mo_id = $partner[$anz]['woman_id'];
+ $family = $this->get_fam_by_parents($fa_id, $mo_id); // load family
+ } else {
+ $fa_id = $id; $mo_id = "";
+ $family = $this->get_fam_by_parents($fa_id, $mo_id);
+ }
+ }
+ $sql_end = microtime(1);
+ $ladezeit = $sql_end - $sql_start;
+ $this->render ("person/familientafel", $family);
+ }
+ // ******************** show progenies (nachfahren) ****************************
+ public function nachkommen() {
+ global $ladezeit;
+ $sql_start = microtime(1); // ladezeit messen
+ $this->is_checked_in(); // returns true or goto login
+ $gen_00 = $gen_10 = $gen_20 = $gen_30 = $gen_40 = $gen_50 = array(); // male
+ $gen_01 = $gen_11 = $gen_21 = $gen_31 = $gen_41 = $gen_51 = array(); // female
+ $gen_300 = $gen_301 = $gen_400 = $gen_401 = $gen_500 = $gen_501 = $part = array(); // children
+ $partner_c = array();
+
+ if (isset($_GET['mid'])) {
+ $mid = $_GET['mid']; //
+ $childs = $this->personRepository->children($mid); // children Grandmother
+
+ $id = $childs[0]['member_id']; // child of grandmother
+ } else {
+ if (isset($_GET['id'])) { $id = $_GET['id']; }
+ }
+
+ if (!empty($id) OR $id!=0) {
+ $person = $this->personRepository->find($id); // Person
+ $f_id = $person['father_id']; // Vater der Personn
+ $m_id = $person['mother_id']; // Mutter der Person
+ } else { $person = array();} // no Person
+
+ if ($f_id != 0){
+ $father = $this->personRepository->find($f_id); // father
+ $gf_id = $father['father_id']; // Großvaters id
+ } else { $father = array(); }
+
+ if ($m_id != 0){
+ $mother = $this->personRepository->find($m_id); // mother
+ $gm_id = $mother['mother_id']; // Großmutters id
+ } else { $mother = array(); }
+
+ // ******************** Großeltern väterlich
+ if (!empty($father)) {
+ $gff_id = $father['father_id']; // grandfather by father
+ $gffather = $this->personRepository->find($gff_id);
+ $gmf_id = $father['mother_id']; // grandmother by father
+ $gmfather = $this->personRepository->find($gmf_id);
+ } else { $gffather = array(); $gmfather = array(); }
+
+ if (!empty($gffather)) { // grandfather by grandfatherfather
+ $gen_00[] = $this->personRepository->find($gffather['father_id']);
+ } else { $gen_00 = array(); }
+
+ if (!empty($gffather)) { // grandfather by grandfatherfather
+ $gen_01[] = $this->personRepository->find($gffather['mother_id']);
+ } else { $gen_01 = array(); }
+
+ if (!empty($gff_id)){
+ $siblings_f = $this->personRepository->siblings($gff_id,$f_id); // siblings of father
+ } else { $siblings_f = array(); }
+
+ // ****************** (gen_300) siblings + person ******************************
+ $siblings = $this->personRepository->siblings($f_id, $id); // siblings of person (3. Generation)
+ array_unshift ($siblings, $person); // include person (first position)
+ $gen_30[] = $siblings; //Person und geschwister
+
+ // ************* gen_200 Father, his siblings and their children (Gen_300) *****
+ foreach ($siblings_f as $sib_f) { // ohne Vater
+ if (!empty($sib_f)) {
+ $gen_20[] = $sib_f; // siblings of father
+
+ $id_0 = $sib_f['member_id']; // children of father and his siblings
+ $childs = $this->personRepository->children($id_0); // children of siblings_f and cousins
+ $gen_30[] = $childs; // childs of person and their siblings
+ }
+ }
+ // ********************** partner of gen_30 ************************************
+ //echo "
";
+ foreach ($gen_30 as $g300) {
+ $anz = count($g300); // Kinder
+ for ($a = 0; $a < $anz; $a++){
+ $gend = $g300[$a]['gender'];
+ $id = $g300[$a]['member_id']; // load partner der Kinder
+ $gen_31[] = $this->partnerRepository->allByPartner($id, $gend); // Partner laden
+ $childs = $this->personRepository->children($id);
+ $gen_40[] = $childs; // Enkel
+ $anz_c = count($childs); // Anz. Enkel
+ if ($anz_c == 0){ $partner_c[] = array();
+ } else {
+ for ($c = 0; $c < $anz_c; $c++){
+ $gend_c = $childs[$c]['gender'];
+ $id_c = $childs[$c]['member_id']; // Kinder von Person
+ $partner_c[] = $this->partnerRepository->allByPartner($id_c, $gend_c); // Partner Kind laden
+ }
+ }
+ $gen_41[] = $partner_c;
+ $partner_c = array();
+ }
+ $gen_301[] = $gen_31;
+ $gen_400[] = $gen_40;
+ $gen_401[] = $gen_41;
+ $gen_31 = $gen_40 = $gen_41 = array();
+ }
+
+ // Kindeskinder vorhanden?
+ $g_500 = array();
+ foreach ($gen_400 as $g_40){
+ foreach ($g_40 as $g_4){
+ foreach ($g_4 as $g_4000){
+ $id_cc = $g_4000['member_id'];
+ $gen_cc = $g_4000['gender'];
+ $child_childs = $this->personRepository->child_children($id_cc); // children of siblings_f and cousins
+ $gen_500[] = $child_childs;
+ $anz_cc = count($child_childs); // Anz. Enkel
+ for ($c = 0; $c < $anz_cc; $c++){
+ $gend_cc = $child_childs[$c]['gender'];
+ $id_cc = $child_childs[$c]['member_id']; // Kinder von Person
+ $gen_51[] = $partner_cc = $this->partnerRepository->allByPartner($id_cc, $gend_cc); // Partner Kind laden
+ }
+ $partner_cc = array();
+ }
+ }
+ }
+ // die();
+ // ****** Father gen_20 + siblings ; Partner (Mother) gen_21********************
+ array_unshift ($gen_20, $father); //echo "";
+ $i = 0;
+ $a = $anz = 0;
+ if (!empty($gen_20[0]->member_id)){
+ $anz = count($gen_20);
+ for ($a = 0; $a < $anz; $a++){
+ $gend = $gen_20[$a]['gender'];
+ $id = $gen_20[$a]['member_id']; // load partner (new mother)
+ $gen_21[] = $this->partnerRepository->allByPartner($id, $gend); // Partner laden
+ }
+ }
+ // ******************* Grandfather gen_10; Grandmother_11 **********************
+ $gen_10[] = $gffather;
+ $gen_11[] = $gmfather;
+
+ // *****************************************************************************
+ $persons = $this->personRepository->all(); // all persons
+ $sql_end = microtime(1);
+ //echo $ladezeit = $sql_end - $sql_start;
+ //die();
+ $family = [
+ 'persons' => $persons,
+ 'person' => $person,
+ 'gen_00' => $gen_00,
+ 'gen_01' => $gen_01,
+ 'gen_10' => $gen_10, // grandfather
+ 'gen_11' => $gen_11,
+ 'gen_20' => $gen_20, // father
+ 'gen_21' => $gen_21,
+ 'gen_30' => $gen_30,
+ 'gen_301' => $gen_301,
+ 'gen_40' => $gen_400, // grandchild
+ 'gen_401' => $gen_401,
+ 'gen_500' => $gen_500,
+ 'gen_51' => $gen_51
+ ];
+ $this->render ("person/nachkommen", $family);
+ }
+ //
+
+// ************** get partner of a group like children and siblings ************
+ public function getPartnerOf($group, $member) {
+ $group_p = array();
+ $zero = array();
+ $zero[] = 0;
+ if (!empty($member)) {$group_p[] = $member;} // insert father or mother
+ foreach ($group as $part) {
+ if (!empty($part)) {
+ $p_id = $part['member_id'];
+ $gen = $part['gender'];
+ $partner = $this->partnerRepository->allByPartner($p_id, $gen);
+ if (!(empty($partner))) {
+ echo $anz_p = count($partner)."
";
+ //foreach ($partner as $p){
+ for ($a=0; $a < $anz_p; $a++) {
+ $group_p[] = $partner[$a];
+ }
+ } else { $group_p[] = $zero; }
+ }
+ }
+ return $group_p; // array with partners of a group of people
+ }
+
+// ******************** display variant lists **********************************
+ public function showlist() {
+ global $ladezeit;
+ $sql_start = microtime(1);
+ $this->is_checked_in(); // returns true or goto login
+ $persons = $this->personRepository->all();
+ if (isset($_GET['zeichen'])) { // zeichen: Anfangsbuchstabe Nachname
+ $zeichen = $_GET['zeichen'];
+ $_SESSION['zeichen'] = $zeichen;
+ } else {
+ if (isset($_session['zeichen'])) {
+ $zeichen = $_session['zeichen'];
+ } else {
+ $zeichen = "alle";
+ $zeichen = "B";
+ $_session['zeichen'] = $zeichen;
+ }
+ }
+ $persons_char = $this->personRepository->findBy($zeichen);
+ if (isset($_GET['liste'])) { // liste: Auswahl für verschiedene Listen
+ $liste = $_GET['liste'];
+ $_SESSION['liste'] = $liste;
+ } else {
+ if (isset($_SESSION['liste'])) {
+ $liste = $_SESSION['liste'];
+ } else {
+ $liste = 6; // Standardliste beim ersten Aufruf
+ $_SESSION['liste'] = $liste;
+ }
+ }
+ // empty arrays for unmarried men and women
+ $ledige_men = $ledige_women = array(); // empty array for women
+ $couples = $partners = array(); // empty array for partners
+ $mothers = $fathers = array(); // empty array for fathers
+ $parents = $parent = array(); // empty array for parent
+ $children_all = $family = array();
+ $remarks = array();
+
+ switch($liste) {
+ case 1: // Liste 1: ledige men nach Anfangsbuchstaben
+ $sex = 1;
+ $ledige_men = $this->partnerRepository->ledige_char($sex,$zeichen);
+ break;
+ case 2: // Liste 2 ledige women
+ $sex = 2;
+ $ledige_women = $this->partnerRepository->ledige_char($sex,$zeichen);
+ break;
+ case 3: // Liste 3: cuples
+ $couples = $this->personRepository->couples($zeichen);
+ break;
+ case 4: // Liste 4: parents
+ $parents = $this->personRepository->parents($zeichen); //($persons_char);
+ //$sql_end = microtime(1); $sql_time = $sql_end - $sql_start; echo $sql_time; die();
+ break;
+ case 5: // Liste 5: persons grouped by last_name
+ $persons = $this->personRepository->all();
+ break;
+ case 6: // Liste 6: families
+ $sql_start = microtime(1);
+ $parents = $this->personRepository->parents($zeichen);
+ foreach ($parents as $par) {
+ $id = $par['member_id'];
+ $gender = $par['gender'];
+ $children = $this->personRepository->children($id); // children
+ $children_all[] = $children;
+ $partner = $this->partnerRepository->allByPartner($id, $gender);
+ $partners[] = $partner;
+ }
+ break;
+ case 7:
+ $remarks = $this->remarkRepository->every_remark();
+ break;
+ }
+
+ $listen = [
+ 'persons' => $persons,
+ 'partners' => $partners,
+ 'fathers' => $fathers,
+ 'mothers' => $mothers,
+ 'persons_char' => $persons_char,
+ 'couples' => $couples,
+ 'parents' => $parents,
+ 'children_all' => $children_all,
+ 'ledige_men' => $ledige_men,
+ 'ledige_women' => $ledige_women,
+ 'ledige' => $ledige,
+ 'remarks' => $remarks,
+ 'zeichen' => $zeichen,
+ 'liste' => $liste,
+ //'family' => $family
+ ];
+ $sql_end = microtime(1);
+ $ladezeit = $sql_end - $sql_start;
+ $this->render ("person/showlist", $listen);
+ }
+
+// *************** show list of persons ****************************************
+ public function showlist_1() {
+ global $ladezeit, $sql_start;
+ $sql_start = microtime(1);
+ $this->is_checked_in(); // returns true or goto login
+ if ($_SESSION['rechte'] == "admin") {
+ $persons = $this->personRepository->all();
+ $this->render ("person/showlist_1", [
+ 'persons' => $persons
+ ]);
+ }else{
+ header("Location: login");
+ die();
+ }
+ }
+
+// ******************** show remarks to each person ****************************
+ //public function show() {
+ public function comment() {
+ $sql_start = microtime(1);
+ //die();
+ $this->is_checked_in(); // returns true or goto login
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'];
+ if (isset($_POST['content'])) {
+ $id = $_POST['member_id_f'];
+ $date = $_POST['rem_date'];
+ $remarks = $_POST['content'];
+ $this->remarkRepository->insertForRemark($id, $date, $remarks);
+ }
+ $persons = $this->personRepository->all();
+ $person = $this->personRepository->find($id);
+ $remarks = $this->remarkRepository->allByPerson($id);
+ $sql_end = microtime(1);
+ $ladezeit = $sql_end - $sql_start;
+ //$this->render ("person/show", [
+ $this->render ("person/comment", [
+ 'persons' => $persons,
+ 'person' => $person,
+ 'remarks' => $remarks,
+ 'ladezeit' => $ladezeit
+ ]);
+ }
+ }
+
+
+// ************** update data **************************************************
+ public function update() {
+ global $ladezeit;
+ $sql_start = microtime(1);
+ $this->is_checked_in();
+//******************** get id of affected person ******************************
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'];
+ $_SESSION['id'] = $id;
+ } else {
+ if (isset($_SESSION['id'])) {
+ $id = $_SESSION['id'];
+ } else {
+ $id = 2;
+ $_SESSION['id'] = 2;
+ }
+ }
+
+// ******************* update father *******************************************
+ if (isset($_GET['va_id'])) { // Auswahl Vater
+ $va_id = $_GET['va_id'];
+ $this->personRepository->updateForFather($id, $va_id);
+ }
+// ******************* update mother *******************************************
+ if (isset($_GET['ma_id'])) { // Auswahl Mutter
+ $ma_id = $_GET['ma_id'];
+ $this->personRepository->updateForMother($id, $ma_id);
+ }
+// ******************* insert data *********************************************
+
+ if($_SERVER['REQUEST_METHOD']=="POST") {
+ //var_dump($_POST);echo "";die();
+ switch($_POST['who']) {
+ case 1:
+ $this->personRepository->insertForPerson();
+ break;
+ case 2:
+ $this->partnerRepository->insertForPartner(); //
+ break;
+ case 3:
+ $this->ereignisseRepository->insertForIssue(); // ok
+ break;
+ case 4:
+ $this->wohnorteRepository->insertForPlace(); // ok
+ break;
+ case 5:
+ $this->adressenRepository->insertForAdresse(); //
+ break;
+ case 6:
+ $this->remarkRepository->insertUpdateForRemark(); //
+ break;
+ case 7:
+ $this->userRepository->insertForUser(); //
+ break;
+ }
+ }
+ // ****************** get person *****************************************
+ $person = $this->personRepository->find($id);
+ $fa_id = $mo_id = ""; // dummy
+ $family = $this->get_fam($fa_id, $mo_id, $id);
+ $sql_end = microtime(1);
+ $ladezeit = $sql_end - $sql_start;
+
+ $this->render ("person/update", $family);
+ }
+
+// ***************** ende update ***********************************************
+
+// ****************** get family data ******************************************
+ // by parents
+ public function get_fam_by_parents($fa_id, $mo_id) {
+ $f_id = $fa_id;
+ $m_id = $mo_id;
+ $id = 0;
+ $family = $this->get_fam($f_id, $m_id, $id);
+ return $family;
+ }
+ // by person
+ public function get_fam_by_person($id) {
+ $person = $this->personRepository->find($id); // Person
+ $f_id = $person['father_id'];
+ $m_id = $person['mother_id'];
+ $id = 0;
+ $family = $this->get_fam($f_id, $m_id, $id);
+ return $family;
+ }
+
+ // *************************************************************************
+ public function get_fam($f_id, $m_id, $id) {
+ global $partner;
+ if (!empty($id) OR $id!= 0) { // id # 0 or empty
+ $person = $this->personRepository->find($id); // Person
+ //$gender = $person['gender'];
+ //$partner = $this->partnerRepository->allByPartner($id, $gender);
+ $f_id = $person['father_id'];
+ $m_id = $person['mother_id'];
+ } else { $person = array();}
+// ************************ Parents
+ if ($f_id != 0){
+ $father = $this->personRepository->find($f_id); // father
+ } else {$father = array();}
+ if ($m_id != 0){
+ $mother = $this->personRepository->find($m_id); // mother
+ } else { $mother = array();}
+
+// ************************* Grand_parents(father) *****************************
+ if (!empty($father)) {
+ $gff_id = $father['father_id']; // grandfather father
+ $gffather = $this->personRepository->find($father['father_id']);
+
+ $gmf_id = $father['mother_id']; // grandmother father
+ $gmfather = $this->personRepository->find($father['mother_id']);
+ } else { $gffather=array(); $gmfather=array(); }
+
+// ************************* Grand_parents(mother) *****************************
+ if (!empty($mother)) {
+ $gfm_id = $mother['father_id']; // grandfather mother
+ $gfmother = $this->personRepository->find($mother['father_id']);
+
+ $gmm_id = $mother['mother_id']; // grandmother mother
+ $gmmother = $this->personRepository->find($mother['mother_id']);
+ } else { $gfmother=array(); $gmmother= array();}
+
+// *************************** Parents of Grand_parents(father) ****************
+ if (!empty($gffather)) {
+ // father grandfather father
+ $f_gffather = $this->personRepository->find($gffather['father_id']);
+
+ // mother grandmother father
+ $m_gffather = $this->personRepository->find($gffather['mother_id']);
+
+ } else { $f_gffather=array(); $m_gffather=array(); }
+
+// *************************** Parents of Grand_parents(mother)
+ if (!empty($gfmother)) {
+ // father grandfather mother
+ $f_gfmother = $this->personRepository->find($gfmother['father_id']);
+ // mother grandmother mother
+ $m_gfmother = $this->personRepository->find($gfmother['mother_id']);
+ } else {$f_gfmother=array(); $m_gfmother= array();}
+
+// *************************** Parents of Grand_parents(father)
+ if (!empty($gmfather)) {
+ // father grandfather father
+ $f_gmfather = $this->personRepository->find($gmfather['father_id']);
+ // mother grandmother father
+ $m_gmfather = $this->personRepository->find($gmfather['mother_id']);
+ } else { $f_gmfather=array(); $m_gmfather=array(); }
+
+// ************************** Parents of Grand_parents(mother)
+ if (!empty($gmmother)) {
+ // father grandfather mother
+ $f_gmmother = $this->personRepository->find($gmmother['father_id']);
+ // mother grandmother mother
+ $m_gmmother = $this->personRepository->find($gmmother['mother_id']);
+ } else {$m_gmmother=array(); $f_gmmother= array();}
+
+// *************************** all persons *************************************
+ $persons = $this->personRepository->all();
+// *************************** siblings of person ******************************
+ $siblings = $this->personRepository->siblings($f_id,$id);
+// *************************** children of person
+ if (!empty($id)) {
+ $children = $this->personRepository->children($id);
+ } else { $children = array(); }
+
+// **************************** siblings of father
+ if (!empty($gff_id)){
+ $siblings_f = $this->personRepository->siblings($gff_id,$f_id);
+ } else { $siblings_f = array(); }
+
+// ***************************** siblings of mother
+ if (!empty($gfm_id)){
+ $siblings_m = $this->personRepository->siblings($gfm_id,$m_id);
+ } else { $siblings_m = array(); }
+
+ if (!empty($id)){
+ $gender = $person['gender'];
+ $partner = $this->partnerRepository->allByPartner($id, $gender);
+ $adressen = $this->adressenRepository->getAdrAll();
+ $wohnorte = $this->wohnorteRepository->allByMember($id);
+ $orte = $this->wohnorteRepository->allByMemberId($id);
+ $ereignisse = $this->ereignisseRepository->allByMember($id);
+ $bemerkungen = $this->remarkRepository->allByPerson($id);
+ } else {
+ $partner=array(); $adressen=array(); $wohnorte=array();
+ $orte=array(); $ereignisse=array(); $bemerkungen=array();
+ }
+ //var_dump($partner);die();
+ $family = [
+ 'person' => $person, // persons (by id)
+ 'partner' => $partner, // Partner of person
+ 'persons' => $persons, // persons (all)
+ 'father' => $father, // father
+ 'mother' => $mother, // mother
+ 'gffather' => $gffather, // father of father
+ 'gfmother' => $gfmother, // mother of father
+ 'gmfather' => $gmfather, // father of mother
+ 'gmmother' => $gmmother, // mother of mother
+ 'f_gffather' => $f_gffather, // father of grand father (father)
+ 'm_gffather' => $m_gffather, // mother of grand father (father)
+ 'f_gfmother' => $f_gfmother, // father of grand mother (father)
+ 'm_gfmother' => $m_gfmother, // mother of grand mother (father)
+ 'f_gmfather' => $f_gmfather, // father of grand father (mother)
+ 'm_gmfather' => $m_gmfather, // mother of grand father (mother)
+ 'f_gmmother' => $f_gmmother, // father of grand mother (mother)
+ 'm_gmmother' => $m_gmmother, // mother of grand mother (mother)
+ 'children' => $children, // children of person
+ 'siblings' => $siblings, // Geschwister of person
+ 'siblings_m' => $siblings_m, // Geschwister väterlich
+ 'siblings_f' => $siblings_f, // Geschwister mütterlich
+
+ 'wohnorte' => $wohnorte, // Wohnorte
+ 'orte' => $orte, // Orte
+ 'adressen' => $adressen, // Adressen
+ 'ereignisse' => $ereignisse, // Ereignisse
+ 'bemerkungen' => $bemerkungen // Bemerkungen
+ ];
+ //echo "hier";
+ //var_dump($partner);die();
+ return $family;
+ }
+ }
+?>
diff --git a/stb/src/Person/PersonModel.php b/stb/src/Person/PersonModel.php
new file mode 100755
index 0000000..f797cc4
--- /dev/null
+++ b/stb/src/Person/PersonModel.php
@@ -0,0 +1,26 @@
+
diff --git a/stb/src/Person/PersonRepository.php b/stb/src/Person/PersonRepository.php
new file mode 100755
index 0000000..5745809
--- /dev/null
+++ b/stb/src/Person/PersonRepository.php
@@ -0,0 +1,83 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $member_id = test_input($_POST['member_id']);
+ $gender = test_input($_POST['gender']);
+ $parent_id = test_input($_POST['parent_id']);
+ //if ($parent_id = 999){$parent_id = null;}
+ $first_name = test_input($_POST['first_name']);
+ $last_name = test_input($_POST['last_name']);
+ $birth_name = test_input($_POST['birth_name']);
+ $day_of_birth = test_input($_POST['day_of_birth']);
+ $place_of_birth = test_input($_POST['place_of_birth']);
+ $day_of_death = test_input($_POST['day_of_death']);
+ $place_of_death = test_input($_POST['place_of_death']);
+ $remarks = test_input($_POST['remarks']);
+ $member_img = test_input($_POST['member_img']);
+
+ if ($_POST['submit'] == "update") {
+ $strSQL = "UPDATE gen_member SET
+ gender='".$gender."',
+ parent_id='".$parent_id."',
+ first_name='".$first_name."',
+ last_name='".$last_name."',
+ birth_name='".$birth_name."',
+ day_of_birth='".$day_of_birth."',
+ place_of_birth='".$place_of_birth."',
+ day_of_death='".$day_of_death."',
+ place_of_death='".$place_of_death."',
+ remarks='".$remarks."',
+ member_img='".$member_img."'
+ WHERE member_id='".$member_id."'";
+ }
+ if ($_POST['submit'] == "submit") {
+ $strSQL = "INSERT INTO gen_member
+ (gender, parent_id, first_name, last_name, birth_name,
+ day_of_birth, place_of_birth, day_of_death, place_of_death, remarks, member_img)
+ VALUES ('".$gender."','".$parent_id."','".$first_name."', '".$last_name."', '".$birth_name."',
+ '".$day_of_birth."', '".$place_of_birth."',
+ '".$day_of_death."', '".$place_of_death."', '".$remarks."', '".$member_img."')";
+ }
+ //echo $strSQL; die;
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+
+// Funktion setzt male.jpg oder female.jpf wenn kein Bild vorganden
+/*
+ public function insertPicture($member_id, $img) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "UPDATE gen_member SET
+ member_img='".$img."'
+ WHERE member_id='".$member_id."'";
+
+ echo $strSQL;
+ //die;
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+*/
+}
+
+ ?>
diff --git a/stb/src/Person/PersonRepository_alt.php b/stb/src/Person/PersonRepository_alt.php
new file mode 100755
index 0000000..5745809
--- /dev/null
+++ b/stb/src/Person/PersonRepository_alt.php
@@ -0,0 +1,83 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $member_id = test_input($_POST['member_id']);
+ $gender = test_input($_POST['gender']);
+ $parent_id = test_input($_POST['parent_id']);
+ //if ($parent_id = 999){$parent_id = null;}
+ $first_name = test_input($_POST['first_name']);
+ $last_name = test_input($_POST['last_name']);
+ $birth_name = test_input($_POST['birth_name']);
+ $day_of_birth = test_input($_POST['day_of_birth']);
+ $place_of_birth = test_input($_POST['place_of_birth']);
+ $day_of_death = test_input($_POST['day_of_death']);
+ $place_of_death = test_input($_POST['place_of_death']);
+ $remarks = test_input($_POST['remarks']);
+ $member_img = test_input($_POST['member_img']);
+
+ if ($_POST['submit'] == "update") {
+ $strSQL = "UPDATE gen_member SET
+ gender='".$gender."',
+ parent_id='".$parent_id."',
+ first_name='".$first_name."',
+ last_name='".$last_name."',
+ birth_name='".$birth_name."',
+ day_of_birth='".$day_of_birth."',
+ place_of_birth='".$place_of_birth."',
+ day_of_death='".$day_of_death."',
+ place_of_death='".$place_of_death."',
+ remarks='".$remarks."',
+ member_img='".$member_img."'
+ WHERE member_id='".$member_id."'";
+ }
+ if ($_POST['submit'] == "submit") {
+ $strSQL = "INSERT INTO gen_member
+ (gender, parent_id, first_name, last_name, birth_name,
+ day_of_birth, place_of_birth, day_of_death, place_of_death, remarks, member_img)
+ VALUES ('".$gender."','".$parent_id."','".$first_name."', '".$last_name."', '".$birth_name."',
+ '".$day_of_birth."', '".$place_of_birth."',
+ '".$day_of_death."', '".$place_of_death."', '".$remarks."', '".$member_img."')";
+ }
+ //echo $strSQL; die;
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+
+// Funktion setzt male.jpg oder female.jpf wenn kein Bild vorganden
+/*
+ public function insertPicture($member_id, $img) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "UPDATE gen_member SET
+ member_img='".$img."'
+ WHERE member_id='".$member_id."'";
+
+ echo $strSQL;
+ //die;
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+*/
+}
+
+ ?>
diff --git a/stb/src/Person/RemarkModel.php b/stb/src/Person/RemarkModel.php
new file mode 100755
index 0000000..c674792
--- /dev/null
+++ b/stb/src/Person/RemarkModel.php
@@ -0,0 +1,21 @@
+
diff --git a/stb/src/Person/RemarkRepository.php b/stb/src/Person/RemarkRepository.php
new file mode 100755
index 0000000..7b8b5a1
--- /dev/null
+++ b/stb/src/Person/RemarkRepository.php
@@ -0,0 +1,98 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $stmt = $this->pdo->prepare("SELECT * FROM `$table` WHERE member_id_f = :id"); // :id ist Platzhalter
+ $stmt->execute(['id' =>$id]);
+ $remarks = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $remarks;
+ }
+
+ public function every_remark(){
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $WHERE = " gen_member.member_id = gen_remark.member_id_f ";
+ $strSQL = "SELECT
+ gen_remark.rem_id,
+ gen_remark.rem_date,
+ gen_remark.rem_remark,
+ gen_remark.rem_erl,
+ gen_remark.member_id_f,
+ gen_member.member_id,
+ gen_member.first_name,
+ gen_member.last_name,
+ gen_member.gender
+ FROM gen_remark, gen_member
+ WHERE ".$WHERE." ORDER BY gen_member.last_name, gen_member.first_name";
+
+ // echo $strSQL; die;
+ $statement = $this->pdo->query($strSQL);
+ $remarks = $statement->fetchALL(PDO::FETCH_CLASS, $model);
+ return $remarks;
+ }
+
+ public function insertForRemark() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $member_id_f = test_input($_POST['member_id_f']);
+ $rem_date = test_input($_POST['rem_date']);
+ $rem_remark = test_input($_POST['content']);
+
+ if ($_POST['submit'] == "submit") {
+ $rem_erl = 0;
+ //var_dump($_POST); die();
+ $strSQL = "INSERT INTO gen_remark (member_id_f, rem_date, rem_remark, rem_erl)
+ VALUES ('".$member_id_f."', '".$rem_date."', '".$rem_remark."', '".$rem_erl."')";
+ }
+
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+
+ public function insertUpdateForRemark() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $member_id_f = test_input($_POST['member_id_f']);
+ $rem_date = test_input($_POST['rem_date']);
+ $rem_remark = test_input($_POST['rem_remark']);
+
+ if ($_POST['submit'] == "update") {
+ $rem_id = test_input($_POST['rem_id']);
+ $rem_erl = test_input($_POST['rem_erl']);
+ $strSQL = "UPDATE gen_remark
+ SET member_id_f='".$member_id_f."', rem_date='".$rem_date."', rem_remark='".$rem_remark."', rem_erl='".$rem_erl."'
+ WHERE rem_id ='".$rem_id."'";
+ }
+
+ if ($_POST['submit'] == "submit") {
+ $rem_erl = 0;
+ $strSQL = "INSERT INTO gen_remark (member_id_f, rem_date, rem_remark, rem_erl)
+ VALUES ('".$member_id_f."', '".$rem_date."', '".$rem_remark."', '".$rem_erl."')";
+ }
+
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+
+}
+
+ ?>
diff --git a/stb/src/Person/WohnorteModel.php b/stb/src/Person/WohnorteModel.php
new file mode 100755
index 0000000..4056736
--- /dev/null
+++ b/stb/src/Person/WohnorteModel.php
@@ -0,0 +1,21 @@
+
diff --git a/stb/src/Person/WohnorteRepository.php b/stb/src/Person/WohnorteRepository.php
new file mode 100755
index 0000000..02b1a2a
--- /dev/null
+++ b/stb/src/Person/WohnorteRepository.php
@@ -0,0 +1,68 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM gen_member
+ LEFT JOIN gen_wohnort ON gen_wohnort.adr_id_f = gen_member.member_id
+ LEFT JOIN gen_adresse ON gen_wohnort.adr_id_f = gen_adresse.adr_id
+ WHERE (gen_wohnort.member_id_f = $id) ORDER BY ort_von DESC";
+ $stmt = $this->pdo->query($strSQL);
+ $wohnorte = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $wohnorte;
+ }
+
+ public function allByMemberId($id) {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $strSQL = "SELECT * FROM `$table` WHERE (member_id_f = $id)
+ ORDER BY ort_von";
+ $stmt = $this->pdo->query($strSQL);
+ $orte = $stmt->fetchALL(PDO::FETCH_CLASS, $model);
+ return $orte;
+ }
+
+ public function insertForPlace() {
+ $table = $this->getTableName();
+ $model = $this->getModelName();
+
+ $ort_id = test_input($_POST['ort_id']);
+ $member_id_f = test_input($_POST['member_id_f']);
+ $adr_id_f = test_input($_POST['adr_id_f']);
+ $ort_von = test_input($_POST['ort_von']);
+ $ort_bis = test_input($_POST['ort_bis']);
+
+ if (test_input($_POST['submit']) == "submit") {
+
+ $strSQL = "INSERT INTO gen_wohnort (member_id_f, adr_id_f, ort_von, ort_bis)
+ VALUES ('".$member_id_f."', '".$adr_id_f."', '".$ort_von."', '".$ort_bis."')";
+ }
+ if (test_input($_POST['submit']) == "update") {
+ $strSQL = "UPDATE gen_wohnort
+ SET member_id_f='".$member_id_f."', adr_id_f='".$adr_id_f."', ort_von='".$ort_von."', ort_bis='".$ort_bis."'
+ WHERE ort_id ='".$ort_id."'";
+ }
+
+ $stmt = $this->pdo->prepare($strSQL);
+ $stmt->execute();
+ }
+
+}
+
+ ?>
diff --git a/stb/src/STB/Person.php b/stb/src/STB/Person.php
new file mode 100755
index 0000000..930eb2f
--- /dev/null
+++ b/stb/src/STB/Person.php
@@ -0,0 +1,18 @@
+user = new App\User\User();
+ //durch use User\User; kann einfach geschrieben werden
+ //$this->user = new User();
+ //durch use User\User as SomeUser kann eine neuer user aus der class User/user gebildet werden
+ $this->user = new SomeUser();
+ }
+}
+?>
diff --git a/stb/src/STB/Personinterface.php b/stb/src/STB/Personinterface.php
new file mode 100755
index 0000000..231630f
--- /dev/null
+++ b/stb/src/STB/Personinterface.php
@@ -0,0 +1,10 @@
+
diff --git a/stb/src/User/LoginController.php b/stb/src/User/LoginController.php
new file mode 100755
index 0000000..afb1556
--- /dev/null
+++ b/stb/src/User/LoginController.php
@@ -0,0 +1,62 @@
+loginService = $loginService;
+ }
+// public function index(){
+// $this->loginService->check();
+// $this->render("person/index", []);
+// }
+ public function homepages() {
+ //$this->loginService->check();
+ $this->render("user/homepages", []);
+ }
+
+ public function dashboard() {
+ $this->loginService->check();
+ $this->render("user/dashboard", []);
+ }
+
+ public function impressum() {
+ $this->loginService->impressum();
+ $this->render("user/impressum", []);
+ }
+
+ public function privat() {
+ $this->loginService->check();
+ $this->render("user/privat", []);
+ }
+
+ public function logout() {
+ $this->loginService->logout();
+ $this->render("user/logout", []);
+ //header("Location: homepages");
+ }
+
+ public function login() {
+ $error = false;
+ if (!empty($_POST['username']) And !empty($_POST['password'])) {
+ $username = $_POST['username'];
+ $password = $_POST['password'];
+
+ if ($this->loginService->attempt($username, $password)) {
+ $_SESSION['login'] = $username;
+ header ("Location: index");
+ //header ("Location: dashboard");
+ return;
+ } else {
+ $error = true;
+ }
+ }
+ $this->render("user/login", [
+ 'error' => $error // Übergabe an view
+ ]);
+ }
+}
+?>
diff --git a/stb/src/User/LoginService.php b/stb/src/User/LoginService.php
new file mode 100755
index 0000000..9faa4ca
--- /dev/null
+++ b/stb/src/User/LoginService.php
@@ -0,0 +1,55 @@
+usersRepository = $usersRepository; // LoginService hat jetzt Zugriff auf DB
+ }
+
+ public function check() {
+ if (isset($_SESSION['login'])) {
+ return true;
+ } else {
+ header("Location: login");
+ die(); // hier könnte auch eine exeption ausgeführt werden
+ }
+ }
+
+ // Returns true when the user is checked in, else false
+ function is_checked_in() {
+ return isset($_SESSION['login']);
+ }
+
+ public function attempt($username, $password) {
+ $user = $this->usersRepository->findByUserName($username); // user aus db
+ if(empty($user)) {
+ return false; // Nutzer nicht vorhanden
+ }
+ if (password_verify($password, $user->password )) { //echo ("Login erfolgreich!");
+ session_regenerate_id(true);
+ $_SESSION['login'] = $user->username;
+ $_SESSION['rechte'] = $user->rechte;
+ //var_dump ($_SESSION); die();
+ //session_regenerate_id(true);
+ //var_dump ($_SESSION); die();
+ return true; // Login erfolgreich
+ } else {
+ return false;
+ }
+ }
+
+ public function impressum() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+
+ public function logout() {
+ unset($_SESSION['login']);
+ session_regenerate_id(true); // nicht zwingend aber schadet nicht
+ }
+}
+
+?>
diff --git a/stb/src/User/UserModel.php b/stb/src/User/UserModel.php
new file mode 100755
index 0000000..defba7e
--- /dev/null
+++ b/stb/src/User/UserModel.php
@@ -0,0 +1,17 @@
+
diff --git a/stb/src/User/UsersRepository.php b/stb/src/User/UsersRepository.php
new file mode 100755
index 0000000..c349b79
--- /dev/null
+++ b/stb/src/User/UsersRepository.php
@@ -0,0 +1,32 @@
+getTableName();
+ $model = $this->getModelName();
+
+ $stmt = $this->pdo->prepare("SELECT * FROM `$table` WHERE username = :username");
+ $stmt->execute(['username' => $username]);
+ $stmt->setFetchMode(PDO::FETCH_CLASS, $model);
+ $user = $stmt->fetch(PDO::FETCH_CLASS);
+ return $user;
+ }
+}
+?>
diff --git a/stb/views/foto_nav.php b/stb/views/foto_nav.php
new file mode 100755
index 0000000..bd8bbbf
--- /dev/null
+++ b/stb/views/foto_nav.php
@@ -0,0 +1,53 @@
+
+
+
diff --git a/stb/views/inc/const.php b/stb/views/inc/const.php
new file mode 100755
index 0000000..2099235
--- /dev/null
+++ b/stb/views/inc/const.php
@@ -0,0 +1,52 @@
+";
+$tr1 = "";
+$tr2 = "
";
+$tr3 = "
";
+
+$td_leer = " | ";
+$td0 = "";
+$td1 = " | ";
+$td2 = " | ";
+$td3 = " | ";
+
+$bol_debug = true;
+
+date_default_timezone_set("Europe/Berlin");
+$timestamp = time();
+$tage = array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
+$tag = date("w");
+//echo $tage[$tag]
+
+$monatsnamen = array(
+ 1=>"Januar",
+ 2=>"Februar",
+ 3=>"März",
+ 4=>"April",
+ 5=>"Mai",
+ 6=>"Juni",
+ 7=>"Juli",
+ 8=>"August",
+ 9=>"September",
+ 10=>"Oktober",
+ 11=>"November",
+ 12=>"Dezember");
+$monat = date("n");
+$jahr = date("Y");
+//echo $monatsnamen[$monat];
+
+
+// ****************Zahlenreihen und Buchstaben in arrays schreiben **********
+// $zahlenreihe = range( 0, 100, 25 ); // = array( 0, 25, 50, 100 )
+// $alphabet = range( 'A', 'Z' );
+// $alphabet = range( chr( 65 ), chr( 90 ) );
+// $alphabet = array( 'alle', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' );
+// Mit einer foreach lassen sich die Buchstaben anschließend ausgeben:
+// foreach ($alphabet as $buchstabe){ echo $buchstabe;}
+
+// ∞ alt + Komma
+// † alt + T
+
+?>
diff --git a/stb/views/inc/function_display.inc.php b/stb/views/inc/function_display.inc.php
new file mode 100755
index 0000000..af0a53f
--- /dev/null
+++ b/stb/views/inc/function_display.inc.php
@@ -0,0 +1,133 @@
+
+
+  | "
+ .$link
+ .$row['member_id']."'>".$row['first_name']
+ ." ".$row['last_name']
+ ."  | ";
+ echo ""
+ .$row['birth_name']. "  |  "
+ .date_ged($row['day_of_birth']). " |  " .$row['place_of_birth']. " | ";
+ if ($row['day_of_death'] != 0){
+ echo " ".date_ged($row['day_of_death'])." |
";}
+ else { echo " ";}
+ }
+ } else {
+ echo $tr0 . "Keine Daten erfasst! | ";
+ }
+ }
+} ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/stb/views/js/hochschieben.js b/stb/views/js/hochschieben.js
new file mode 100755
index 0000000..694b19a
--- /dev/null
+++ b/stb/views/js/hochschieben.js
@@ -0,0 +1,17 @@
+
diff --git a/stb/views/js/popup.js b/stb/views/js/popup.js
new file mode 100755
index 0000000..f182d22
--- /dev/null
+++ b/stb/views/js/popup.js
@@ -0,0 +1,113 @@
+
+
diff --git a/stb/views/layout/css/baum.css b/stb/views/layout/css/baum.css
new file mode 100755
index 0000000..88b03b0
--- /dev/null
+++ b/stb/views/layout/css/baum.css
@@ -0,0 +1,160 @@
+
diff --git a/stb/views/layout/css/box_tafel.css b/stb/views/layout/css/box_tafel.css
new file mode 100755
index 0000000..2d4b4ad
--- /dev/null
+++ b/stb/views/layout/css/box_tafel.css
@@ -0,0 +1,142 @@
+
diff --git a/stb/views/layout/css/css_print.css b/stb/views/layout/css/css_print.css
new file mode 100755
index 0000000..7acf850
--- /dev/null
+++ b/stb/views/layout/css/css_print.css
@@ -0,0 +1,12 @@
+
diff --git a/stb/views/layout/css/css_screen.css b/stb/views/layout/css/css_screen.css
new file mode 100755
index 0000000..3abf204
--- /dev/null
+++ b/stb/views/layout/css/css_screen.css
@@ -0,0 +1,11 @@
+
diff --git a/stb/views/layout/css/default.css b/stb/views/layout/css/default.css
new file mode 100755
index 0000000..7e32d57
--- /dev/null
+++ b/stb/views/layout/css/default.css
@@ -0,0 +1,222 @@
+
+
diff --git a/stb/views/layout/css/main.css b/stb/views/layout/css/main.css
new file mode 100755
index 0000000..4fb9091
--- /dev/null
+++ b/stb/views/layout/css/main.css
@@ -0,0 +1,61 @@
+
diff --git a/stb/views/layout/css/navi.css b/stb/views/layout/css/navi.css
new file mode 100755
index 0000000..58b5908
--- /dev/null
+++ b/stb/views/layout/css/navi.css
@@ -0,0 +1,73 @@
+
diff --git a/stb/views/layout/css/style.css b/stb/views/layout/css/style.css
new file mode 100755
index 0000000..292f774
--- /dev/null
+++ b/stb/views/layout/css/style.css
@@ -0,0 +1,85 @@
+
diff --git a/stb/views/layout/favicon.ico b/stb/views/layout/favicon.ico
new file mode 100755
index 0000000..5f627bc
Binary files /dev/null and b/stb/views/layout/favicon.ico differ
diff --git a/stb/views/layout/footer.php b/stb/views/layout/footer.php
new file mode 100755
index 0000000..e5e3f7c
--- /dev/null
+++ b/stb/views/layout/footer.php
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+