Compare commits

...

633 Commits

Author SHA1 Message Date
niklas.ortmann b5fc79a2e7 Merge branch 'DatabaseUserManager' of https://git.gigaworld.ddns.net/niklas.ortmann/webprogrammierung into DatabaseUserManager 2026-06-10 20:19:16 +02:00
niklas.ortmann 24a3176f43 .idea 2026-06-10 20:19:11 +02:00
caroline.slt a5650f2720 Reviewanpassungen 2026-06-08 20:20:06 +02:00
caroline.slt 4758366063 Refactoring 2026-06-08 20:18:08 +02:00
caroline.slt e7a5c2b352 Kommentare ergänzt 2026-06-08 20:10:11 +02:00
caroline.slt 36ec2a539c LocalUserManager überall entfernt 2026-06-05 23:47:24 +02:00
caroline.slt 339e51cca7 Passwortabänderung 2026-06-05 23:42:06 +02:00
caroline.slt 0726ba214c Fehlerbehebung Passwort speichern 2026-06-05 23:25:49 +02:00
caroline.slt 0e032ae029 Fehlerbehebung Passwort speichern 2026-06-05 23:22:16 +02:00
caroline.slt b9dead1c8b Fehlerbehebung Passwort speichern 2026-06-05 23:18:35 +02:00
caroline.slt 9010b68a39 Richtig Einbinden 2026-06-05 23:10:36 +02:00
caroline.slt 252c14a377 Test 2026-06-05 22:56:28 +02:00
caroline.slt 4abfe801ec Test 2026-06-05 22:54:18 +02:00
caroline.slt c23a10eb6e Implement database-based user management 2026-06-05 22:34:12 +02:00
niklas.ortmann 11b55008ea Delete articles 2026-06-05 11:35:49 +02:00
niklas.ortmann 46dcc16c59 Update ArticleManager.php 2026-06-05 11:34:29 +02:00
niklas.ortmann d42dff1165 deleteArticle -> Autorisierungsprüfung 2026-06-05 11:27:43 +02:00
niklas.ortmann 11da418f60 Update DatabaseArticleManager.php 2026-06-05 11:22:38 +02:00
niklas.ortmann 981e78ff7e Update DatabaseArticleManager.php 2026-06-05 11:18:46 +02:00
niklas.ortmann c798bbd230 Update DatabaseArticleManager.php 2026-06-05 11:16:21 +02:00
niklas.ortmann e22d97e15a Update ArticleManager.php 2026-06-05 11:09:36 +02:00
niklas.ortmann c662369259 Create .htaccess 2026-06-05 10:58:39 +02:00
niklas.ortmann 11b7be4ca0 Umstellung auf DatabaseArticleManager 2026-06-05 10:47:03 +02:00
niklas.ortmann a029314bc9 Update ArticleManager.php 2026-06-05 10:46:21 +02:00
niklas.ortmann 8dd2d4f4ea Update ArticleManager.php 2026-06-05 10:45:50 +02:00
niklas.ortmann a4efbd4f0b Update ArticleManager.php 2026-06-05 10:45:25 +02:00
niklas.ortmann f63b8c6506 DatabaseUserManager 2026-06-05 10:43:07 +02:00
niklas.ortmann caa9a9ff8f Update DatabaseArticleManager.php 2026-06-05 10:22:30 +02:00
niklas.ortmann 524dc2a399 DataBaseArticleManager + Methoden
search-Methode muss noch implementiert werden...
2026-06-05 09:57:34 +02:00
niklas.ortmann 793d9632b2 refactoring 2026-06-04 19:02:15 +02:00
niklas.ortmann 5892a875c8 refactoring 2026-06-04 18:32:01 +02:00
niklas.ortmann b130bf9e19 Merge pull request 'Profilbearbeitung: Reviewnacharbeitung' (#22) from Profilbearbeitung into dev
Reviewed-on: #22
2026-06-03 22:25:42 +02:00
caroline.slt 1314362df9 Buttonfix 2026-06-03 21:32:14 +02:00
caroline.slt 5a1c032f1b Reviewnacharbeitung 2026-06-03 21:27:08 +02:00
caroline.slt fae4bc86ad Reviewnacharbeitung 2026-06-03 21:16:31 +02:00
caroline.slt 664092d52f Reviewnacharbeitung 2026-06-03 21:14:01 +02:00
caroline.slt 22b1dd827d Reviewnacharbeitung 2026-06-03 21:09:34 +02:00
caroline.slt 50df844e23 Reviewnacharbeitung 2026-06-03 21:05:32 +02:00
caroline.slt 45b6b41d60 Reviewnacharbeitung 2026-06-03 21:01:28 +02:00
caroline.slt a0a79e0191 Reviewnacharbeitung 2026-06-03 20:58:26 +02:00
niklas.ortmann 46def40a14 statische Beiträge löschen 2026-06-03 20:23:10 +02:00
niklas.ortmann a76113dcaf Merge branch 'dev' of https://git.gigaworld.ddns.net/niklas.ortmann/webprogrammierung into dev 2026-06-03 20:21:46 +02:00
niklas.ortmann f56a04c3ab css 2026-06-03 20:21:28 +02:00
niklas.ortmann 7f891b6ebf Merge pull request 'Kategorien nicht statisch sondern dynamisch' (#20) from dynamicCategories into dev
Reviewed-on: #20
2026-06-03 20:15:16 +02:00
niklas.ortmann 1343496a12 Merge pull request 'Vor und Nachname separat speichern sowie Profilbearbeitung' (#18) from Profilbearbeitung into dev
Reviewed-on: #18
2026-06-03 20:13:03 +02:00
niklas.ortmann 1735dd28a2 Update README.md 2026-06-03 20:12:14 +02:00
caroline.slt bfc9ee4d01 Reviewnacharbeitung 2026-06-03 20:07:57 +02:00
niklas.ortmann 9321d09489 Update home.php 2026-06-03 20:00:33 +02:00
niklas.ortmann 7269ea03db Update showCategory-controller.php 2026-06-03 19:58:09 +02:00
niklas.ortmann 2a3a15c92d Update showCategory.php 2026-06-03 19:58:05 +02:00
niklas.ortmann a7f1729e6e Update ArticleManager.php 2026-06-03 19:56:12 +02:00
niklas.ortmann cdccb0bfe8 debugging 2026-06-03 19:51:58 +02:00
niklas.ortmann 48501a9069 Update ArticleManager.php 2026-06-03 19:51:06 +02:00
niklas.ortmann a175765e33 Update main.css 2026-06-03 19:49:45 +02:00
niklas.ortmann 3d57c2e482 Update 404.php 2026-06-03 19:46:25 +02:00
niklas.ortmann bac4334fb8 Update showCategory-controller.php 2026-06-03 19:44:47 +02:00
niklas.ortmann aa3e7c2f36 Update showCategory.php 2026-06-03 19:43:41 +02:00
niklas.ortmann 46cd524f70 Update showCategory-controller.php 2026-06-03 19:43:40 +02:00
niklas.ortmann 86fb37abc4 Update showCategory-controller.php 2026-06-03 19:39:48 +02:00
niklas.ortmann 9349b91926 Update showCategory.php 2026-06-03 19:39:46 +02:00
niklas.ortmann b9c86e2074 Update showCategory-controller.php 2026-06-03 19:37:36 +02:00
niklas.ortmann 68672474e4 Update showCategory-controller.php 2026-06-03 19:36:49 +02:00
niklas.ortmann a08197cc10 Update showCategory-controller.php 2026-06-03 19:36:22 +02:00
niklas.ortmann e28620d9fb debugging 2026-06-03 19:35:13 +02:00
niklas.ortmann ded98ed757 Update LocalArticleManager.php 2026-06-03 19:34:51 +02:00
niklas.ortmann 18fe69cbcd Update showCategory-controller.php 2026-06-03 19:34:48 +02:00
niklas.ortmann e35d07ebc3 Update LocalArticleManager.php 2026-06-03 19:33:02 +02:00
niklas.ortmann e772a8b57f Kategorien nicht statisch sondern dynamisch 2026-06-03 19:29:29 +02:00
niklas.ortmann 9c3ebc9877 Merge pull request 'WIP Suche implementiert, sowie Sortieren der Ergebnisse' (#19) from ImplementedSearch into dev
Reviewed-on: #19
2026-06-03 16:07:41 +02:00
rirat-0 3d13c3b8c8 Design Anpassung der search in navbar 2026-06-03 07:59:39 +02:00
rirat-0 6c3e788f13 Limitation der eingabefelder auf 50 zeichen 2026-06-03 03:03:37 +02:00
rirat-0 aceac0bf8b aufraeumen 7 2026-06-03 02:52:22 +02:00
rirat-0 78d04f1715 aufraeumen 6 2026-06-03 02:48:11 +02:00
rirat-0 1d773ea4e6 Funktionalitaet der sortierung 2026-06-03 02:44:59 +02:00
rirat-0 a595567db1 funktionale suche der sidebox 2026-06-03 02:39:03 +02:00
rirat-0 945d3e1c1f aufraeumen 5 2026-06-03 02:28:45 +02:00
rirat-0 d58ea953af aufraeumen 4 2026-06-03 02:02:54 +02:00
rirat-0 b9475a045f aufraeumen 3 2026-06-03 01:58:02 +02:00
rirat-0 32c2a1a3d8 aufraeumen 2 2026-06-03 01:56:57 +02:00
rirat-0 fc93f2b3f0 aufraeumen 2026-06-03 01:55:33 +02:00
rirat-0 f33778f97a fehlersuche 12 2026-06-03 01:51:26 +02:00
rirat-0 1c72a03f26 fehlersuche 11 2026-06-03 01:48:00 +02:00
rirat-0 3dcbdbf23c fehlersuche 10 2026-06-03 01:45:04 +02:00
rirat-0 8143d501fa fehlersuche 9 2026-06-03 01:42:09 +02:00
rirat-0 3471eedf4a fehlersuche 8 2026-06-03 01:17:38 +02:00
rirat-0 b6a3dad2ab fehlersuche 7 2026-06-03 01:08:14 +02:00
rirat-0 375e6d9625 fehlersuche 6 2026-06-03 00:45:57 +02:00
rirat-0 4d144ec704 fehlersuche 5 2026-06-03 00:44:57 +02:00
caroline.slt 92574a0f76 Profildaten bearbeiten 2026-06-02 22:42:47 +02:00
caroline.slt ade73f3105 Vor und Nachname separat speichern 2026-06-02 22:10:15 +02:00
caroline.slt ee75620cd8 Vor und Nachname separat speichern 2026-06-02 22:01:38 +02:00
caroline.slt 94486e2b0a Vor und Nachname separat speichern 2026-06-02 21:56:52 +02:00
NOrtmann1 a26e985edf Update README.md 2026-06-02 18:32:57 +02:00
NOrtmann1 cf9ac795eb Readme + Kommentare 2026-06-02 18:20:35 +02:00
rirat-0 370c047c16 fehlersuche 4 2026-06-02 18:06:45 +02:00
rirat-0 a562a67923 fehlersuche 3 2026-06-02 18:02:40 +02:00
rirat-0 078dbd8901 fehlersuche 2 2026-06-02 18:01:14 +02:00
rirat-0 64d624a6df fehlersuche 1 2026-06-02 18:00:01 +02:00
rirat-0 90ab57e4cb Mehrere anpassungen, damit ergebnisse angezeigt werden 2026-06-02 17:53:04 +02:00
rirat-0 a00ddf18e6 update der pfade 2026-06-02 17:19:03 +02:00
rirat-0 5048dc2466 weitere anpassungen der such funktion 2026-06-02 17:16:57 +02:00
rirat-0 7209fe3e20 article.php wird nun genutzt im search results controller 2026-06-02 17:14:45 +02:00
rirat-0 4e35e67ef1 anpassung von der search function 2026-06-02 17:06:41 +02:00
rirat-0 830b57d245 anpassung der such funktion 2026-06-02 17:03:06 +02:00
rirat-0 06930644a6 Implementierung von neuem such algorithmus und entsprechenden anpassungen in anderen dateien 2026-06-02 16:58:12 +02:00
niklas.ortmann a519387773 Update updateArticle-controller.php 2026-06-02 15:45:34 +02:00
niklas.ortmann ed40596389 Update createArticle.css 2026-06-02 15:43:37 +02:00
niklas.ortmann 4c855c05ed css 2026-06-02 15:42:07 +02:00
niklas.ortmann e7189245d5 css 2026-06-02 15:37:35 +02:00
niklas.ortmann 709a4ba83c commenting 2026-06-02 15:34:19 +02:00
niklas.ortmann fb54ba2462 updateArticle-Exceptions 2026-06-02 15:31:02 +02:00
niklas.ortmann c6b55030cf updateArticle - Exeptions 2026-06-02 15:22:18 +02:00
niklas.ortmann af04557f58 Update updateArticle-controller.php 2026-06-02 15:04:52 +02:00
niklas.ortmann 2c100bddf2 Update updateArticle-controller.php 2026-06-02 15:04:05 +02:00
niklas.ortmann 8e3642c668 Merge branch 'dev' into ImplementedSearch 2026-06-02 14:48:37 +02:00
rirat-0 87d78b749b Finale Aktualisierung 2026-06-02 14:09:06 +02:00
rirat-0 604dbeca93 Aktualisierung 2026-06-02 14:07:33 +02:00
rirat-0 8e9e7d65d0 noch mehr debugging 2026-06-02 13:59:21 +02:00
rirat-0 e2c317e507 mehr debugging 2026-06-02 13:57:30 +02:00
rirat-0 5a7fa35465 test mit absoluten pfaden 2026-06-02 13:55:58 +02:00
rirat-0 2601a1c1ca naechster debugging versuch 2026-06-02 13:54:04 +02:00
rirat-0 0e26679f24 anpassung beider article manager 2026-06-02 13:48:51 +02:00
rirat-0 d5ab659217 anpassung von article managerdao 2026-06-02 13:44:37 +02:00
rirat-0 2d5919d572 alte aenderung reverted 2026-06-02 13:41:51 +02:00
rirat-0 f56a074a3c search results controller wird ueber die results seite geladen 2026-06-02 13:38:19 +02:00
rirat-0 24dc432f01 entfernung mancher aenderungen 2026-06-02 13:26:11 +02:00
rirat-0 016193de07 weitere anpassung von index.php 2026-06-02 13:24:17 +02:00
rirat-0 f04d8fecd3 Anpassung der index.php damit der richtige controller geladen wird 2026-06-02 13:20:54 +02:00
rirat-0 36276c7c88 debug versuch nr.5 2026-06-02 13:16:53 +02:00
rirat-0 4a2cf0b55b 4. versuch 2026-06-02 13:14:04 +02:00
rirat-0 400436a73f 3. versuch die homepage zu reparieren 2026-06-02 13:13:02 +02:00
rirat-0 4c378dfba6 2. versuch das problem der homepage zu loesen 2026-06-02 13:08:17 +02:00
rirat-0 c3a9de71f4 1. versuch, das problem der homepage zu beheben 2026-06-02 13:06:29 +02:00
rirat-0 ecf2e9ef57 Update von ArticleManagerDAO, damit die search Methode auch genutzt werden kann 2026-06-02 13:00:21 +02:00
rirat-0 45ac70eba2 Weitere Anpassung der search.php 2026-06-02 12:54:15 +02:00
rirat-0 3b66c6aa3a aenderung des such formulars um korrekte action zu nutzen 2026-06-02 12:49:24 +02:00
rirat-0 e37b882481 anpassung von controllern und results
search function implementiert, search controller entsprechend angepasst und die results seite angepasst
2026-06-02 12:43:59 +02:00
niklas.ortmann 5c7a47e002 Update updateArticle.php 2026-06-02 00:21:17 +02:00
niklas.ortmann bbaa73dc1a Update createArticle.php 2026-06-02 00:20:31 +02:00
niklas.ortmann 9f5806f019 Update profile-controller.php 2026-06-02 00:20:02 +02:00
niklas.ortmann 6de86c3143 $_SESSION["user_email"] 2026-06-02 00:16:53 +02:00
niklas.ortmann c9c0de6c3c Update createArticle-controller.php 2026-06-02 00:14:25 +02:00
niklas.ortmann 4f827ed3a8 Update createArticle-controller.php 2026-06-02 00:13:37 +02:00
niklas.ortmann aedac79743 Update createArticle.php 2026-06-02 00:12:53 +02:00
niklas.ortmann 84a39bf0d4 Update createArticle-controller.php 2026-06-02 00:12:51 +02:00
niklas.ortmann 75c6d099f5 debugging 2026-06-02 00:09:33 +02:00
niklas.ortmann 319957c01e Update createArticle.php 2026-06-02 00:08:47 +02:00
niklas.ortmann 26dc33ea2f Update createArticle-controller.php 2026-06-02 00:05:50 +02:00
niklas.ortmann 7597eddd7c Update createArticle.php 2026-06-02 00:05:19 +02:00
niklas.ortmann 0441b4e56f Update createArticle-controller.php 2026-06-02 00:04:32 +02:00
niklas.ortmann cbff21136c Update createArticle.php 2026-06-02 00:03:28 +02:00
niklas.ortmann 03f0d19b01 Update createArticle-controller.php 2026-06-02 00:02:14 +02:00
niklas.ortmann ca65c6c6e1 Update createArticle-controller.php 2026-06-02 00:01:20 +02:00
niklas.ortmann 2b095f16bf Update createArticle.php 2026-06-01 23:58:35 +02:00
niklas.ortmann 930bf99fa1 Update index.php 2026-06-01 23:56:44 +02:00
niklas.ortmann 366527e8e9 Update index.php 2026-06-01 23:54:38 +02:00
niklas.ortmann 4e06240307 Update index.php 2026-06-01 23:54:05 +02:00
niklas.ortmann 38608a5278 Update index.php 2026-06-01 23:51:52 +02:00
niklas.ortmann b19f30cca4 debugging 2026-06-01 23:51:13 +02:00
niklas.ortmann b206e809ac debugging 2026-06-01 23:44:36 +02:00
niklas.ortmann e88f741fa7 debugging 2026-06-01 23:42:56 +02:00
niklas.ortmann 6958e71bfb Update createArticle.php 2026-06-01 23:36:13 +02:00
niklas.ortmann c6ad0b2a59 debugging 2026-06-01 23:35:19 +02:00
niklas.ortmann da9ea4f413 Update createArticle-controller.php 2026-06-01 23:33:20 +02:00
niklas.ortmann 5703c0a6dd Update createArticle-controller.php 2026-06-01 23:31:47 +02:00
niklas.ortmann b70943dd35 Update profile-controller.php 2026-06-01 23:30:37 +02:00
niklas.ortmann 0f7099be81 debgging 2026-06-01 23:29:01 +02:00
niklas.ortmann 9cbc1637b4 merging 2026-06-01 23:26:31 +02:00
niklas.ortmann d01be7d84c Update profile-controller.php 2026-06-01 23:18:52 +02:00
niklas.ortmann 28511e0cc4 debugging 2026-06-01 23:15:48 +02:00
niklas.ortmann 3774a2caee merging 2026-06-01 23:14:25 +02:00
niklas.ortmann 70277d3712 Merge branch 'Beitrag-bearbeiten' into dev 2026-06-01 23:14:14 +02:00
niklas.ortmann 18cb092d06 Navbar: neue responisve Größen durch mehr Buttons 2026-06-01 23:03:48 +02:00
niklas.ortmann 417f34e35f Merge branch 'Registrierung' into dev 2026-06-01 23:00:11 +02:00
niklas.ortmann c62ff5b2c0 refactoring 2026-06-01 22:53:28 +02:00
niklas.ortmann ad422a134d refactoring 2026-06-01 22:52:42 +02:00
niklas.ortmann 9fce9ec8dd refactoring 2026-06-01 22:51:46 +02:00
niklas.ortmann a329137de2 refactoring 2026-06-01 22:48:39 +02:00
rirat-0 b328c2613c search.php form erstellt 2026-06-01 21:04:37 +02:00
niklas.ortmann 62a7b6773c Merge pull request 'Eingabevalidierung' (#16) from Beitrag-Eingabevalidierung into Beitrag-bearbeiten
Reviewed-on: #16
2026-06-01 14:05:28 +02:00
niklas.ortmann 625dd35b9e Update createArticle-controller.php 2026-06-01 14:02:31 +02:00
niklas.ortmann f99b7bc8ab Update updateArticle-controller.php 2026-06-01 14:02:11 +02:00
niklas.ortmann e779162ec2 Update createArticle-controller.php 2026-06-01 13:57:53 +02:00
niklas.ortmann 17345345b5 Update updateArticle-controller.php 2026-06-01 13:54:04 +02:00
niklas.ortmann 3df526d5b5 Update article-validator.php 2026-06-01 13:54:02 +02:00
niklas.ortmann d5f30176c4 article-validator.php 2026-06-01 13:41:22 +02:00
niklas.ortmann 308e5af6ff tags-> bis 50 Zeichen 2026-06-01 12:51:17 +02:00
niklas.ortmann 268fe6a6b9 Update updateArticle.php 2026-06-01 12:49:45 +02:00
niklas.ortmann a24914126f Update updateArticle-controller.php 2026-06-01 12:46:51 +02:00
niklas.ortmann 1ca27bc072 Update updateArticle.php 2026-06-01 12:43:11 +02:00
niklas.ortmann c96d93c2ce Update updateArticle-controller.php 2026-06-01 12:42:00 +02:00
niklas.ortmann cd38af22db Update updateArticle.php 2026-06-01 12:33:13 +02:00
niklas.ortmann c440c25e41 Update updateArticle.php 2026-06-01 12:30:50 +02:00
niklas.ortmann e105ab61b7 Update showArticle-controller.php 2026-06-01 12:24:59 +02:00
niklas.ortmann 10b058afa0 Update path.php 2026-06-01 12:22:14 +02:00
niklas.ortmann d18f33a87a Update showArticle-controller.php 2026-06-01 12:17:11 +02:00
niklas.ortmann 62190fa821 Update showArticle.php 2026-06-01 12:17:10 +02:00
niklas.ortmann a6210c9d6e Update showArticle-controller.php 2026-06-01 12:13:03 +02:00
niklas.ortmann fdece531af Update showArticle-controller.php 2026-06-01 12:09:44 +02:00
niklas.ortmann 8073235466 Update showArticle-controller.php 2026-06-01 12:07:26 +02:00
niklas.ortmann 7dc3c3b988 Update showArticle-controller.php 2026-06-01 12:06:32 +02:00
niklas.ortmann 21793dffd7 Update showArticle-controller.php 2026-06-01 12:03:40 +02:00
niklas.ortmann ca337c4fac debugging 2026-06-01 12:03:22 +02:00
niklas.ortmann 76beb8d62e Update showArticle-controller.php 2026-06-01 12:02:40 +02:00
niklas.ortmann c5bfd02f09 Update showArticle-controller.php 2026-06-01 12:02:21 +02:00
niklas.ortmann 9f4ca058bd Update showArticle-controller.php 2026-06-01 11:52:16 +02:00
niklas.ortmann 603c208ae4 Update showArticle-controller.php 2026-06-01 11:50:59 +02:00
niklas.ortmann 754777d69e Update showArticle-controller.php 2026-06-01 11:49:36 +02:00
niklas.ortmann 829a0e49d8 Content: zwischen 10 und 7000 Zeichen 2026-06-01 11:42:51 +02:00
niklas.ortmann f12babf2b1 Update createArticle.php 2026-06-01 11:35:25 +02:00
niklas.ortmann d6249169c6 Update createArticle.php 2026-06-01 11:31:25 +02:00
niklas.ortmann 6aa1cd9a63 Update createArticle-controller.php 2026-06-01 11:30:07 +02:00
niklas.ortmann 09795c30dd debugging 2026-06-01 11:19:01 +02:00
niklas.ortmann 59268dc102 Eingaben gehen bei Fehlermeldungen nicht verloren 2026-06-01 11:14:59 +02:00
niklas.ortmann 979378d142 Update createArticle-controller.php 2026-06-01 11:06:33 +02:00
niklas.ortmann 6ce7f0ef22 createArticle-Eingabevalidierung 2026-06-01 11:02:20 +02:00
niklas.ortmann 71a8dd5f17 updateArticle funktioniert 2026-06-01 09:41:34 +02:00
niklas.ortmann e86fef1766 Update updateArticle-controller.php 2026-06-01 09:36:31 +02:00
niklas.ortmann 3cb63f791a Update updateArticle.php 2026-06-01 09:36:28 +02:00
niklas.ortmann f96415bfe6 Update showArticle.php 2026-06-01 09:36:23 +02:00
niklas.ortmann 365f70af98 Update updateArticle.php 2026-06-01 09:29:06 +02:00
niklas.ortmann c1ddbfdf48 Update updateArticle.php 2026-06-01 09:28:29 +02:00
niklas.ortmann e575e3dfa8 Update updateArticle-controller.php 2026-06-01 09:25:22 +02:00
niklas.ortmann 560f53cfb6 Update updateArticle-controller.php 2026-06-01 09:24:51 +02:00
niklas.ortmann d8c350c20f Update showArticle-controller.php 2026-06-01 09:19:28 +02:00
niklas.ortmann 5b718f24ed Update updateArticle-controller.php 2026-06-01 09:17:00 +02:00
niklas.ortmann 6634bee77b Update home.php 2026-06-01 09:16:58 +02:00
niklas.ortmann 2a3e73d409 updateArticle 2026-06-01 09:11:11 +02:00
caroline.slt 21bdb0d66d Weitere Reviewänderungen 2026-05-31 22:53:58 +02:00
caroline.slt 5db4ad3e63 Weitere Reviewänderungen 2026-05-31 22:49:13 +02:00
caroline.slt 2ce13cef72 Weitere Reviewänderungen 2026-05-31 22:42:16 +02:00
caroline.slt 02551049e0 Weitere Reviewänderungen 2026-05-31 22:38:29 +02:00
caroline.slt 55e9fa6a20 Weitere Reviewänderungen 2026-05-31 22:34:11 +02:00
caroline.slt c82378baa8 Weitere Reviewänderungen 2026-05-31 22:26:39 +02:00
caroline.slt 541d5b4c5e Weitere Reviewänderungen 2026-05-31 22:21:50 +02:00
caroline.slt f9ab3f8db2 session start entfernt 2026-05-31 21:53:30 +02:00
caroline.slt 6c5047be30 Review Changes 2026-05-31 21:42:46 +02:00
caroline.slt 25f6d2bf4a Review Changes 2026-05-31 21:35:54 +02:00
NOrtmann1 2cd68873de Update updateArticle.php 2026-05-29 17:50:11 +01:00
NOrtmann1 d987ca271f Update updateArticle.php 2026-05-29 17:48:05 +01:00
NOrtmann1 0a37dd4b8b Update showArticle-controller.php 2026-05-29 17:45:04 +01:00
NOrtmann1 b4ca25db3d Update showArticle-controller.php 2026-05-29 17:44:30 +01:00
NOrtmann1 738b36c406 Update updateArticle-controller.php 2026-05-29 17:43:05 +01:00
NOrtmann1 c785363384 missing_id 2026-05-29 17:40:56 +01:00
NOrtmann1 32cb8a9d9e updateArticle Anpassungen 2026-05-29 17:36:29 +01:00
NOrtmann1 29e23a8d3b Update updateArticle.php 2026-05-29 17:32:57 +01:00
NOrtmann1 1a6403963a Update updateArticle.php 2026-05-29 17:29:26 +01:00
NOrtmann1 e096774233 Update updateArticle-controller.php 2026-05-29 17:29:24 +01:00
NOrtmann1 222759a1bc Update updateArticle.php 2026-05-29 18:21:46 +02:00
NOrtmann1 7a3043f644 Update profile.php 2026-05-29 18:20:27 +02:00
NOrtmann1 f1986bc3f7 Update LocalArticleManager.php 2026-05-29 18:18:31 +02:00
NOrtmann1 75d2f17a3f Update updateArticle-controller.php 2026-05-29 18:18:26 +02:00
NOrtmann1 317f4c0ce9 ArticleManager fehlende Implementationen 2026-05-29 18:13:06 +02:00
NOrtmann1 4a7bfa9567 Update profileArticles-controller.php 2026-05-29 17:37:48 +02:00
NOrtmann1 fec3cbb550 Update profile.php 2026-05-29 17:36:46 +02:00
NOrtmann1 497ce5bdb4 Update profile.php 2026-05-29 17:33:45 +02:00
NOrtmann1 53b593b380 Update profile.php 2026-05-29 17:32:51 +02:00
NOrtmann1 2d03b1f051 Update profile.php 2026-05-29 17:31:00 +02:00
NOrtmann1 d3c190096a Update profile.php 2026-05-29 17:30:09 +02:00
NOrtmann1 2998a7bf22 testing 2026-05-29 17:28:38 +02:00
NOrtmann1 43bd452a30 Update profile.php 2026-05-29 17:26:46 +02:00
NOrtmann1 dfdcc99111 Update profile.php 2026-05-29 17:23:30 +02:00
NOrtmann1 ea409dae07 Update LocalArticleManager.php 2026-05-29 17:20:07 +02:00
NOrtmann1 2810bfdce2 Update profile.php 2026-05-29 17:15:00 +02:00
NOrtmann1 ff23e6c9a2 profileArticle-controller.php Implementierung 2026-05-29 17:00:32 +02:00
niklas.ortmann 88c369de32 profile.php dynamisch Beiträge anzeigen (unvollständig 2026-05-29 16:00:31 +02:00
niklas.ortmann 52a34cd9b4 Update profile.css 2026-05-29 15:45:13 +02:00
niklas.ortmann 46eb99b534 Update profile.php 2026-05-29 15:44:14 +02:00
niklas.ortmann 0eba5f875a Update profile.php 2026-05-29 15:43:31 +02:00
niklas.ortmann b93692c160 css 2026-05-29 15:42:55 +02:00
niklas.ortmann 00f9f9cd91 Update main.css 2026-05-29 15:39:32 +02:00
niklas.ortmann 2c0d52a3d5 Update main.css 2026-05-29 15:38:57 +02:00
niklas.ortmann 4a67932002 debugging 2026-05-29 15:37:01 +02:00
niklas.ortmann 339e3025b8 debugging 2026-05-29 15:36:38 +02:00
niklas.ortmann 4d88605192 Update profile.css 2026-05-29 15:35:50 +02:00
niklas.ortmann bd3d81e80c css 2026-05-29 15:35:01 +02:00
niklas.ortmann 98683197e0 Update profile.css 2026-05-29 15:33:00 +02:00
niklas.ortmann 2ded6300ab Update profile.css 2026-05-29 15:31:47 +02:00
niklas.ortmann 79efee0979 css 2026-05-29 15:29:38 +02:00
niklas.ortmann 9db31d4b8c testing 2026-05-29 15:25:51 +02:00
niklas.ortmann d7c7ef1041 Update main.css 2026-05-29 15:24:34 +02:00
niklas.ortmann 483dd4182e css 2026-05-29 15:23:09 +02:00
niklas.ortmann f63a2be01a Update main.css 2026-05-29 15:21:54 +02:00
niklas.ortmann 838b13e39f css 2026-05-29 15:19:51 +02:00
niklas.ortmann 7b4abe32a7 Update profile.css 2026-05-29 15:18:13 +02:00
niklas.ortmann 26889a8b59 Update profile.css 2026-05-29 15:17:14 +02:00
niklas.ortmann 60302e02b6 Update profile.css 2026-05-29 15:15:15 +02:00
niklas.ortmann 72023a6634 testing 2026-05-29 15:14:28 +02:00
niklas.ortmann dd1194a1c7 Update index.php 2026-05-29 15:13:29 +02:00
niklas.ortmann d5fbfc950f Update profile.css 2026-05-29 15:12:47 +02:00
niklas.ortmann d4fa588c8f refactoring 2026-05-29 15:11:40 +02:00
niklas.ortmann 2a5ff14cb5 profile.php mit Nutzerbeiträgen + css 2026-05-29 15:09:45 +02:00
niklas.ortmann df17478d72 Update navbar.css 2026-05-29 13:33:19 +02:00
niklas.ortmann 38fba55798 Update navbar.css 2026-05-29 13:32:38 +02:00
niklas.ortmann 5b3e7bf426 Update createArticle.css 2026-05-29 13:31:10 +02:00
niklas.ortmann cb07a4c80f Update createArticle.php 2026-05-29 13:29:08 +02:00
niklas.ortmann 85512e61a2 Merge branch 'suchseite' into dev
# Conflicts:
#	index.php
2026-05-29 13:25:03 +02:00
niklas.ortmann 380736ce26 Merge pull request 'Beitrag erstellen' (#13) from Beitrag-erstellen into dev
Reviewed-on: #13
2026-05-29 13:22:11 +02:00
niklas.ortmann 9eb6feb589 Update createArticle-controller.php 2026-05-29 13:19:49 +02:00
niklas.ortmann 23eee02208 debugging 2026-05-29 13:19:00 +02:00
niklas.ortmann ca4dfd03e4 debugging 2026-05-29 13:16:41 +02:00
niklas.ortmann 5c613a82c0 debugging 2026-05-29 13:15:05 +02:00
niklas.ortmann 34ffad38a6 testing 2026-05-29 13:11:58 +02:00
niklas.ortmann b131523bf3 refactoring 2026-05-29 13:10:05 +02:00
niklas.ortmann db2bd7e195 testing 2026-05-29 13:09:20 +02:00
niklas.ortmann 51ccad038d Update ArticleManagerDAO.php 2026-05-29 13:06:55 +02:00
niklas.ortmann 18810dcfe2 refactoring 2026-05-29 13:05:28 +02:00
niklas.ortmann ed1815b78e Update LocalArticleManager.php 2026-05-29 13:04:59 +02:00
niklas.ortmann 246a2a856c Update ArticleManagerDAO.php 2026-05-29 13:03:19 +02:00
niklas.ortmann 77b3916985 Update ArticleManagerDAO.php 2026-05-29 13:02:09 +02:00
niklas.ortmann 298a9b406a Update showArticle.php 2026-05-29 12:14:15 +02:00
niklas.ortmann e5d6291aac Update showArticle.php 2026-05-29 12:13:50 +02:00
niklas.ortmann 667d009cf8 Update showArticle.php 2026-05-29 12:13:27 +02:00
niklas.ortmann 3edc689e5f home-controller.php 2026-05-29 12:09:04 +02:00
niklas.ortmann 938cca55fe showArticle.css 2026-05-29 12:02:21 +02:00
niklas.ortmann d5e177654f refactoring 2026-05-29 11:58:12 +02:00
niklas.ortmann 59bbbc6bf4 Update home.php 2026-05-29 11:52:31 +02:00
niklas.ortmann ec814c9026 Update ArticleManager.php 2026-05-29 11:51:09 +02:00
niklas.ortmann b390437790 Update ArticleManager.php 2026-05-29 11:50:05 +02:00
niklas.ortmann d08e56bb5a Update ArticleManager.php 2026-05-29 11:49:45 +02:00
niklas.ortmann ccff6ab4cb Update ArticleManager.php 2026-05-29 11:49:25 +02:00
niklas.ortmann 04c1cb00c5 Dummy-Beitrage werden in ArticleManager beim Instanziieren gesetzt. 2026-05-29 11:43:53 +02:00
niklas.ortmann 1f2be8b8ee Update showArticle-controller.php 2026-05-29 11:41:46 +02:00
niklas.ortmann f2c0b4e4b5 Update showArticle-controller.php 2026-05-29 11:39:25 +02:00
niklas.ortmann 77fd9af112 Update showArticle-controller.php 2026-05-29 11:39:04 +02:00
niklas.ortmann 7ea3ce66ce Update showArticle.php 2026-05-29 11:37:27 +02:00
niklas.ortmann a91869bf47 Update showArticle.php 2026-05-29 11:37:12 +02:00
niklas.ortmann 9ae1cd4c34 debugging 2026-05-29 11:36:39 +02:00
niklas.ortmann 475fb00001 Update showArticle-controller.php 2026-05-29 11:36:12 +02:00
niklas.ortmann 168cf68a70 debugging 2026-05-29 11:34:43 +02:00
niklas.ortmann 36d4ac0681 Update index.php 2026-05-29 11:34:11 +02:00
niklas.ortmann 1afc7b480a Update home.php 2026-05-29 11:33:26 +02:00
niklas.ortmann b88046e228 Update home.php 2026-05-29 11:32:01 +02:00
niklas.ortmann 4f00859d1b debugging 2026-05-29 11:31:21 +02:00
niklas.ortmann 1b68f037ae showArticle.php + showArticle-controller.php Implementation 2026-05-29 11:29:52 +02:00
niklas.ortmann 7067303758 Update index.php 2026-05-29 11:09:04 +02:00
niklas.ortmann e499ffba22 "Beitrag erstellt"-Nachricht von index-php nach home.php 2026-05-29 11:08:00 +02:00
niklas.ortmann c4e7ca3ac2 Update LocalArticleManager.php 2026-05-29 11:05:57 +02:00
niklas.ortmann 55367963fb Update home.php 2026-05-29 11:05:27 +02:00
niklas.ortmann 5522f4fc04 Update LocalArticleManager.php 2026-05-29 11:03:38 +02:00
niklas.ortmann 332507d433 debugging 2026-05-29 11:01:55 +02:00
niklas.ortmann fe703d4e89 Update home.php 2026-05-29 10:58:06 +02:00
niklas.ortmann ef6d6d9a91 debugging 2026-05-29 10:54:21 +02:00
niklas.ortmann 128b191af5 Update LocalArticleManager.php 2026-05-29 10:53:07 +02:00
niklas.ortmann 5612bfe0b7 debugging 2026-05-29 10:46:12 +02:00
niklas.ortmann d0f9a97394 Update home.php 2026-05-29 10:35:06 +02:00
niklas.ortmann 67ecf6e870 Update home.php 2026-05-29 10:33:26 +02:00
niklas.ortmann fd27577407 Update home.php 2026-05-29 10:33:08 +02:00
niklas.ortmann 83ccf84da3 Update Article.php 2026-05-29 10:32:43 +02:00
niklas.ortmann 968534d28e Update home.php 2026-05-29 10:30:36 +02:00
niklas.ortmann cd60423f1a debugging 2026-05-29 10:30:09 +02:00
niklas.ortmann 9bb2587c49 debugging 2026-05-29 10:29:48 +02:00
niklas.ortmann ef94a5873c debugging 2026-05-29 10:29:26 +02:00
niklas.ortmann 8dbbe9eaf9 debugging 2026-05-29 10:29:00 +02:00
niklas.ortmann 3afac85222 Update home.php 2026-05-29 10:28:05 +02:00
niklas.ortmann 9eae4985d3 Update LocalArticleManager.php 2026-05-29 10:26:21 +02:00
niklas.ortmann 63c7bb8848 Update home.php 2026-05-29 10:19:25 +02:00
niklas.ortmann 28ef21aa52 Update home.php 2026-05-29 10:18:21 +02:00
niklas.ortmann 6a6ab16e09 Update LocalArticleManager.php 2026-05-29 10:11:22 +02:00
niklas.ortmann 5130a638b9 debugging 2026-05-29 10:09:59 +02:00
niklas.ortmann bc9b5effb2 debugging 2026-05-29 10:07:53 +02:00
niklas.ortmann 5ee412b050 debugging 2026-05-29 10:06:51 +02:00
niklas.ortmann 65412e6df9 debugging 2026-05-29 10:06:18 +02:00
niklas.ortmann 22ca680f3c debugging 2026-05-29 10:04:42 +02:00
niklas.ortmann 83268d3a67 dummy-Beiträge auf Home werden aus ArticleManager bezogen 2026-05-29 10:02:50 +02:00
niklas.ortmann d24bd0aa8b Update LocalArticleManager.php 2026-05-29 09:58:17 +02:00
niklas.ortmann c52834aa0d Article.php + getArticle Anpassungen
Article-Klasse ist nun syntaktisch korrekt.
getArticle gibt nun als Rückgabe einen Typ Article zurück
2026-05-29 09:57:50 +02:00
niklas.ortmann 306b9e8152 Dummy-Beiträge
Beim Instanziieren des ArticleManagers werden drei Dummy-Beiträge erstellt.
2026-05-29 09:43:39 +02:00
niklas.ortmann 30bb0d4657 getArticle by id 2026-05-29 09:32:56 +02:00
niklas.ortmann fdd7408f53 showArticle.php + showArticle-controller.php 2026-05-29 09:31:39 +02:00
NOrtmann1 7f77297100 Update search-results.php 2026-05-29 00:30:28 +02:00
NOrtmann1 e8693f282f Update search-results.php 2026-05-29 00:28:32 +02:00
NOrtmann1 8477462e07 Update search-results.php 2026-05-29 00:18:16 +02:00
NOrtmann1 c28268faf3 search-results-controller.php 2026-05-29 00:09:47 +02:00
NOrtmann1 24a759c61a search-results-controller.php 2026-05-28 23:54:35 +02:00
NOrtmann1 0d0a7dba90 Update search-results.php 2026-05-28 23:50:49 +02:00
NOrtmann1 6de87c9e6c Update search-results.php 2026-05-28 23:23:11 +02:00
NOrtmann1 104f265e9b Update search-results.php 2026-05-28 23:21:58 +02:00
NOrtmann1 f21d819c77 Update search-results.css 2026-05-28 22:49:30 +02:00
NOrtmann1 ac1828b5f9 Update search-results.css 2026-05-28 22:48:58 +02:00
NOrtmann1 22bb2de043 Update search-results.css 2026-05-28 22:47:01 +02:00
NOrtmann1 664ad37181 Update search-results.css 2026-05-28 22:38:10 +02:00
NOrtmann1 c2c98d12bc footer in Suchergebnisleiste 2026-05-28 22:28:10 +02:00
NOrtmann1 cdc8b85f3c css 2026-05-28 22:19:31 +02:00
NOrtmann1 c0d9949037 Seitenleiste mit Filteroptionen 2026-05-28 22:16:55 +02:00
NOrtmann1 5dbe7a99b9 search-results.php + css 2026-05-28 21:55:55 +02:00
NOrtmann1 086596f68c messages-styling 2026-05-28 17:21:29 +02:00
NOrtmann1 7a206674ab Update index.php 2026-05-28 17:16:25 +02:00
NOrtmann1 9698512ccf Update index.php 2026-05-28 17:15:40 +02:00
NOrtmann1 f4d144980d Update index.php 2026-05-28 17:13:21 +02:00
NOrtmann1 1513cbda7f User-Feedback 2026-05-28 17:11:59 +02:00
NOrtmann1 1becb82b1b Update php.xml 2026-05-28 15:50:28 +02:00
NOrtmann1 91880b163d erste funktionale Version 2026-05-27 19:38:38 +02:00
NOrtmann1 81dd452f81 Update createArticle-controller.php 2026-05-27 19:37:37 +02:00
NOrtmann1 24642ad83e testing 2026-05-27 19:36:52 +02:00
NOrtmann1 9b8f4036a9 testing 2026-05-27 19:35:11 +02:00
NOrtmann1 86395f0727 testing 2026-05-27 19:32:22 +02:00
NOrtmann1 e5b617dcba testing 2026-05-27 19:31:38 +02:00
NOrtmann1 581c012a72 testing 2026-05-27 19:28:35 +02:00
caroline.slt 4d8f338649 DAO Pattern angepasst & Passwörter gehashed 2026-05-27 19:25:58 +02:00
NOrtmann1 e5eaaf857e testing 2026-05-27 19:24:57 +02:00
NOrtmann1 e0835b70df Update LocalArticleManager.php 2026-05-27 19:23:15 +02:00
NOrtmann1 ed471cdf94 Update LocalArticleManager.php 2026-05-27 19:22:20 +02:00
NOrtmann1 f825537b52 testing 2026-05-27 19:20:14 +02:00
NOrtmann1 485e08e6c6 testing 2026-05-27 19:18:59 +02:00
NOrtmann1 7ff02a6a94 testing 2026-05-27 19:14:45 +02:00
NOrtmann1 ec0148bb86 Update LocalArticleManager.php 2026-05-27 19:09:37 +02:00
NOrtmann1 9aa0793ab4 testing 2026-05-27 19:03:02 +02:00
NOrtmann1 54220682cf article.json 2026-05-27 18:20:56 +02:00
NOrtmann1 b13cff14dc testing 2026-05-27 18:16:22 +02:00
NOrtmann1 f86bdfd2ea testing 2026-05-27 18:02:30 +02:00
NOrtmann1 3933b9b55c Update createArticle-controller.php 2026-05-27 17:58:58 +02:00
NOrtmann1 7a784c8243 Update createArticle-controller.php 2026-05-27 17:49:11 +02:00
NOrtmann1 10ddf8bf7f Update createArticle-controller.php 2026-05-27 17:48:36 +02:00
NOrtmann1 0779a2c7d4 Update createArticle-controller.php 2026-05-27 17:47:11 +02:00
NOrtmann1 053ae0b52f Update createArticle-controller.php 2026-05-27 17:46:52 +02:00
NOrtmann1 be8b6372db testing 2026-05-27 17:46:03 +02:00
NOrtmann1 6068417fc5 Update createArticle-controller.php 2026-05-27 17:45:23 +02:00
NOrtmann1 14d0b23d06 testing 2026-05-27 17:44:33 +02:00
NOrtmann1 1f6ddcd1fd testing 2026-05-27 17:44:06 +02:00
NOrtmann1 701fda5ab5 testing 2026-05-27 17:42:25 +02:00
NOrtmann1 47731a8d46 testing 2026-05-27 17:41:35 +02:00
NOrtmann1 0ade795415 testing 2026-05-27 17:41:17 +02:00
NOrtmann1 2a9a60ae84 testing 2026-05-27 17:40:52 +02:00
NOrtmann1 efdc9b4175 testing 2026-05-27 17:40:29 +02:00
NOrtmann1 6076903b42 testing 2026-05-27 17:39:58 +02:00
NOrtmann1 d43218fdb2 Update createArticle-controller.php 2026-05-27 17:39:06 +02:00
NOrtmann1 554dbd677a testing 2026-05-27 17:38:41 +02:00
NOrtmann1 6a7e961cf6 testing 2026-05-27 17:34:56 +02:00
NOrtmann1 e49e614958 Update createArticle-controller.php 2026-05-27 17:32:58 +02:00
NOrtmann1 70fe6ff807 testing 2026-05-27 17:31:42 +02:00
NOrtmann1 f6932afcb8 testing 2026-05-27 17:31:19 +02:00
NOrtmann1 e3901265d8 path-refactoring 2026-05-27 17:29:45 +02:00
NOrtmann1 368a4948ec testing 2026-05-27 17:22:05 +02:00
NOrtmann1 6c07502866 testing 2026-05-27 17:19:36 +02:00
NOrtmann1 c1c8bc47d7 testing 2026-05-27 17:19:11 +02:00
NOrtmann1 8466a857c3 path-refactoring + getter & setter 2026-05-27 17:18:32 +02:00
NOrtmann1 68d9224ea3 testing 2026-05-27 17:03:40 +02:00
NOrtmann1 aac26b0e50 testing 2026-05-27 17:03:10 +02:00
NOrtmann1 a1a9fa9d3e testing 2026-05-27 17:02:21 +02:00
NOrtmann1 5625326f38 testing 2026-05-27 17:01:48 +02:00
NOrtmann1 8841cffb25 testing 2026-05-27 17:01:07 +02:00
NOrtmann1 d72bf8c3e2 testing 2026-05-27 17:00:24 +02:00
NOrtmann1 04195f5d92 Pfadanpassung (test) 2026-05-27 16:59:04 +02:00
NOrtmann1 24a3ad0639 Update createArticle.php 2026-05-27 16:56:27 +02:00
NOrtmann1 72097f891d Update createArticle.php 2026-05-27 16:55:51 +02:00
NOrtmann1 0686e98384 first test 2026-05-27 16:52:06 +02:00
NOrtmann1 7d9bef932f Update createArticle-controller.php 2026-05-27 16:16:21 +02:00
NOrtmann1 e69cb50a9c Delete UserDAO.php 2026-05-27 16:04:08 +02:00
NOrtmann1 890187cff2 statt txt -> json 2026-05-27 16:03:56 +02:00
caroline.slt 46a307a5b0 First Implementation 2026-05-26 23:14:12 +02:00
caroline.slt 7706c7dfbf First Implementation 2026-05-26 23:06:22 +02:00
caroline.slt a946cee891 First Implementation 2026-05-26 22:59:48 +02:00
NOrtmann1 f2a9d8d1b3 refactoring 2026-05-26 19:04:46 +02:00
NOrtmann1 e128a31a34 refactoring 2026-05-26 18:55:42 +02:00
NOrtmann1 d7acca36fd Update createArticle.php 2026-05-26 18:46:42 +02:00
NOrtmann1 d28560b77e Update createArticle-controller.php 2026-05-26 18:45:12 +02:00
NOrtmann1 ee6dd0ddae Update index-controller.php 2026-05-26 18:45:10 +02:00
NOrtmann1 feb64eb769 Update index-controller.php 2026-05-26 18:42:16 +02:00
NOrtmann1 ecc76e453e Update createArticle.php 2026-05-26 18:39:23 +02:00
NOrtmann1 949ca542ab $abs_path 2026-05-26 18:37:56 +02:00
NOrtmann1 b090195d9f Update article.css 2026-05-26 18:30:27 +02:00
NOrtmann1 1f1e7dc814 Update createArticle.php 2026-05-26 18:29:41 +02:00
NOrtmann1 3606a750be refactoring 2026-05-26 18:15:28 +02:00
NOrtmann1 8762bc1b07 refactoring 2026-05-26 18:06:44 +02:00
NOrtmann1 c7f279b7e9 Update createArticle-controller.php 2026-05-26 17:53:51 +02:00
NOrtmann1 92f1f077d2 refactoring 2026-05-26 17:48:50 +02:00
NOrtmann1 50120f974d Update index.php 2026-05-26 17:45:30 +02:00
NOrtmann1 713a258d48 Update FileDatabase.php 2026-05-26 17:45:06 +02:00
NOrtmann1 0a7e6df734 Update index-controller.php 2026-05-26 17:44:14 +02:00
NOrtmann1 8c769ba280 create-Article-controller Implementation 2026-05-26 17:43:07 +02:00
NOrtmann1 5bcb64f7f8 Database-(Brücken)-Klasse 2026-05-26 17:03:50 +02:00
NOrtmann1 944f40d89f Artikel-Klasse + FileDatabase - Klasse 2026-05-26 15:41:05 +02:00
NOrtmann1 b15421efee refactoring 2026-05-26 15:01:17 +02:00
NOrtmann1 3ddd66dcbb Update navbar.php 2026-05-26 12:43:21 +02:00
NOrtmann1 8af0367edf Update navbar.css 2026-05-26 12:43:00 +02:00
NOrtmann1 b95fc1adbe Update navbar.php 2026-05-26 12:42:40 +02:00
NOrtmann1 63f400995b Update navbar.css 2026-05-26 12:41:49 +02:00
NOrtmann1 8aa657ed99 doppelte ID entfernt 2026-05-26 12:41:05 +02:00
NOrtmann1 627c72bb7f Update navbar.php 2026-05-26 12:39:05 +02:00
niklas.ortmann a8a75d90ac Merge pull request 'FooterAnsEnde' (#9) from footerAnsEnde into dev
Reviewed-on: #9
2026-05-26 12:30:37 +02:00
niklas.ortmann 0b1b704115 Merge pull request 'MobileNavSchließen' (#10) from MobileNavSchließen into dev
Reviewed-on: #10
2026-05-26 12:30:27 +02:00
niklas.ortmann 0babc42359 Merge pull request 'Update main.css' (#11) from responsiveHomepage into dev
Reviewed-on: #11
2026-05-26 12:30:14 +02:00
rirat-0 4a80d42dda Update main.css
Anpassung der flexbox um inhalte besser zu skalieren
2026-05-26 11:41:11 +02:00
NOrtmann1 a2daded6b3 Footer-Link-Anpassungen (dynamisch wie navbar) 2026-05-26 11:25:47 +02:00
NOrtmann1 d3169eba18 Update navbar.css 2026-05-26 11:19:57 +02:00
NOrtmann1 2d967c200c x-Button in der Sidebar 2026-05-26 11:18:58 +02:00
NOrtmann1 2044853f94 Update navbar.php 2026-05-26 11:15:20 +02:00
NOrtmann1 9a3e4cc7dc Update navbar.php 2026-05-26 11:08:43 +02:00
NOrtmann1 f508a222c6 mobile-nav- "Beitrag erstellen" Button 2026-05-26 11:07:34 +02:00
NOrtmann1 193e526e67 Update main.css 2026-05-26 11:00:25 +02:00
NOrtmann1 f77643af44 body-css-anpassungen 2026-05-26 10:59:07 +02:00
NOrtmann1 9e900a3436 Update footer.css 2026-05-26 10:54:40 +02:00
NOrtmann1 75988ffe71 Update footer.css 2026-05-26 10:54:02 +02:00
NOrtmann1 cb1f3f0d07 Update footer.css 2026-05-26 10:52:57 +02:00
NOrtmann1 4d8017aa2b Update footer.css 2026-05-26 10:51:32 +02:00
NOrtmann1 365f37dcea responsive Design für Smartphones 2026-05-26 10:47:03 +02:00
NOrtmann1 2472143146 Update createArticle.php 2026-05-26 10:42:32 +02:00
NOrtmann1 a1184299b1 erste article-Implementation
article-Interface & -Klasse
+ createArticle.php mit article.css (Editor)
+ neuer "Beitrag erstellen"-Button in Navbar
2026-05-26 10:36:56 +02:00
caroline.slt 4d4b8aeb99 First Implementation 2026-05-26 00:20:34 +02:00
NOrtmann1 c41302d046 Klassen article und articleDAO 2026-05-22 17:09:20 +02:00
niklas.ortmann aaefd2917e Create article.php 2026-05-22 14:26:35 +02:00
NOrtmann1 ee7986bef3 Update index.php 2026-05-21 21:03:38 +02:00
NOrtmann1 8de1b1bdb5 Update index.php 2026-05-21 21:02:46 +02:00
NOrtmann1 4a663391ef Update navbar.css 2026-05-21 21:00:20 +02:00
niklas.ortmann 4cd877ea4c Merge pull request 'PHP: Dynamischer Content' (#8) from PHP_DynamischerContent into dev
Reviewed-on: #8
2026-05-21 20:57:26 +02:00
NOrtmann1 0f573d30ae linkanpassungen 2026-05-21 17:36:18 +02:00
NOrtmann1 fdd56c10b8 Update home.php 2026-05-21 17:33:42 +02:00
NOrtmann1 46daf72a14 Update index.php 2026-05-21 17:32:43 +02:00
NOrtmann1 896e6abcd8 login & register -> /content/ 2026-05-21 17:31:45 +02:00
NOrtmann1 95e5cf0908 navbar linkanpassungen 2026-05-21 17:30:07 +02:00
NOrtmann1 be35a00cef Dateien in richtige Ordner + statische HTML vom content entfernt 2026-05-21 17:19:40 +02:00
NOrtmann1 b616251511 dynamic content test
profil wird dynamisch in die index.php integriert (Test)
2026-05-21 17:13:52 +02:00
NOrtmann1 3f5313dd00 Update 404.php 2026-05-19 14:49:06 +02:00
NOrtmann1 f909d0453b Update 404.php 2026-05-13 22:55:47 +02:00
NOrtmann1 d5f4f2b8a5 Update main.css 2026-05-13 22:53:32 +02:00
niklas.ortmann 87a8e9b7d2 Merge pull request 'designcss2 zu dev' (#7) from designcss2 into dev
Reviewed-on: #7
2026-05-13 22:50:24 +02:00
NOrtmann1 729b0f08a1 Update main.css 2026-05-13 22:49:57 +02:00
NOrtmann1 2907bcdd67 Update home.php 2026-05-13 22:44:23 +02:00
NOrtmann1 65935c644b Update profile.php 2026-05-13 22:09:59 +02:00
NOrtmann1 8645900035 Update profile.php 2026-05-13 22:09:25 +02:00
NOrtmann1 49a8d49296 logo aus login und register entfernt 2026-05-13 21:53:59 +02:00
NOrtmann1 bc1051e4a2 Update register.php 2026-05-13 21:50:06 +02:00
NOrtmann1 d8f8fbbdd4 Update login.php 2026-05-13 21:48:35 +02:00
NOrtmann1 baf3f88e1e Update login.php 2026-05-13 21:47:51 +02:00
NOrtmann1 480b6cd4ae Update 404.php 2026-05-13 18:43:35 +02:00
NOrtmann1 29b588babb testing... 2026-05-13 18:41:29 +02:00
NOrtmann1 a29e48efad Update main.css 2026-05-13 18:11:03 +02:00
NOrtmann1 84a9f7063a Merge branch 'navbar' into dev 2026-05-13 18:08:42 +02:00
niklas.ortmann 58f7be9d52 Merge pull request 'Last Implementation' (#6) from designcss into dev
Reviewed-on: #6
2026-05-13 18:00:19 +02:00
NOrtmann1 8fa91e74da html head-Anpassungen 2026-05-13 17:29:21 +02:00
NOrtmann1 a33824a935 Datenschutz, Nutzungsbedingungen, Impressum -> root-Ordner 2026-05-13 17:27:37 +02:00
caroschulte02-alt d497ea4fc3 First Implementation 2026-05-13 16:29:31 +02:00
caroschulte02-alt 80316e080a First Implementation 2026-05-13 16:18:12 +02:00
viratex bf06df461d Merge pull request 'Home, sowie Login und Register Website haben nun CSS implementiert' (#5) from responsiveCSS into dev
Reviewed-on: #5
2026-05-13 15:14:37 +02:00
NOrtmann1 0f529bae05 Update README.md 2026-05-13 12:06:45 +02:00
NOrtmann1 526ae0cf17 Update 404.php 2026-05-13 10:32:18 +02:00
NOrtmann1 cdd3a8a5a6 Update 404.php 2026-05-13 10:19:58 +02:00
NOrtmann1 48c855de7b Update main.css 2026-05-12 19:40:37 +02:00
NOrtmann1 51d38b1d42 Update main.css 2026-05-12 19:40:03 +02:00
NOrtmann1 e61cb0dc1f Update navbar.css 2026-05-12 19:39:27 +02:00
NOrtmann1 fccd00e959 label 2026-05-12 19:39:01 +02:00
NOrtmann1 facddf3e42 span -> lable 2026-05-12 19:37:51 +02:00
NOrtmann1 a43dc50cf1 nav__mobile-label 2026-05-12 19:31:40 +02:00
NOrtmann1 143b78b45d Update navbar.php 2026-05-12 19:27:50 +02:00
NOrtmann1 4aef921299 mobile nav links 2026-05-12 19:22:47 +02:00
NOrtmann1 1db44ade6f doppeltes logo in profile login und register entfernen 2026-05-12 18:16:07 +02:00
NOrtmann1 a76cb0bb0a logo-Pfadanpassungen 2026-05-12 18:15:08 +02:00
NOrtmann1 e3aeeb7fdd Kommentar + Footer-padding-Änderung 2026-05-12 18:12:38 +02:00
NOrtmann1 1fb181d83c Update footer.css 2026-05-12 18:10:36 +02:00
NOrtmann1 8d3a18ee86 Update home.php 2026-05-12 18:09:47 +02:00
NOrtmann1 76fac30a5f css-Links 2026-05-12 18:08:24 +02:00
NOrtmann1 882cfb28d2 include navbar.php und footer.php Anpassungen 2026-05-12 18:07:37 +02:00
NOrtmann1 8e3d11a607 css-links hinzufügen 2026-05-12 18:04:44 +02:00
NOrtmann1 1fc687ffc9 home.php aus falschen php entfernt 2026-05-12 18:01:10 +02:00
NOrtmann1 bde79ace3a Linkanpassungen 2026-05-12 18:00:32 +02:00
NOrtmann1 299140da94 register.php -> root-ordner 2026-05-12 17:26:41 +02:00
NOrtmann1 f7ddde6860 login.php -> root-ordner 2026-05-12 17:25:15 +02:00
NOrtmann1 bde258859c profile.php -> root-ordner 2026-05-12 17:23:56 +02:00
NOrtmann1 cdc7611dc5 profile.php -> root-ordner 2026-05-12 17:23:45 +02:00
NOrtmann1 160150d2fe physik.php -> root-ordner 2026-05-12 17:22:36 +02:00
NOrtmann1 012b21449b mathe.php -> root-ordner 2026-05-12 17:21:11 +02:00
NOrtmann1 70b1191eda mathe.php -> root-ordner 2026-05-12 17:20:59 +02:00
NOrtmann1 5c0b9b4d44 informatik.php in root-ordner 2026-05-12 17:18:17 +02:00
NOrtmann1 0b518db97f informatik.php in root-ordner 2026-05-12 17:18:00 +02:00
NOrtmann1 eb87cfa2fa Update footer.css 2026-05-11 19:23:01 +02:00
NOrtmann1 279a5329cf footer.css 2026-05-11 19:22:20 +02:00
NOrtmann1 2252ec2646 Update 404.php 2026-05-11 19:07:31 +02:00
NOrtmann1 b2c79c636a Update 404.php 2026-05-11 19:03:22 +02:00
NOrtmann1 f97f345939 nav_logo -> nav__logo 2026-05-11 18:59:58 +02:00
NOrtmann1 673f171e8b Update navbar.css 2026-05-11 18:57:43 +02:00
NOrtmann1 5c4a1d1d91 Navbar-Links geändert
Alle Links in der Navbar für den content zeigen auf eine 404.php, solange wir noch kein php verwenden können, um den Inhalt der index.php dynamisch zu gestalten.
2026-05-11 18:56:24 +02:00
NOrtmann1 76928e78e7 nav-toggle-button -> nav-toggle-label 2026-05-11 16:01:47 +02:00
NOrtmann1 e6412ef2cd off canvas nav__checkbox 2026-05-11 15:57:01 +02:00
NOrtmann1 d577bd11f1 Kommentare 2026-05-11 15:20:55 +02:00
NOrtmann1 793f1e0e96 Update navbar.css 2026-05-11 14:57:29 +02:00
NOrtmann1 78f669e857 Update navbar.css 2026-05-11 14:57:08 +02:00
NOrtmann1 99374dae3c Update navbar.css 2026-05-11 14:56:06 +02:00
NOrtmann1 a1aa191cf7 Update navbar.css 2026-05-11 14:54:49 +02:00
NOrtmann1 615330e8e6 Update navbar.css 2026-05-11 14:54:33 +02:00
NOrtmann1 6fec6ebfa3 Update navbar.css 2026-05-11 14:54:13 +02:00
NOrtmann1 9a4d25776c Update navbar.css 2026-05-11 14:53:43 +02:00
NOrtmann1 b1705e5497 Update navbar.css 2026-05-11 14:52:55 +02:00
NOrtmann1 132f7866d1 Update navbar.php 2026-05-11 14:52:38 +02:00
NOrtmann1 532ec22811 Update navbar.css 2026-05-11 14:51:12 +02:00
NOrtmann1 59ef5b8bc2 Update navbar.css 2026-05-11 14:50:36 +02:00
NOrtmann1 7940cc3b3c Update index.php 2026-05-11 14:49:45 +02:00
niklas.ortmann 2a8a801749 search button 2026-05-11 13:35:28 +02:00
niklas.ortmann ea02066644 mobile nav mit search button 2026-05-11 13:31:49 +02:00
niklas.ortmann 1171fed5cd Update navbar.css 2026-05-11 13:28:58 +02:00
niklas.ortmann 36cb2c03f1 Update navbar.css 2026-05-11 13:18:00 +02:00
niklas.ortmann 44f647c60b Update navbar.php 2026-05-11 13:17:01 +02:00
niklas.ortmann 7e09860826 Update navbar.php 2026-05-11 13:15:52 +02:00
niklas.ortmann 2d9b146517 off canvas navbar 2026-05-11 13:14:04 +02:00
niklas.ortmann bbc7e7297e zweite Navbarzeile ab 1210Px 2026-05-11 12:43:55 +02:00
niklas.ortmann c7f2288f8e Update navbar.php 2026-05-11 11:15:47 +02:00
niklas.ortmann e9d1d017e1 Update navbar.php 2026-05-11 11:10:24 +02:00
NOrtmann1 bf2aff1f77 responisve navbar 2026-05-11 10:22:02 +02:00
NOrtmann1 f4fcf7b387 nav__search 2026-05-11 10:10:42 +02:00
NOrtmann1 d37e6460ab nav__item 2026-05-11 10:01:18 +02:00
NOrtmann1 3e03f0aa90 nav__item 2026-05-11 09:57:39 +02:00
NOrtmann1 4809a10327 icon hinzugefügt 2026-05-11 09:55:30 +02:00
NOrtmann1 df316263eb Update main.css 2026-05-11 09:52:19 +02:00
NOrtmann1 b9eb97a842 Update main.css 2026-05-11 09:51:26 +02:00
NOrtmann1 86daa175fa Update main.css 2026-05-11 09:49:08 +02:00
NOrtmann1 134b439fd3 Update navbar.css 2026-05-11 09:45:41 +02:00
NOrtmann1 d3303de510 Update navbar.css 2026-05-11 09:42:23 +02:00
NOrtmann1 b13b713e43 Update navbar.css 2026-05-11 09:41:47 +02:00
NOrtmann1 f687347e11 Update navbar.css 2026-05-11 09:37:12 +02:00
NOrtmann1 fa70550ca2 nav__button 2026-05-11 09:33:28 +02:00
NOrtmann1 2ff947e62e Update navbar.php 2026-05-11 09:31:35 +02:00
NOrtmann1 7267ad4498 Update navbar.css 2026-05-11 09:30:26 +02:00
NOrtmann1 5381368af0 nav__link bold 2026-05-11 09:19:34 +02:00
NOrtmann1 6c4041ba16 font:bold 2026-05-11 09:17:07 +02:00
NOrtmann1 99f874820f search.css 2026-05-11 09:13:44 +02:00
NOrtmann1 46a609e4b7 Update navbar.css 2026-05-11 09:05:24 +02:00
NOrtmann1 f5c8f4adab Update navbar.css 2026-05-11 08:55:53 +02:00
NOrtmann1 314fd8e26e Update navbar.php 2026-05-11 08:53:48 +02:00
NOrtmann1 a1b61ddc47 Update navbar.php 2026-05-11 08:53:02 +02:00
NOrtmann1 5b0fa08c81 logo-Pfad-Anpassung 2026-05-11 08:51:50 +02:00
NOrtmann1 044f2f8248 Kommentare 2026-05-11 08:43:13 +02:00
NOrtmann1 333d19e3e2 Update navbar.css 2026-05-11 08:34:58 +02:00
NOrtmann1 f4171c69ea Update index.php 2026-05-11 08:30:44 +02:00
NOrtmann1 4a9c4ae462 Update navbar.php 2026-05-11 08:29:36 +02:00
niklas.ortmann 37b0376a38 Update navbar.css 2026-05-10 14:34:59 +02:00
niklas.ortmann f4156d16c5 Update navbar.php 2026-05-10 14:34:35 +02:00
niklas.ortmann cd74f7a963 "|" zwischen Elementen entfernt 2026-05-10 14:31:42 +02:00
niklas.ortmann 49ed423eaf Update navbar.css 2026-05-10 14:29:12 +02:00
niklas.ortmann 1b7802a2ac dropdown hover display 2026-05-10 14:27:28 +02:00
niklas.ortmann 6e449912ab navbar.php + navbar.css update 2026-05-10 14:23:03 +02:00
niklas.ortmann 8fe32f6245 navbar.css + dropdown-navbar 2026-05-10 13:54:17 +02:00
niklas.ortmann f52022d098 Update navbar.php 2026-05-10 13:29:09 +02:00
NOrtmann1 e67a350857 Deutsch-Button 2026-05-08 16:46:21 +02:00
72 changed files with 4503 additions and 1006 deletions
View File
+42
View File
@@ -0,0 +1,42 @@
<DataSourcesHistory>
<DataSourceFromHistory isRemovedFromProject="true">
<data-source source="LOCAL" name="articles" uuid="a0abcd0a-1d6f-40e4-88be-f442bcb431ba">
<database-info product="SQLite" version="3.51.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.51.1.0" dbms="SQLITE" exact-version="3.51.1" exact-driver-version="3.51">
<identifier-quote-string>&quot;</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/db/articles</jdbc-url>
<secret-storage>master_key</secret-storage>
<auth-provider>no-auth</auth-provider>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</DataSourceFromHistory>
<DataSourceFromHistory isRemovedFromProject="false">
<data-source source="LOCAL" name="articles" uuid="315cb5c9-2b0f-435b-b602-59823b160908">
<database-info product="SQLite" version="3.51.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.51.1.0" dbms="SQLITE" exact-version="3.51.1" exact-driver-version="3.51">
<identifier-quote-string>&quot;</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/db/articles</jdbc-url>
<secret-storage>master_key</secret-storage>
<auth-provider>no-auth</auth-provider>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</DataSourceFromHistory>
</DataSourcesHistory>
Generated
+1
View File
@@ -10,6 +10,7 @@
<option name="highlightLevel" value="WARNING" /> <option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.5" />
<component name="PhpStanOptionsConfiguration"> <component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>
+34 -9
View File
@@ -1,10 +1,35 @@
Team Tag-Buchstabe: DI-14-C-Schulte-Eilers-Ortmann # Webprogrammierung: Gruppe DI-14-C
Namen der Studierenden:
- Name 1 Caroline Schulte
- Name 2 Jacques Eilers
- Name 3 Niklas Ortmann
Abgabe zu Aufgabenblatt 1
Hinweise: ## Beteiligte
index.html wurde zu einer index.php umbenannt. - Caroline Schulte
webhook.php bitte ignorieren. Diese dient nur als zukünftige Automatisierung des Repo-Pulls (s. https://docs.gitea.com/usage/webhooks) - Jacques Eilers
- Niklas Ortmann
## Login-Informationen für Dummy-User
Jeweils im Format `Anmeldename, Passwort, Mailadresse`:
- `max.mustermann, test123, mustermann@web.de`
## Weitere Voraussetzungen zur Nutzung
- Per Klick auf das Logo gelangt man auf die Home-Seite.
## Ausgelassene Teilaufgaben
## Bekannte Fehler und Mängel
- Der Beitragseditor fügt beim Laden von Inhalten leere Zeichen ein.
- Bitte auf die gesetzten TODO's achten. Wenn Inhalte fehlen, sind sie i.d.R. als TODO kommentiert.
- Die Navbar hat noch keine onHover-Effekte und erschwert etwas die Bedienung.
- Suchleiste in der Nav ist in der mobilen Ansicht etwas schmal. Ggf. ein alternatives (kleineres) Logo implementieren.
- Die Suchseite und Kategorieseite packen momentan alle passenden Beiträge untereinander. Später sollen zunächst 10
Ergebnisse auf einer Seite angezeigt werden.
## Besonderheiten des Projektes
- Es wurde ein einfacher Beitrags-Editor erstellt. Mit diesem können Beiträge erstellt oder bearbeitet werden.
Es handelt es sich um eine einfache Version. Später sollen z.B. Bilder und die Positionierung der Elemente folgen.
- Es sind drei Dummy-Beiträge für den Nutzer max.mustermann hinterlegt.
- Beim Verwenden der Navbar-Links bitte Folgendes beachten: nur die Kategorien Physik, Mathe, Informatik führen
exemplarisch auf eine Beispiel-Seite.
Die anderen Links sind erstmal Platzhalter und führen auf eine 404-Seite.
- Die Such-Seite umfasst eine Suchfunktion (aber noch nicht nach Tags) und Sortierfunktion. Jedoch fehlt noch eine
Filterfunktion (z.B. nur Mathe anzeigen).
Wenn die Filterfunktion implementiert ist, dann können die statischen Seiten "Informatik", "Mathe", "Physik" entfernt
und dynamisch auf der Suchseite nach gefiltertem Fach angezeigt werden. (Vorläufige showCategory.php implementiert).
-76
View File
@@ -1,76 +0,0 @@
<!--
Artikel: Datenschutz vs Datensicherheit
Funktion: Inhalt zum Fach Informatik
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Datenschutz vs Datensicherheit</h1>
<p>
Datenschutz ist in unserer digital vernetzten Welt allgegenwärtig ob in sozialen Netzwerken, beim
Online-Shopping oder dem Einsatz von Bonuskarten, bei der Auswertung von Konsumverhalten und selbstverständlich
auch im schulischen Kontext.
</p>
<h2>
Was ist Datenschutz?
</h2>
<p>
Datenschutz bedeutet, dass persönliche Daten nur gesammelt, gespeichert und verwendet werden dürfen, wenn
es wirklich nötig ist und nur für klar festgelegte Zwecke. Es geht darum, die Privatsphäre von Menschen
zu schützen.
</p>
<h2>
Was ist Datenschutz?
</h2>
<p>
Datensicherheit umfasst alle technischen und organisatorischen Maßnahmen, die verhindern sollen, dass Daten
verloren gehen, beschädigt oder unbemerkt verändert werden. Sie schützt Informationen vor Missbrauch.
</p>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../../legal/impressum.php">Impressum</a>
<a href="../../legal/datenschutz.php">Datenschutz</a>
<a href="../../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
-72
View File
@@ -1,72 +0,0 @@
<!--
Artikel: Satz des Pythagoras
Funktion: Inhalt zum Fach Mathe
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Satz des Pythagoras</h1>
<p>
Der Satz des Pythagoras wurde von dem griechischen Philosophen Pythagoras von Samos formuliert und im
dritten Jahrhundert vor Christus veröffentlicht.
</p>
<figure>
<img src="https://cdn8.picryl.com/photo/2016/05/14/pythagoras-e9560b-1024.jpg" alt="Trulli" style="width:10%">
<figcaption><a href="https://cdn8.picryl.com/photo/2016/05/14/pythagoras-e9560b-1024.jpg">Quelle</a></figcaption>
</figure>
<p>
In der beigefügten Abbildung sehen wir ein rechtwinkliges Dreieck, dessen drei Seiten die Längen a, b und c
besitzen. Auf jeder Seite ist ein Quadrat konstruiert. Das Quadrat auf der Seite a hat die Fläche a2, das
Quadrat auf der Seite b hat die Fläche b2 und das Quadrat auf der Seite c hat die Fläche c2. Der Satz des
Pythagoras besagt, dass die Summe der Flächen der beiden kleineren Quadrate gleich der Fläche des größten
Quadrats ist. Das bedeutet, dass a^2+b^2=c^2 (Satz des Pythagoras).
</p>
<a href="../docs/Uebungsaufgaben_Pythagoras.pdf">Lernzettel-Download</a>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../../legal/impressum.php">Impressum</a>
<a href="../../legal/datenschutz.php">Datenschutz</a>
<a href="../../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
-66
View File
@@ -1,66 +0,0 @@
<!--
Artikel: Tunneleffekt
Funktion: Inhalt zum Fach Physik
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Tunneleffekt</h1>
<p>
Der Tunneleffekt ist ein quantenmechanisches Phänomen, bei dem Teilchen vor allem Elektronen eine
Energiebarriere überwinden können, obwohl sie nach den Regeln der klassischen Physik nicht genügend Energie
dafür besitzen. In der klassischen Vorstellung müsste ein Elektron entweder genügend Energie haben, um über
eine Barriere zu „springen“, oder es würde vollständig zurückgeworfen. In der Quantenphysik wird ein Elektron
jedoch nicht als punktförmiges Teilchen beschrieben, sondern als Wellenfunktion, die sich räumlich ausdehnt.
Dadurch besteht eine endliche Wahrscheinlichkeit, dass sich das Elektron auf der anderen Seite einer Barriere
befindet (Griffiths & Schroeter, 2018).
</p>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../../legal/impressum.php">Impressum</a>
<a href="../../legal/datenschutz.php">Datenschutz</a>
<a href="../../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
-83
View File
@@ -1,83 +0,0 @@
<!--
Form: Login-Bereich
Funktion: Benutzerauthentifizierung und Zugang zum eigenen Profil, Erstellen von Beiträgen, etc.
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main class="login-page">
<div class="login-container">
<div class="logo-wrapper">
<img src="../images/logo.png" alt="Logo" class="login-logo">
</div>
<h1>Bitte anmelden</h1>
<form>
<label id ="inputEmail" class="screenreader-only">E-Mail Adresse / </label>
<p class="input-label">Benutzername/E-Mail-Adresse:</p>
<input type="email" name="email" class="login-input" placeholder="E-Mail-Adresse" required autofocus>
<p class="input-label">Passwort:</p>
<input type="password" name="password" class="login-input" placeholder="Passwort" required>
<div class="checkbox-wrapper">
<label>
<input type="checkbox" name="remember-me" value="1"> angemeldet bleiben
</label>
</div>
<button type="submit" value="anmelden" name="loginSubmit" class="login-button">anmelden</button>
<div class="register-link">
<a href="register.php">Noch keinen Account? Jetzt hier registrieren!</a>
</div>
</form>
</div>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../legal/impressum.php">Impressum</a>
<a href="../legal/datenschutz.php">Datenschutz</a>
<a href="../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
-83
View File
@@ -1,83 +0,0 @@
<!--
Form: Registrierung
Funktion: Erstellung neuer Benutzerkonten
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main class="login-page">
<div class="login-container">
<div class="logo-wrapper">
<img src="../images/logo.png" alt="Logo" class="login-logo">
</div>
<h1>Jetzt Registrieren!</h1>
<form>
<p class="input-label">Email:</p>
<input type="email" name="email" class="login-input" placeholder="mustermann@web.de" required>
<p class="input-label">Vorname:</p>
<input type="text" name="vorname" class="login-input" placeholder="Max" required>
<p class="input-label">Nachname:</p>
<input type="text" name="nachname" class="login-input" placeholder="Mustermann" required>
<p class="input-label">Passwort:</p>
<input type="password" name="password" class="login-input" placeholder="Passwort" required>
<div class="checkbox-wrapper">
<label>
<input type="checkbox" value="remember-me"> angemeldet bleiben
</label>
</div>
<button type="submit" value="anmelden" name="loginSubmit" class="login-button">kostenlos registrieren</button>
</form>
</div>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../legal/impressum.php">Impressum</a>
<a href="../legal/datenschutz.php">Datenschutz</a>
<a href="../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
<!--
Seite: 404 Seite nicht gefunden
Funktion: Wenn eine Seite nicht gefunden wurde oder noch fehlt, dann wird hierauf verwiesen.
-->
<main>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<p class="alert-message is-error">
Es ist ein interner Fehler beim Speichern aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
<h1>404 - Seite nicht vorhanden</h1>
<p>
Später im Projekt sollen über index.php?pfad= ... der Inhalt der index.php dynamisch gesetzt werden.
Alle Content-Links der Navbar führen zunächst hier her. Exemplarisch wurden für die Fächer Informatik, Physik, Mathematik der Content als Seite erstellt und kann über die Navbar ausgekundschaftet werden.
</p>
</main>
+122
View File
@@ -0,0 +1,122 @@
<?php
$user = $user ?? null;
if (!isset($_SESSION["user"])) {
header("Location: index.php?pfad=login");
exit();
}
?>
<!--
Seite: Beitrag erstellen
Inhalt: Formular für die Erstellung eines neuen Beitrags
-->
<form method="post" action="php/controller/createArticle-controller.php" id="editor-form" class="article-editor-scope.editor-container article-editor-scope editor-container">
<main class="editor-main">
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<p class="alert-message is-error">
Es ist ein interner Fehler beim Speichern aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "missing_parameters"): ?>
<p class="alert-message is-error">
Jeder Beitrag muss einen Titel, Kategorie und Inhalt besitzen.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_title"): ?>
<p class="alert-message is-error">
Der Titel enthält ungültige Zeichen oder erfüllt die Länge von 5-120 Zeichen nicht.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_content"): ?>
<p class="alert-message is-error">
Der Text erlaubt eine Länge von 10 bis maximal 7.000 Zeichen (ca. 1.000 Wörter).
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_category"): ?>
<p class="alert-message is-error">
Die ausgewählte Kategorie ist ungültig.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_tags"): ?>
<p class="alert-message is-error">
Ungültige Schlagworte gefunden. Erlaubt sind nur Buchstaben, Zahlen, Leerzeichen und Bindestriche (2-50 Zeichen).
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "validation_missing"): ?>
<p class="alert-message is-error">
Bei der Validierung deiner Daten ist ein Fehler aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
<input type="text" id="title" name="title"
value="<?php echo htmlspecialchars($_SESSION['old_title'] ?? ''); unset($_SESSION['old_title']); ?>"
placeholder="Titel hier eingeben" required>
<textarea id="content" name="content" placeholder="Schreibe deinen Beitrag...">
<?php echo htmlspecialchars($_SESSION['old_content'] ?? ''); unset($_SESSION['old_content']); ?>
</textarea>
</main>
<!-- Seitenleiste -->
<aside class="editor-sidebar">
<div class="sidebar-block">
<button type="submit" id="editor-button" class="button">Veröffentlichen</button>
</div>
<div class="sidebar-block">
<label for="category">Kategorie <span class="required">*</span></label>
<select id="category" name="category" required>
<option value="" disabled selected>Kategorie wählen...</option>
<optgroup label="Sprachen">
<option value="deutsch">Deutsch</option>
<option value="englisch">Englisch</option>
<option value="franzoesisch">Französisch</option>
<option value="latein">Latein</option>
<option value="literatur">Literatur</option>
</optgroup>
<optgroup label="MINT">
<option value="mathe">Mathematik</option>
<option value="biologie">Biologie</option>
<option value="chemie">Chemie</option>
<option value="physik">Physik</option>
<option value="informatik">Informatik</option>
<option value="astronomie">Astronomie</option>
</optgroup>
<optgroup label="Gesellschaft & Werte">
<option value="geschichte">Geschichte</option>
<option value="erdkunde">Erdkunde</option>
<option value="sozialkunde">Sozialkunde</option>
<option value="wirtschaft">Wirtschaftskunde</option>
<option value="religion">Religion</option>
<option value="ethik">Ethikunterricht</option>
<option value="philosophie">Philosophie</option>
<option value="psychologie">Psychologie</option>
<option value="kunst">Kunst</option>
<option value="musik">Musik</option>
<option value="theater">Theater</option>
</optgroup>
<optgroup label="Technik & Praxis">
<option value="technik">Technik</option>
<option value="werken">Werken</option>
<option value="hauswirtschaft">Hauswirtschaft</option>
<option value="sport">Sport</option>
</optgroup>
</select>
</div>
<div class="sidebar-block">
<label for="tags">Schlagwörter</label>
<input type="text" id="tags" name="tags"
value="<?php echo htmlspecialchars($_SESSION['old_tags'] ?? ''); unset($_SESSION['old_tags']); ?>"
placeholder="z.B. Technik, IT (mit Komma trennen)">
</div>
</aside>
</form>
+18
View File
@@ -0,0 +1,18 @@
<!--
Seite: Datenschutzerklärung
Inhalt: Informationen zur Datenverarbeitung gemäß DSGVO
-->
<main>
<h1>Datenschutz</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</main>
+29 -6
View File
@@ -1,8 +1,30 @@
<?php
include_once 'php/controller/home-controller.php';
?>
<!-- <!--
Seite: Home Seite: Home
Inhalt: Beinhaltet den Inhalt der Startseite Inhalt: Beinhaltet den Inhalt der Startseite
--> -->
<main> <main>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<p class="alert-message is-error">
Es ist ein Fehler beim Speichern aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "new_article"): ?>
<p class="alert-message is-success">
Dein Beitrag wurde erfolgreich veröffentlicht!
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_category"): ?>
<p class="alert-message is-error">
Diese Kategorie ist nicht gültig.
</p>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
<h1>Home</h1> <h1>Home</h1>
<p> <p>
@@ -17,24 +39,25 @@
<!-- Flexbox --> <!-- Flexbox -->
<div class="flexbox"> <div class="flexbox">
<div class="container"> <div class="container">
<a href="content/informatik.php" class="category-link">Informatik</a> <a href="index.php?pfad=showCategory&category=informatik" class="category-link">Informatik</a>
<div class="article-link"> <div class="article-link">
<a href="articles/datenschutz.php">Datenschutz vs. Datensicherheit</a> <a href="index.php?pfad=showArticle&id=<?php echo $dummy3->getId()?>"><?php if(isset($dummy3)){echo $dummy3->getTitle();}else{echo "Fehler: Beitrag nicht gefunden!";} ?></a>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<a href="content/mathe.php" class="category-link">Mathe</a> <a href="index.php?pfad=showCategory&category=mathe" class="category-link">Mathe</a>
<div class="article-link"> <div class="article-link">
<a href="articles/pythagoras.php">Satz des Pythagoras</a> <a href="index.php?pfad=showArticle&id=<?php echo $dummy1->getId()?>"><?php if(isset($dummy1)){echo $dummy1->getTitle();}else{echo "Fehler: Beitrag nicht gefunden!";} ?></a>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<a href="content/physik.php" class="category-link">Physik</a> <a href="index.php?pfad=showCategory&category=physik" class="category-link">Physik</a>
<div class="article-link"> <div class="article-link">
<a href="articles/tunneleffekt.php">Der Tunneleffekt</a> <a href="index.php?pfad=showArticle&id=<?php echo $dummy2->getId()?>"><?php if(isset($dummy2)){echo $dummy2->getTitle();}else{echo "Fehler: Beitrag nicht gefunden!";} ?></a>
</div> </div>
</div> </div>
</div> </div>
</main> </main>
+19
View File
@@ -0,0 +1,19 @@
<!--
Seite: Impressum
Inhalt: wer wie was auf der Webseite
-->
<main>
<h1>Impressum</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</main>
+15 -63
View File
@@ -2,68 +2,20 @@
Seite: Informatik Seite: Informatik
Inhalt: Eine Übersicht über alle Beiträge zum Fach Inhalt: Eine Übersicht über alle Beiträge zum Fach
--> -->
<!DOCTYPE html> <main>
<html lang="de">
<head> <h1>Informatik</h1>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body> <p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
<nav style="background:#808080; height: 60px;"> dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
<div style="float:left; text-align: center;"> clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
<a href="../index.php"> consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
<img src="../images/logo.png" alt="" style="height: 44px;"> sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
</a> sea takimata sanctus est Lorem ipsum dolor sit amet.
| </p>
<a href = "informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a> <h2>Artikel:</h2>
| <div>
<a href = "mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a> <a href="datenschutzVSdatensicherheit.php">Datenschutz vs. Datensicherheit</a>
| </div>
<a href = "physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a> </main>
|
<a href = "profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Informatik</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<h2>Artikel:</h2>
<div>
<a href="../articles/datenschutz.php">Datenschutz vs. Datensicherheit</a>
</div>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../legal/impressum.php">Impressum</a>
<a href="../legal/datenschutz.php">Datenschutz</a>
<a href="../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
+53
View File
@@ -0,0 +1,53 @@
<?php
$error = $error ?? null;
?>
<!--
Form: Login-Bereich
Funktion: Benutzerauthentifizierung und Zugang zum eigenen Profil, Erstellen von Beiträgen, etc.
-->
<main class="login-page">
<div class="login-container">
<h1>Bitte anmelden</h1>
<?php if ($error): ?>
<p style="color:red;">
<?php echo htmlspecialchars($error); ?>
</p>
<?php endif; ?>
<form method="post" action="index.php?pfad=login">
<p class="input-label">Benutzername/E-Mail-Adresse:</p>
<input type="email"
name="email"
class="login-input"
placeholder="E-Mail-Adresse"
required
autofocus>
<p class="input-label">Passwort:</p>
<input type="password"
name="password"
class="login-input"
placeholder="Passwort"
required>
<button type="submit"
value="anmelden"
name="loginSubmit"
class="button">
anmelden
</button>
<div class="register-link">
<a href="index.php?pfad=register">
Noch keinen Account? Jetzt hier registrieren!
</a>
</div>
</form>
</div>
</main>
+15 -63
View File
@@ -2,69 +2,21 @@
Seite: Mathe Seite: Mathe
Inhalt: Eine Übersicht über alle Beiträge zum Fach Inhalt: Eine Übersicht über alle Beiträge zum Fach
--> -->
<!DOCTYPE html> <main>
<html lang="de">
<head> <h1>Mathe</h1>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body> <p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<nav style="background:#808080; height: 60px;"> <h2>Artikel:</h2>
<div style="float:left; text-align: center;"> <div>
<a href="../index.php"> <a href="pythagoras.php">Satz des Pythagoras</a>
<img src="../images/logo.png" alt="" style="height: 44px;"> </div>
</a> </main>
|
<a href = "informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Mathe</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<h2>Artikel:</h2>
<div>
<a href="../articles/pythagoras.php">Satz des Pythagoras</a>
</div>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../legal/impressum.php">Impressum</a>
<a href="../legal/datenschutz.php">Datenschutz</a>
<a href="../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
+46
View File
@@ -0,0 +1,46 @@
<!--
Seite: Nutzungsbedingungen
Inhalt: Regelungen für die Nutzung der Plattform (AGBs und so...)
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="../images/logos/logo_icon.ico">
<link rel="stylesheet" href="../css/main.css">
<link rel="stylesheet" href="../css/navbar.css">
<link rel="stylesheet" href="../css/footer.css">
<title>EduForge</title>
</head>
<body>
<?php
include_once 'includes/navbar.php';
?>
<main>
<h1>Nutzungsbedingungen</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
+15 -63
View File
@@ -2,70 +2,22 @@
Seite: Physik Seite: Physik
Inhalt: Eine Übersicht über alle Beiträge zum Fach Inhalt: Eine Übersicht über alle Beiträge zum Fach
--> -->
<!DOCTYPE html> <main>
<html lang="de">
<head> <h1>Physik</h1>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body> <p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<nav style="background:#808080; height: 60px;"> <h2>Artikel:</h2>
<div style="float:left; text-align: center;"> <div>
<a href="../index.php"> <a href="tunneleffekt.php">Der Tunneleffekt</a>
<img src="../images/logo.png" alt="" style="height: 44px;"> </div>
</a>
|
<a href = "informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a> </main>
</div>
</nav>
<main>
<h1>Physik</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<h2>Artikel:</h2>
<div>
<a href="../articles/tunneleffekt.php">Der Tunneleffekt</a>
</div>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="../legal/impressum.php">Impressum</a>
<a href="../legal/datenschutz.php">Datenschutz</a>
<a href="../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
+164 -78
View File
@@ -1,88 +1,174 @@
<!-- <?php
Seite: Profil include_once 'php/controller/profile-controller.php';
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
-->
<!DOCTYPE html>
<html lang="de">
<head> $user = $user ?? null;
<meta charset="utf-8"> $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
<meta name="description" content="EduForge"> ?>
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body> <main class="form-page">
<div class="flexbox">
<nav style="background:#808080; height: 60px;"> <div class="container">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a> <?php if (!empty($error)): ?>
<p class="alert-message is-error">
<?php echo htmlspecialchars($error); ?>
</p>
<?php endif; ?>
<form method="post" action="index.php?pfad=profile">
<label class="input-label">Vorname</label>
<input type="text"
name="vorname"
class="login-input"
value="<?php echo htmlspecialchars($_POST["vorname"] ?? $user["vorname"] ?? ""); ?>"
<?php echo $isEditMode ? "" : "readonly"; ?>
required>
<label class="input-label">Nachname</label>
<input type="text"
name="nachname"
class="login-input"
value="<?php echo htmlspecialchars($_POST["nachname"] ?? $user["nachname"] ?? ""); ?>"
<?php echo $isEditMode ? "" : "readonly"; ?>
required>
<label class="input-label">Email-Adresse</label>
<input type="email"
name="email"
class="login-input"
value="<?php echo htmlspecialchars($_POST["email"] ?? $user["email"] ?? ""); ?>"
<?php echo $isEditMode ? "" : "readonly"; ?>
required>
<label class="input-label">
<?php echo $isEditMode ? "Neues Passwort" : "Passwort"; ?>
</label>
<?php if ($isEditMode): ?>
<input type="password"
name="password"
class="login-input"
placeholder="Leer lassen, wenn es gleich bleiben soll">
<?php else: ?>
<input type="password"
name="password"
class="login-input"
value="********"
readonly>
<?php endif; ?>
<br><br>
<?php if ($isEditMode): ?>
<button type="submit"
name="saveProfile"
class="button">
Speichern
</button>
<a href="index.php?pfad=profile" class="button">
Abbrechen
</a>
<?php else: ?>
<a href="index.php?pfad=profile&edit=1" class="button">
Bearbeiten
</a>
<?php endif; ?>
</form>
<br>
<a href="index.php?pfad=deleteAccount" class="button">
Account löschen
</a>
<br><br>
<a href="index.php?pfad=logout" class="button">
Abmelden
</a>
</div> </div>
</nav>
<main> <div class="container">
<h2 class="section-title">Meine Beiträge</h2>
<hr> <div class="articles-list">
<div> <?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<div>
<h1>Benutzerdaten ändern</h1> <p class="alert-message is-error">
<a href="/users"><img src="../images/logo.png" alt="" width="120" height="72"></a> Es ist ein interner Fehler aufgetreten. Bitte versuche es erneut.
</div> </p>
<div>
<div> <?php elseif (isset($userArticles) && count($userArticles) > 0): ?>
<label id="Vorname">Vorname</label>
<input type="text" name="Vorname" required placeholder="Vorname" value="<?php //DB-Daten ?>"> <?php foreach ($userArticles as $userArticle): ?>
</div> <div class="article-item">
<div> <div class="article-meta">
<label id="Nachname">Nachname</label> <span class="article-date">
<input type="text" name="Nachname" required placeholder="Nachname" value="<?php //DB-Daten ?>"> <?php echo htmlspecialchars($userArticle->getCreationDate()); ?>
</div> </span>
<div>
<label id="Email">Email-Adresse</label> <span class="article-category">
<input type="email" name="Email" required placeholder="mustermann@web.de" value="<?php //DB-Daten ?>"> <?php echo htmlspecialchars($userArticle->getCategory()); ?>
</div> </span>
<div> </div>
<label id="Passwort">Passwort</label>
<input type="password" name="Passwort" required placeholder="Passwort"> <h3 class="article-title">
</div> <?php echo htmlspecialchars($userArticle->getTitle()); ?>
<div> </h3>
<br>
<button type="submit" name="submit"><i></i> Speichern</button> <?php
</div> $tags = $userArticle->getTags();
<div> if (isset($tags) && !empty($tags)):
<br> ?>
<button type="button" name="NutzerLoeschen">Account löschen</button> <div class="article-view-bottom-section">
</div> <div class="article-view-tags-label">Tags:</div>
<div class="article-view-tags-list">
<?php
$tagArray = is_array($tags) ? $tags : explode(',', $tags);
foreach ($tagArray as $tag):
$trimmedTag = trim($tag);
if (!empty($trimmedTag)):
?>
<span class="article-view-tag-item">
<?php echo htmlspecialchars($trimmedTag); ?>
</span>
<?php
endif;
endforeach;
?>
</div>
</div>
<?php endif; ?>
<a href="index.php?pfad=updateArticle&id=<?php echo $userArticle->getID(); ?>"
class="edit-link-button">
Bearbeiten
</a>
</div>
<?php endforeach; ?>
<?php else: ?>
<p>Du hast noch keine Beiträge erstellt.</p>
<button type="button"
class="button"
onclick="window.location.href='index.php?pfad=createArticle';">
Beitrag erstellen!
</button>
<?php endif; ?>
<?php unset($_SESSION["message"]); ?>
</div> </div>
</div> </div>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;"> </div>
<a href="../legal/impressum.php">Impressum</a> </main>
<a href="../legal/datenschutz.php">Datenschutz</a>
<a href="../legal/nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
+63
View File
@@ -0,0 +1,63 @@
<?php
$error = $error ?? null;
?>
<!--
Form: Registrierung
Funktion: Erstellung neuer Benutzerkonten
-->
<main class="login-page">
<div class="login-container">
<h1>Jetzt Registrieren!</h1>
<?php if (!empty($error)): ?>
<p class="alert-message is-error" style="color:red;">
<?php echo htmlspecialchars($error); ?>
</p>
<?php endif; ?>
<form method="post" action="index.php?pfad=register">
<p class="input-label">Email:</p>
<input type="email"
name="email"
class="login-input"
placeholder="mustermann@web.de"
value="<?php echo htmlspecialchars($_POST["email"] ?? ""); ?>"
required>
<p class="input-label">Vorname:</p>
<input type="text"
name="vorname"
class="login-input"
placeholder="Max"
value="<?php echo htmlspecialchars($_POST["vorname"] ?? ""); ?>"
required>
<p class="input-label">Nachname:</p>
<input type="text"
name="nachname"
class="login-input"
placeholder="Mustermann"
value="<?php echo htmlspecialchars($_POST["nachname"] ?? ""); ?>"
required>
<p class="input-label">Passwort:</p>
<input type="password"
name="password"
class="login-input"
placeholder="Passwort"
required>
<button type="submit"
value="register"
name="registerSubmit"
class="button">
kostenlos registrieren
</button>
</form>
</div>
</main>
+116
View File
@@ -0,0 +1,116 @@
<?php
session_start();
$results = $_SESSION["search_results"] ?? [];
$query = $_SESSION["search_query"] ?? "";
$resultCount = count($results);
?>
<!--
Seite: Suchergebnisse
Inhalt: Zeigt die Ergebnisse einer Suche an
-->
<div class="s-res-layout-grid">
<!-- Links: Seitenleiste für Filter und Suche -->
<aside class="s-res-sidebar">
<!-- Sortierfuntion Box und Such Box-->
<form action="php/controller/search-results-controller.php" method="GET" class="s-res-sidebar-form">
<div class="s-res-sidebar-box">
<h3 class="s-res-sidebar-title">Suche anpassen</h3>
<input type="search" id="site-search" name="q" placeholder="Suchen..." class="nav__search" value="<?php echo htmlspecialchars($query); ?>" maxlength="50" required>
<button type="submit" class="nav__search-button">Suchen</button>
</div>
<div class="s-res-sidebar-box">
<h3 class="s-res-sidebar-title">Sortierung</h3>
<?php $currentSort = $_SESSION['search_sort'] ?? 'alphabet'; ?>
<div class="s-res-filter-group">
<label class="s-res-filter-option">
<input type="radio" name="sort" value="alphabet" <?php echo $currentSort === 'alphabet' ? 'checked' : ''; ?> onchange="this.form.submit()">
<span>Alphabetisch</span>
</label>
<!-- Noch disabled, da likes noch nicht implementiert-->
<label class="s-res-filter-option">
<input type="radio" name="sort" value="likes" <?php echo $currentSort === 'likes' ? 'checked' : ''; ?> disabled>
<span style="color: #94a3b8;">Beliebtheit (Likes)</span>
</label>
<label class="s-res-filter-option">
<input type="radio" name="sort" value="newest" <?php echo $currentSort === 'newest' ? 'checked' : ''; ?> onchange="this.form.submit()">
<span>Neueste Beiträge</span>
</label>
<label class="s-res-filter-option">
<input type="radio" name="sort" value="oldest" <?php echo $currentSort === 'oldest' ? 'checked' : ''; ?> onchange="this.form.submit()">
<span>Älteste Beiträge</span>
</label>
</div>
</div>
</form>
</aside>
<main class="s-res-main-content">
<div class="s-res-header">
<h1 class="s-res-main-title">Suchergebnisse</h1>
<p class="s-res-meta"><?php echo $resultCount; ?> Treffer für Ihre Suchanfrage "<?php echo htmlspecialchars($query); ?>"</p>
</div>
<!-- Ergebnisliste -->
<div class="s-res-list">
<?php
if (!empty($results)): ?>
<?php foreach ($results as $item): ?>
<div class="s-res-item">
<div class="s-res-content">
<h2 class="s-res-item-title">
<a href="index.php?pfad=showArticle&id=<?php echo $item['id']; ?>" class="s-res-link">
<?php echo htmlspecialchars($item['title']); ?>
</a>
</h2>
<p class="s-res-author">Von: <span class="s-res-author-name"><?php echo htmlspecialchars($item['author']); ?></span></p>
</div>
<div class="s-res-arrow">&rarr;</div>
</div>
<?php endforeach; ?>
<?php
elseif (isset($_SESSION["search_query"]) && $_SESSION["search_query"] !== "" && $resultCount === 0): ?>
<p>Keine Beiträge zu diesem Suchbegriff gefunden.</p>
<?php
elseif (isset($_SESSION["message"]) && $_SESSION["message"] == "missing_parameters"): ?>
<p>Bitte überprüfe deine Sucheingabe und versuche es erneut!</p>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
</div>
<div class="s-res-pagination-footer">
<!-- Auswahl der Ergebnisse pro Seite -->
<div class="s-res-limit-selector">
<label for="s-res-per-page" class="s-res-limit-label">Ergebnisse pro Seite:</label>
<select id="s-res-per-page" name="limit" class="s-res-limit-select">
<option value="10" selected>10</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
<div class="s-res-page-navigation">
<button type="button" class="s-res-page-btn" disabled>&laquo;</button>
<button type="button" class="s-res-page-btn s-res-page-btn-active">1</button>
<button type="button" class="s-res-page-btn">&raquo;</button>
</div>
</div>
</main>
</div>
+84
View File
@@ -0,0 +1,84 @@
<?php
include_once 'php/controller/showArticle-controller.php';
?>
<!--
Seite: Anzeige für Beiträge
Funktion: Stellt einen übergebenen Beitrag dar.
-->
<!-- Hauptcontainer für die Beitragsansicht (Ausschließlich der Content-Bereich) -->
<main class="article-view-container">
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<p class="alert-message is-error">
Es ist ein interner Fehler aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "missing_id"): ?>
<p class="alert-message is-error">
Es ist ein Fehler aufgetreten. Die ID konnte nicht ausgelesen werden. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "missing_parameters"): ?>
<p class="alert-message is-error">
Jeder Beitrag muss einen Titel, Kategorie und Inhalt besitzen.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "article_updated"): ?>
<p class="alert-message is-success">
Dein Beitrag wurde erfolgreich bearbeitet!
</p>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
<!-- Metadaten & Titel -->
<div class="article-view-top-section">
<?php if (isset($category) && !empty($category)): ?>
<span class="article-view-category"><?php echo htmlspecialchars($category); ?></span>
<?php endif; ?>
<h1 class="article-view-title">
<?php if (isset($title)) { echo htmlspecialchars($title); } ?>
</h1>
<div class="article-view-meta">
<?php if (isset($author) && !empty($author)): ?>
<span class="article-view-author">Von: <strong><?php echo htmlspecialchars($author); ?></strong></span>
<?php endif; ?>
</div>
</div>
<!-- Beitrags-Inhalt -->
<div class="article-view-content">
<?php if (isset($content)): ?>
<!-- nl2br für Zeilenumbrüche -->
<div class="article-view-body"><?php echo nl2br(htmlspecialchars($content)); ?></div>
<?php endif; ?>
</div>
<!-- Beitrags-Endbereich (Tags) -->
<?php if (isset($tags) && !empty($tags)): ?>
<div class="article-view-bottom-section">
<div class="article-view-tags-label">Tags:</div>
<div class="article-view-tags-list">
<?php
// Falls $tags ein String ist (z.B. "Web, CSS"), in ein Array umwandeln
$tagArray = is_array($tags) ? $tags : explode(',', $tags);
foreach ($tagArray as $tag):
$trimmedTag = trim($tag);
if (!empty($trimmedTag)):
?>
<span class="article-view-tag-item"><?php echo htmlspecialchars($trimmedTag); ?></span>
<?php
endif;
endforeach;
?>
</div>
</div>
<?php endif; ?>
</main>
+31
View File
@@ -0,0 +1,31 @@
<?php
include_once "php/controller/showCategory-controller.php";
?>
<main>
<h1><?php if (isset($category) && !empty($category)){ echo htmlspecialchars($category); } ?></h1>
<div class="s-res-list">
<?php
if (!empty($articles)): ?>
<?php foreach ($articles as $article): ?>
<div class="s-res-item">
<div class="s-res-content">
<h2 class="s-res-item-title">
<a href="index.php?pfad=showArticle&id=<?php echo $article->getId(); ?>" class="s-res-link">
<?php echo htmlspecialchars($article->getTitle()); ?>
</a>
</h2>
<p class="s-res-author">Von: <span class="s-res-author-name"><?php echo htmlspecialchars($article->getAuthor()); ?></span></p>
</div>
<div class="s-res-arrow">&rarr;</div>
</div>
<?php endforeach; ?>
<?php
else: ?>
<p> Es sind noch keine Beiträge in dieser Kategorie enthalten.</p>
<?php endif; ?>
</div>
</main>
+152
View File
@@ -0,0 +1,152 @@
<?php
$user = $user ?? null;
if (!isset($_SESSION["user"])) {
header("Location: index.php?pfad=login");
exit();
}
include_once 'php/controller/showArticle-controller.php';
?>
<!--
Seite: Beitrag erstellen
Inhalt: Formular für die Erstellung eines neuen Beitrags
-->
<form method="post" action="php/controller/updateArticle-controller.php?id=<?php if(isset($id) && !empty($id)){echo htmlspecialchars($id);}else{$_SESSION["message"] = "missing_id";} ?>" id="editor-form" class="article-editor-scope.editor-container article-editor-scope editor-container">
<main class="editor-main">
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "internal_error"): ?>
<p class="alert-message is-error">
Es ist ein interner Fehler beim Speichern aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "missing_id"): ?>
<p class="alert-message is-error">
Es ist ein Fehler aufgetreten. Die ID konnte nicht ausgelesen werden. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "missing_parameters"): ?>
<p class="alert-message is-error">
Jeder Beitrag muss einen Titel, Kategorie und Inhalt besitzen.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_title"): ?>
<p class="alert-message is-error">
Der Titel enthält ungültige Zeichen oder erfüllt die Länge von 5-120 Zeichen nicht.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_content"): ?>
<p class="alert-message is-error">
Der Text erlaubt eine Länge von 10 bis maximal 7.000 Zeichen (ca. 1.000 Wörter).
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_category"): ?>
<p class="alert-message is-error">
Die ausgewählte Kategorie ist ungültig.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "invalid_tags"): ?>
<p class="alert-message is-error">
Ungültige Schlagworte gefunden. Erlaubt sind nur Buchstaben, Zahlen, Leerzeichen und Bindestriche (2-20 Zeichen).
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "validation_missing"): ?>
<p class="alert-message is-error">
Bei der Validierung deiner Daten ist ein Fehler aufgetreten. Bitte versuche es erneut.
</p>
<?php endif; ?>
<?php if (isset($_SESSION["message"]) && $_SESSION["message"] == "unauthorized_access"): ?>
<p class="alert-message is-error">
Sie sind nicht berechtigt, diesen Beitrag zu bearbeiten.
</p>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
<input type="text" id="title" name="title"
value="<?php
if (isset($title) && !empty($title)){echo htmlspecialchars($title);
}elseif (isset($_SESSION['old_title']) && !empty($_SESSION['old_title'])){
echo htmlspecialchars($_SESSION['old_title']);
unset($_SESSION['old_title']);
}
?>"
placeholder="Titel hier eingeben" required>
<textarea id="content" name="content" placeholder="Schreibe deinen Beitrag...">
<?php
if (isset($content) && !empty($content)){echo htmlspecialchars($content);
}elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
echo htmlspecialchars($_SESSION['old_content']);
unset($_SESSION['old_content']);
}
?>
</textarea>
</main>
<!-- Seitenleiste -->
<aside class="editor-sidebar">
<div class="sidebar-block">
<button type="submit" id="editor-button" class="button">Änderungen speichern</button>
</div>
<div class="sidebar-block">
<label for="category">Kategorie <span class="required">*</span></label>
<select id="category" name="category" required>
<option disabled selected>Kategorie wählen...</option>
<optgroup label="Sprachen">
<option value="deutsch">Deutsch</option>
<option value="englisch">Englisch</option>
<option value="franzoesisch">Französisch</option>
<option value="latein">Latein</option>
<option value="literatur">Literatur</option>
</optgroup>
<optgroup label="MINT">
<option value="mathe">Mathematik</option>
<option value="biologie">Biologie</option>
<option value="chemie">Chemie</option>
<option value="physik">Physik</option>
<option value="informatik">Informatik</option>
<option value="astronomie">Astronomie</option>
</optgroup>
<optgroup label="Gesellschaft & Werte">
<option value="geschichte">Geschichte</option>
<option value="erdkunde">Erdkunde</option>
<option value="sozialkunde">Sozialkunde</option>
<option value="wirtschaft">Wirtschaftskunde</option>
<option value="religion">Religion</option>
<option value="ethik">Ethikunterricht</option>
<option value="philosophie">Philosophie</option>
<option value="psychologie">Psychologie</option>
<option value="kunst">Kunst</option>
<option value="musik">Musik</option>
<option value="theater">Theater</option>
</optgroup>
<optgroup label="Technik & Praxis">
<option value="technik">Technik</option>
<option value="werken">Werken</option>
<option value="hauswirtschaft">Hauswirtschaft</option>
<option value="sport">Sport</option>
</optgroup>
</select>
</div>
<div class="sidebar-block">
<label for="tags">Schlagwörter</label>
<input type="text" id="tags" name="tags"
value="<?php
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);
} elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
echo htmlspecialchars($_SESSION['old_tags']);
unset($_SESSION['old_tags']);
}
?>"
placeholder="z.B. Technik, IT (mit Komma trennen)">
</div>
</aside>
</form>
+116
View File
@@ -0,0 +1,116 @@
/* editor in Flexbox */
.article-editor-scope.editor-container {
display: flex;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
color: #1e1e1e;
background-color: #f0f2f5;
box-sizing: border-box;
max-width: 1200px;
margin: 0 auto; /* Zentriert den gesamten Container horizontal */
width: 100%;
}
.article-editor-scope * {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Hauptbereich */
.article-editor-scope .editor-main {
flex: 1;
padding: 40px;
display: flex;
flex-direction: column;
gap: 20px;
background: #ffffff;
}
.article-editor-scope #title {
font-size: 2.5rem;
font-weight: 700;
border: none;
outline: none;
width: 100%;
background: transparent;
}
.article-editor-scope #content {
flex: 1;
font-size: 1.1rem;
line-height: 1.6;
border: none;
outline: none;
resize: none;
width: 100%;
background: transparent;
}
/* Seitenleiste */
.article-editor-scope .editor-sidebar {
width: 300px;
background-color: #ffffff;
border-left: 1px solid #e0e0e0;
padding: 20px;
display: flex;
flex-direction: column;
gap: 24px;
}
.article-editor-scope .sidebar-block {
display: flex;
flex-direction: column;
gap: 8px;
}
.article-editor-scope .sidebar-block label {
font-weight: 600;
font-size: 0.9rem;
}
.article-editor-scope .required {
color: #d94f4f;
}
/* Formularelemente innerhalb der Editor-Sidebar */
.article-editor-scope .editor-sidebar select,
.article-editor-scope .editor-sidebar input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 0.9rem;
background: #ffffff;
}
/* Button-Zeugs */
.button#editor-button {
padding: 18px 12px;
}
/* Responsive Anpassungen unter 760px (für z.B. Smartphones) */
@media (max-width: 760px) {
.article-editor-scope.editor-container {
/* Sidebar nach unten */
flex-direction: column;
}
.article-editor-scope .editor-main {
/* weniger Innenabstand */
padding: 20px;
}
.article-editor-scope #content {
/* Verhindert, dass das Textfeld auf kleinen Displays kollabiert */
min-height: 300px;
}
.article-editor-scope .editor-sidebar {
width: 100%;
/* Entfernt den linken Rand und setzt ihn nach oben als Trenner */
border-left: none;
border-top: 1px solid #e0e0e0;
}
}
+19
View File
@@ -0,0 +1,19 @@
/* FooterGrundlayout */
footer {
width: 100%;
background: #333d43;
text-align: center;
padding: 10px 0;
}
footer a {
color: white;
text-decoration: none;
margin: 0 12px;
transition: color 0.2s ease; /* Farbwechsel */
}
footer a:hover,
footer a:focus {
color: #0066cc;
}
+138 -39
View File
@@ -1,48 +1,90 @@
main { main {
max-width:1200px; max-width:1200px;
margin: 0 auto; margin: 0 auto;
padding: 20px; padding: 20px;
font-family: Arial;
width: 100%;
box-sizing: border-box;
}
body {
background-color: #eef2f7;
color: #1f2937;
margin: 0;
min-height: 100vh;
display: grid;
grid-template-rows: auto 1fr auto; /* Header(auto), Inhalt (bekommt Rest), Footer(auto) */
}
a, button, input, select, textarea, label, main{
font-family: Arial, Helvetica, sans-serif;
}
h1 {
text-transform: uppercase;
} }
.flexbox { .flexbox {
display: flex; display: flex;
flex-direction: column; flex-direction: row;
gap: 20px; flex-wrap: wrap;
margin-top: 30px; gap: 20px;
margin-top: 30px;
} }
.container { .container {
border: 1px solid white; background-color: white;
padding: 15px; border-radius: 8px;
border-radius: 8px; padding: 15px;
background-color: coral; border: 1px solid #dbe3ec;
transition: transform 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: transform 0.2s, box-shadow 0.2s;
flex: 1 1 300px;
}
.container:hover {
transform: translateY(-3px);
box-shadow: 0 6px 18px rgba(0,0,0,0.12);
} }
.category-link { .category-link {
display: block; display: block;
text-align: left; text-align: left;
text-decoration: none; text-decoration: none;
font-weight: bold; font-weight: bold;
padding: 10px; padding: 12px;
background-color: blue; background-color: #2563eb;
color: white; color: white;
border-radius: 4px; border-radius: 8px;
margin-bottom: 10px; margin-bottom: 10px;
transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.category-link:hover {
background-color: #1d4ed8;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
} }
.article-link a { .article-link a {
color: blue; color: #1f2937;
text-decoration: none; text-decoration: none;
font-weight: bold;
transition: color 0.2s;
}
.article-link a:hover {
color: #2563eb;
text-decoration: underline;
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.container { .container {
padding: 25px; padding: 25px;
} }
} }
/* Seite wird horizontal und vertikal zentriert */ /* Seite wird horizontal und vertikal zentriert */
@@ -58,9 +100,10 @@ main {
width: 90%; width: 90%;
max-width: 450px; max-width: 450px;
padding: 30px; padding: 30px;
border: 1px solid white; border: 1px solid #dbe3ec;
border-radius: 10px; border-radius: 10px;
background-color: white; background-color: white;
box-shadow: 0 6px 20px rgba(0,0,0,0.1);
} }
.logo-wrapper { .logo-wrapper {
@@ -76,54 +119,110 @@ main {
.login-container h1 { .login-container h1 {
text-align: center; text-align: center;
margin-bottom: 25px; margin-bottom: 25px;
font-size: 1.5rem; font-size: 1.7rem;
color: #1e293b;
} }
.input-label { .input-label {
margin-bottom: 5px; margin-bottom: 5px;
font-weight: bold; font-weight: bold;
width: 100%; width: 100%;
color: #1f2937;
}
.input-label {
margin-bottom: 5px;
font-weight: bold;
width: 100%;
color: #1f2937;
} }
.login-input { .login-input {
width: 100%; width: 100%;
padding: 12px; padding: 12px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid white; border: 1px solid #d1d5db;
border-radius: 4px; border-radius: 6px;
box-sizing: border-box; box-sizing: border-box;
font-size: 1rem;
background-color: white;
}
.login-input:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
} }
.checkbox-wrapper { .checkbox-wrapper {
margin-bottom: 20px; margin-bottom: 20px;
color: #1f2937;
} }
.login-button { .button {
width: 100%; width: 100%;
padding: 12px; padding: 12px;
background-color: blue; background-color: #2563eb;
color: white; color: white;
border: none; border: none;
border-radius: 4px; border-radius: 8px;
font-size: 1rem; font-size: 1rem;
font-weight: bold;
cursor: pointer; cursor: pointer;
transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
} }
.login-button:hover { .button:hover {
background-color: blue; background-color: #1d4ed8;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
} }
.register-link { .register-link {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
font-size: 0.9rem; font-size: 0.9rem;
color: #1f2937;
}
.register-link a {
color: #2563eb;
text-decoration: none;
font-weight: bold;
transition: color 0.2s;
}
.register-link a:hover {
color: #1d4ed8;
text-decoration: underline;
} }
/* Versteckt das doppelte Label fuer Screenreader/Accessibility */ /* Versteckt das doppelte Label fuer Screenreader/Accessibility */
.screenreader-only { .screenreader-only {
display: none; display: none;
}
/* Allgemeine Formularseiten */
.form-page {
display: flex;
justify-content: center;
padding: 40px 20px;
} }
body { .form-container {
background-color: coral; width: 90%;
max-width: 600px;
padding: 30px;
background-color: white;
border: 1px solid #dbe3ec;
border-radius: 10px;
box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.form-container {
flex: 1 1 450px;
padding: 30px;
background-color: white;
border: 1px solid #dbe3ec;
border-radius: 10px;
box-shadow: 0 6px 20px rgba(0,0,0,0.1);
box-sizing: border-box;
} }
+29
View File
@@ -0,0 +1,29 @@
.alert-message {
padding: 12px 16px;
margin: 12px 0;
border-radius: 6px;
border: 1px solid transparent;
font-family: sans-serif;
font-size: 14px;
font-weight: 500;
line-height: 1.5;
display: flex;
align-items: center;
gap: 10px;
}
/* Rote Fehlermeldung */
.alert-message.is-error {
color: #ba1a1a;
background-color: #ffeede;
border-color: #ffb4ab;
}
/* Grüne Erfolgsmeldung */
.alert-message.is-success {
color: #006e2c;
background-color: #e8f5e9;
border-color: #b2dfdb;
}
+289
View File
@@ -0,0 +1,289 @@
/*
CSS für die navbar
*/
.nav {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #333d43;
padding: 0 1rem;
}
.nav__left,
.nav__right {
display: flex;
align-items: center;
}
.nav__logo img {
height: 3rem;
}
.nav__center {
display: flex;
align-items: center;
}
.nav__item {
position: relative;
margin: 0 0.5rem;
}
.nav__dropdown-toggle {
background: none;
border: none;
cursor: pointer;
font-weight: 600;
padding: 0.5rem 1rem;
color: #fff;
text-decoration: none;
}
.nav__dropdown-menu {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #f9f9f9;
min-width: 12rem;
box-shadow: 0 2px 5px rgba(0,0,0,.15);
padding: 0.5rem 0;
}
.nav__dropdown-menu a {
padding: 0.5rem 1rem; /* Abstand um den Text */
color: #333;
text-decoration: none;
font-weight: 600;
}
.nav__link {
display: inline-block;
font-weight: 600;
background: none;
border: none;
cursor: pointer;
padding: 0.5rem 1rem;
color: #fff;
text-decoration: none;
}
.nav__button {
display: inline-block;
background: #fff;
border: none;
border-radius: 4px;
padding: 0.5rem 1rem;
cursor: pointer;
color: #333;
text-decoration: none;
font-weight: 600;
margin-left: 0.5rem;
white-space: nowrap;
}
.nav__search {
display: flex;
align-items: center;
border-radius: 4px; /* Abgerundete Ecken */
background: #fff;
margin: 0 0.5rem;
}
.nav__search-button {
display: inline-block;
background: #fff;
border: none;
border-radius: 4px;
padding: 0.4rem 0.6rem;
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
margin-left: 4px;
}
.nav__dropdown:hover .nav__dropdown-menu {
display: block;
}
.nav__checkbox {
display: none;
}
.nav__mobile-submenu {
display: block;
}
/* Responsive Anpassung unter 1210px */
@media (max-width: 1210px) {
.nav {
flex-wrap: wrap; /* zweite Nav-Zeile*/
padding: 0.5rem 1rem;
}
.nav__left {
order: 1;
flex: 1; /* nimmt den Platz ganz links ein */
}
.nav__right {
order: 2;
flex: 1;
justify-content: flex-end; /* schiebt Buttons nach ganz rechts */
}
.nav__center {
order: 3;
flex-basis: 100%; /* Erzwingt, dass dieses Element eine eigene Zeile einnimmt */
justify-content: center; /*zentriert die Links in der zweiten Zeile */
padding: 0.5rem 0;
border-top: 1px solid rgba(255,255,255,0.1); /* Optionale Trennlinie */
margin-top: 0.5rem;
}
.nav__item {
margin: 0.25rem;
}
}
#mobile-nav {
display: none;
}
/* Responsive Anpassungen unter 760px (für z.B. Smartphones) */
@media (max-width: 800px) {
.nav {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 1rem;
}
.nav__logo img {
height: 50px;
}
.nav__left {
order: 2;
flex: 1;
justify-content: flex-start;
}
.nav__right {
order: 3;
width: 100%;
display: flex;
margin-top: 0.5em;
}
#mobile-nav {
display: block;
order: 1;
background: #333d43;
border: none;
color: #fff;
font-size: 1.5rem;
padding: 0.5rem 0.1rem;
border-radius: 0.2rem;
cursor: pointer;
}
.nav__search {
display: flex;
width: 100%;
margin: 0;
}
.nav__search-button {
display: inline-block;
background: #fff;
border: none;
border-radius: 4px;
padding: 0.4rem 0.6rem;
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
margin-left: 4px;
}
.nav__search-button:hover {
background-color: #f8f9fa;
}
/* restliche desktop-navbar aus */
.nav__center,
.nav__right .nav__button,
.nav__right .nav__link {
display: none;
}
/* off canvas menu */
.nav__mobile-menu {
display: flex;
flex-direction: column;
position: fixed;
top: 0;
left: -100%; /* kommt von links */
width: 280px;
height: 100vh;
background: #333d43;
z-index: 1000;
transition: left 0.3s ease;
padding: 2rem 1rem;
box-shadow: 2px 0 10px rgba(0,0,0,0.5);
overflow-y: auto;
/* Genug Abstand oben rechts, damit Links nicht hinter dem X liegen */
padding: 4rem 1.5rem 2rem 1.5rem;
}
.nav__checkbox:checked ~ .nav__mobile-menu {
left: 0;
}
.nav_mobile-menu.is-active {
left: 0;
}
.nav__close-btn {
position: absolute;
top: 1rem;
right: 1.5rem;
font-size: 2rem;
color: #fff;
cursor: pointer;
line-height: 1;
user-select: none;
transition: color 0.2s ease, transform 0.2s ease;
}
.nav__mobile-menu a {
color: #fff;
text-decoration: none;
font-size: 1.2rem;
font-weight: 600;
display: block;
padding: 0.5rem 1rem;
border-bottom: 1px solid #333d43;
}
.nav__mobile-submenu {
display: block;
list-style: none;
padding: 0;
background: rgba(0, 0, 0, 0.15);
}
.nav__mobile-label {
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
font-size: 1.2rem;
font-weight: 600;
padding: 0.8rem 1rem;
cursor: pointer;
}
}
+89
View File
@@ -0,0 +1,89 @@
/*
CSS für die Profilseite
*/
/* Roter Button für Account löschen */
.delete-account-button {
background-color: #dc2626;
margin-bottom: 0;
}
.delete-account-button:hover {
background-color: #b91c1c;
}
/* Beitragsliste Styling */
.section-title {
margin-top: 0;
margin-bottom: 25px;
font-size: 1.5rem;
color: #1f2937;
border-bottom: 2px solid #eef2f7;
padding-bottom: 10px;
}
.articles-list {
display: flex;
flex-direction: column;
gap: 20px;
}
.article-item {
padding: 15px;
border: 1px solid #e5e7eb;
border-radius: 8px;
background-color: #f9fafb;
position: relative;
}
.article-meta {
display: flex;
justify-content: space-between;
font-size: 0.85rem;
color: #6b7280;
margin-bottom: 8px;
}
.article-category {
font-weight: bold;
color: #2563eb;
}
.article-title {
margin: 0 0 10px 0;
font-size: 1.2rem;
color: #1f2937;
}
.article-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 15px;
}
.tag {
font-size: 0.75rem;
background-color: #e5e7eb;
color: #374151;
padding: 3px 8px;
border-radius: 4px;
}
/* Bearbeiten-Button als Link deklariert */
.edit-link-button {
display: inline-block;
text-decoration: none;
font-size: 0.9rem;
font-weight: bold;
color: #2563eb;
border: 1px solid #2563eb;
padding: 6px 12px;
border-radius: 6px;
transition: background-color 0.2s, color 0.2s;
}
.edit-link-button:hover {
background-color: #2563eb;
color: white;
}
+263
View File
@@ -0,0 +1,263 @@
/*
CSS für die Suchergebnis-Seite
*/
/* Container und Layout-Schutz vor globalen Styles */
.s-res-layout-grid {
box-sizing: border-box;
max-width: 95%; /* Nutzt jetzt 95% der Bildschirmbreite statt starrer Pixel */
width: 95%; /* Erhöht das Limit für extrem große Monitore von 1200px auf 1600px */
margin: 2rem auto;
padding: 0 1rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: #212529;
line-height: 1.5;
/* Grid für die Zweispaltigkeit */
display: grid;
grid-template-columns: 320px 1fr; /* Seitenleiste leicht verbreitert, Inhalt nimmt den gesamten Rest ein */
gap: 2.5rem; /* Etwas mehr Abstand zwischen Seitenleiste und Inhalt für das breitere Layout */
}
.s-res-layout-grid * {
box-sizing: border-box;
}
/* --- SEITENLEISTE (FILTER & SUCHE) --- */
.s-res-sidebar {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.s-res-sidebar-box {
background-color: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1.25rem;
}
.s-res-sidebar-title {
font-size: 1rem;
font-weight: 700;
color: #1a202c;
margin: 0 0 1rem 0;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Formular & deine Suchleisten-Klassen */
.s-res-search-form {
display: flex;
align-items: center;
}
/* Filter Radio-Buttons */
.s-res-filter-group {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.s-res-filter-option {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
font-size: 0.95rem;
color: #4a5568;
}
.s-res-filter-option input[type="radio"] {
margin: 0;
accent-color: #3182ce;
}
/* --- HAUPTINHALT (ERGEBNISSE) --- */
.s-res-main-content {
min-width: 0;
}
.s-res-header {
margin-bottom: 2rem;
border-bottom: 2px solid #dee2e6;
padding-bottom: 1rem;
}
.s-res-main-title {
font-size: 2rem;
color: #1a202c;
margin: 0 0 0.5rem 0;
font-weight: 700;
}
.s-res-meta {
color: #6c757d;
font-size: 0.95rem;
margin: 0;
}
.s-res-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
/* Einzelner Beitrag */
.s-res-item {
background-color: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1.25rem;
display: flex;
justify-content: space-between;
align-items: center;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.s-res-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
border-color: #cbd5e1;
}
.s-res-content {
flex: 1;
}
.s-res-item-title {
font-size: 1.25rem;
margin: 0 0 0.25rem 0;
font-weight: 600;
}
.s-res-link {
color: #3182ce;
text-decoration: none;
transition: color 0.2s ease;
}
.s-res-link:hover {
text-decoration: underline;
color: #2b6cb0;
}
.s-res-author {
font-size: 0.875rem;
color: #4a5568;
margin: 0;
}
.s-res-author-name {
font-weight: 600;
color: #2d3748;
}
.s-res-arrow {
font-size: 1.5rem;
color: #a0aec0;
padding-left: 1rem;
transition: color 0.2s ease, transform 0.2s ease;
}
.s-res-item:hover .s-res-arrow {
color: #3182ce;
transform: translateX(3px);
}
/* ERGEBNISSE PRO SEITE & PAGINIERUNG */
.s-res-pagination-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid #e2e8f0;
}
/* Dropdown-Auswahl */
.s-res-limit-selector {
display: flex;
align-items: center;
gap: 0.5rem;
}
.s-res-limit-label {
font-size: 0.9rem;
color: #4a5568;
}
.s-res-limit-select {
padding: 0.35rem 1.5rem 0.35rem 0.5rem;
font-size: 0.9rem;
color: #2d3748;
background-color: #ffffff;
border: 1px solid #cbd5e1;
border-radius: 4px;
cursor: pointer;
outline: none;
transition: border-color 0.2s;
/* Diskreter nativer Pfeil-Style */
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://w3.org' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.4rem center;
background-size: 1em;
}
.s-res-limit-select:focus {
border-color: #3182ce;
}
/* Seitennummern Navigation */
.s-res-page-navigation {
display: flex;
gap: 0.25rem;
}
.s-res-page-btn {
background-color: #ffffff;
border: 1px solid #cbd5e1;
color: #4a5568;
padding: 0.35rem 0.75rem;
font-size: 0.9rem;
font-weight: 500;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
}
.s-res-page-btn:hover:not(:disabled) {
background-color: #f8f9fa;
border-color: #cbd5e1;
color: #2d3748;
}
.s-res-page-btn-active {
background-color: #3182ce;
border-color: #3182ce;
color: #ffffff;
cursor: default;
}
.s-res-page-btn:disabled {
background-color: #f1f5f9;
border-color: #e2e8f0;
color: #94a3b8;
cursor: not-allowed;
}
/* Responsive Anpassungen unter 760px (für z.B. Smartphones) */
@media (max-width: 768px) {
.s-res-layout-grid {
grid-template-columns: 1fr; /* Stapelt Seitenleiste und Inhalt untereinander */
gap: 1.5rem;
margin: 1rem auto;
}
.s-res-pagination-footer {
flex-direction: column;
gap: 1rem;
align-items: flex-start;
}
}
+118
View File
@@ -0,0 +1,118 @@
/* Container für den gesamten articleikel */
.article-view-container {
box-sizing: border-box;
max-width: 900px; /* Angenehme Lesebreite für längere Texte */
margin: 3rem auto;
padding: 0 2rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: #212529;
line-height: 1.6;
}
.article-view-container * {
box-sizing: border-box;
}
/* --- KOPFDATEN-BEREICH --- */
.article-view-top-section {
margin-bottom: 2.5rem;
border-bottom: 1px solid #e2e8f0;
padding-bottom: 1.5rem;
}
/* Kategorie-Badge */
.article-view-category {
display: inline-block;
background-color: #ebf8ff;
color: #2b6cb0;
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.25rem 0.75rem;
border-radius: 4px;
margin-bottom: 0.75rem;
}
/* Hauptüberschrift */
.article-view-title {
font-size: 2.5rem;
color: #1a202c;
line-height: 1.2;
margin: 0 0 0.75rem 0;
font-weight: 800;
}
/* Autoren-Zeile */
.article-view-meta {
font-size: 0.95rem;
color: #4a5568;
}
.article-view-author strong {
color: #2d3748;
}
/* --- INHALT --- */
.article-view-content {
margin-bottom: 3rem;
}
.article-view-body {
font-size: 1.125rem;
color: #2d3748;
white-space: pre-line;
}
/* --- TAG-BEREICH --- */
.article-view-bottom-section {
border-top: 1px solid #e2e8f0;
padding-top: 1.5rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.article-view-tags-label {
font-size: 0.9rem;
font-weight: 600;
color: #718096;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.article-view-tags-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
/* Einzelner Tag */
.article-view-tag-item {
background-color: #f1f5f9;
color: #475569;
font-size: 0.85rem;
font-weight: 500;
padding: 0.35rem 0.75rem;
border-radius: 6px;
border: 1px solid #e2e8f0;
transition: background-color 0.2s, color 0.2s;
}
.article-view-tag-item:hover {
background-color: #e2e8f0;
color: #1e293b;
cursor: default;
}
/* Responsive Anpassungen unter 760px (für z.B. Smarticlephones) */
@media (max-width: 760px) {
.article-view-container {
margin: 1.5rem auto;
padding: 0 1rem;
}
.article-view-title {
font-size: 1.85rem;
}
}
View File
+1
View File
@@ -0,0 +1 @@
[]
+3
View File
@@ -0,0 +1,3 @@
<FilesMatch "\.db">
deny from all
</FilesMatch>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+5
View File
@@ -0,0 +1,5 @@
<footer>
<a href="index.php?pfad=impressum">Impressum</a>
<a href="index.php?pfad=datenschutz">Datenschutz</a>
<a href="index.php?pfad=nutzungsbedingungen">Nutzungsbedingungen</a>
</footer>
+174 -22
View File
@@ -1,28 +1,180 @@
<?php
session_start();
?>
<!-- <!--
Globales Menü, wird via PHP später in alle Seiten eingebunden Globales Menü, wird via PHP später in alle Seiten eingebunden
--> -->
<nav style="background:#808080; height: 60px;"> <nav class="nav">
<div style="float:left; text-align: center;"> <div class="nav__left">
<a href="index.php"> <a href="index.php" class="nav__logo">
<img src="images/logo.png" alt="" style="height: 44px;"> <img src="images/logos/logo_full.png" alt="Logo">
</a> </a>
| </div>
<a href = "content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
| <!-- Mobile navbar mit Burger-Symbol -->
<a href = "content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a> <input type="checkbox" id="nav-toggle" class="nav__checkbox">
| <label for="nav-toggle" id="mobile-nav">
<a href = "content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a> <span>☰</span>
| </label>
<a href = "content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
| <ul id="mobile-nav" class="nav__mobile-menu">
</div> <li>
<div style="float:right; text-align: center;"> <label for="nav-toggle" class="nav__close-btn">&times;</label>
<?php </li>
include_once 'search.php';
?> <?php if (isset($_SESSION['user'])): ?>
|
<a href = "auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a> <li><a href="index.php?pfad=profile">Profil</a></li>
<li><a href="index.php?pfad=logout">Abmelden</a></li>
<li><a href="index.php?pfad=createArticle">Beitrag erstellen</a></li>
<?php else: ?>
<li><a href="index.php?pfad=login">Anmelden</a></li>
<li><a href="index.php?pfad=register">Registrieren</a></li>
<?php endif; ?>
<li>
<label class="nav__mobile-label">Sprachen</label>
<ul class="nav__mobile-submenu">
<li><a href="index.php?pfad=showCategory&category=deutsch">Deutsch</a></li>
<li><a href="index.php?pfad=showCategory&category=englisch">Englisch</a></li>
<li><a href="index.php?pfad=showCategory&category=franzoesisch">Französisch</a></li>
<li><a href="index.php?pfad=showCategory&category=latein">Latein</a></li>
<li><a href="index.php?pfad=showCategory&category=literatur">Literatur</a></li>
</ul>
</li>
<li>
<label class="nav__mobile-label">MINT</label>
<ul class="nav__mobile-submenu">
<li><a href="index.php?pfad=showCategory&category=mathe">Mathematik</a></li>
<li><a href="index.php?pfad=showCategory&category=biologie">Biologie</a></li>
<li><a href="index.php?pfad=showCategory&category=chemie">Chemie</a></li>
<li><a href="index.php?pfad=showCategory&category=physik">Physik</a></li>
<li><a href="index.php?pfad=showCategory&category=informatik">Informatik</a></li>
<li><a href="index.php?pfad=showCategory&category=astronomie">Astronomie</a></li>
</ul>
</li>
<li>
<label class="nav__mobile-label">Gesellschaft & Werte</label>
<ul class="nav__mobile-submenu">
<li><a href="index.php?pfad=showCategory&category=geschichte">Geschichte</a></li>
<li><a href="index.php?pfad=showCategory&category=erdkunde">Erdkunde</a></li>
<li><a href="index.php?pfad=showCategory&category=sozialkunde">Sozialkunde</a></li>
<li><a href="index.php?pfad=showCategory&category=wirtschaft">Wirtschaftskunde</a></li>
<li><a href="index.php?pfad=showCategory&category=religion">Religion</a></li>
<li><a href="index.php?pfad=showCategory&category=ethik">Ethikunterricht</a></li>
<li><a href="index.php?pfad=showCategory&category=philosophie">Philosophie</a></li>
<li><a href="index.php?pfad=showCategory&category=psychologie">Psychologie</a></li>
<li><a href="index.php?pfad=showCategory&category=kunst">Kunst</a></li>
<li><a href="index.php?pfad=showCategory&category=musik">Musik</a></li>
<li><a href="index.php?pfad=showCategory&category=theater">Theater</a></li>
</ul>
</li>
<li>
<label class="nav__mobile-label">Technik & Praxis</label>
<ul class="nav__mobile-submenu">
<li><a href="index.php?pfad=showCategory&category=technik">Technik</a></li>
<li><a href="index.php?pfad=showCategory&category=werken">Werken</a></li>
<li><a href="index.php?pfad=showCategory&category=hauswirtschaft">Hauswirtschaft</a></li>
<li><a href="index.php?pfad=showCategory&category=sport">Sport</a></li>
</ul>
</li>
</ul>
<!-- normale Navbar (Desktop) -->
<div class="nav__center">
<div class="nav__item nav__dropdown">
<button class="nav__dropdown-toggle">Sprachen</button>
<div class="nav__dropdown-menu">
<a href="index.php?pfad=showCategory&category=deutsch">Deutsch</a>
<a href="index.php?pfad=showCategory&category=englisch">Englisch</a>
<a href="index.php?pfad=showCategory&category=franzoesisch">Französisch</a>
<a href="index.php?pfad=showCategory&category=latein">Latein</a>
<a href="index.php?pfad=showCategory&category=literatur">Literatur</a>
</div>
</div>
<div class="nav__item nav__dropdown">
<button class="nav__dropdown-toggle">MINT</button>
<div class="nav__dropdown-menu">
<a href="index.php?pfad=showCategory&category=mathe">Mathematik</a>
<a href="index.php?pfad=showCategory&category=biologie">Biologie</a>
<a href="index.php?pfad=showCategory&category=chemie">Chemie</a>
<a href="index.php?pfad=showCategory&category=physik">Physik</a>
<a href="index.php?pfad=showCategory&category=informatik">Informatik</a>
<a href="index.php?pfad=showCategory&category=astronomie">Astronomie</a>
</div>
</div>
<div class="nav__item nav__dropdown">
<button class="nav__dropdown-toggle">Gesellschaft & Werte</button>
<div class="nav__dropdown-menu">
<a href="index.php?pfad=showCategory&category=geschichte">Geschichte</a>
<a href="index.php?pfad=showCategory&category=erdkunde">Erdkunde</a>
<a href="index.php?pfad=showCategory&category=sozialkunde">Sozialkunde</a>
<a href="index.php?pfad=showCategory&category=wirtschaft">Wirtschaftskunde</a>
<a href="index.php?pfad=showCategory&category=religion">Religion</a>
<a href="index.php?pfad=showCategory&category=ethik">Ethikunterricht</a>
<a href="index.php?pfad=showCategory&category=philosophie">Philosophie</a>
<a href="index.php?pfad=showCategory&category=psychologie">Psychologie</a>
<a href="index.php?pfad=showCategory&category=kunst">Kunst</a>
<a href="index.php?pfad=showCategory&category=musik">Musik</a>
<a href="index.php?pfad=showCategory&category=theater">Theater</a>
</div>
</div>
<div class="nav__item nav__dropdown">
<button class="nav__dropdown-toggle">Technik & Praxis</button>
<div class="nav__dropdown-menu">
<a href="index.php?pfad=showCategory&category=technik">Technik</a>
<a href="index.php?pfad=showCategory&category=werken">Werken</a>
<a href="index.php?pfad=showCategory&category=hauswirtschaft">Hauswirtschaft</a>
<a href="index.php?pfad=showCategory&category=sport">Sport</a>
</div>
</div>
</div>
<div class="nav__right">
<?php if (isset($_SESSION['user'])): ?>
<a href="index.php?pfad=profile" class="nav__item nav__link">
Profil
</a>
<div class="nav__search">
<?php include_once 'search.php'; ?>
</div>
<a href="index.php?pfad=createArticle" class="nav__item nav__button">
Beitrag erstellen
</a>
<a href="index.php?pfad=logout" class="nav__item nav__button">
Abmelden
</a>
<?php else: ?>
<div class="nav__search">
<?php include_once 'search.php'; ?>
</div>
<a href="index.php?pfad=login" class="nav__item nav__button">
Anmelden
</a>
<a href="index.php?pfad=register" class="nav__item nav__button">
Registrieren
</a>
<?php endif; ?>
<a href = "auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div> </div>
</nav> </nav>
+8 -2
View File
@@ -1,5 +1,11 @@
<!-- <!--
Suchleiste. Wird via PHP später in alle Seiten eingebunden Suchleiste. Wird via PHP später in alle Seiten eingebunden
--> -->
<input type="search" id="site-search" name="q" placeholder="Suchen..."> <!--<label for="site-search">Suche</label>-->
<button type="submit">Suchen</button> <form action="php/controller/search-results-controller.php" method="GET" class="search-form" style="display: flex; align-items: center; gap: 5px;">
<input type="hidden" name="pfad" value="search-results">
<input type="search" id="site-search" name="q" placeholder="Suchen..." class="nav__search" maxlength="50" required>
<button type="submit" class="nav__search-button">Suchen</button>
</form>
+70 -25
View File
@@ -1,32 +1,77 @@
<!-- <?php
Seite: Hompage der Lernplattform session_start();
Funktion: Webseitengerüst, Anzeigen von Beiträgen, Suchfunktion etc. ob_start();
-->
<!DOCTYPE html>
<html lang="de">
<head> $pfad = $_GET["pfad"] ?? "home";
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="css/main.css" />
<title>EduForge</title>
</head>
/*
Controller für Aktionen werden vor der HTML-Ausgabe geladen,
damit Weiterleitungen mit header() funktionieren.
*/
if ($pfad === "login") {
include_once "php/controller/login-controller.php";
}
<body> if ($pfad === "register") {
include_once "php/controller/register-controller.php";
}
if ($pfad === "logout") {
include_once "content/logout-controller.php";
exit();
}
if ($pfad === "deleteAccount") {
include_once "content/deleteAccount-controller.php";
exit();
}
?>
<!--
Seite: Index der Lernplattform
Funktion: Webseitengerüst, Anzeigen von Content
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="images/logos/logo_icon.ico">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/navbar.css">
<link rel="stylesheet" href="css/footer.css">
<link rel="stylesheet" href="css/search-results.css">
<link rel="stylesheet" href="css/createArticle.css">
<link rel="stylesheet" href="css/profile.css">
<link rel="stylesheet" href="css/showArticle.css">
<link rel="stylesheet" href="css/message.css">
<title>EduForge</title>
</head>
<body>
<?php <?php
include_once 'includes/navbar.php'; include_once 'includes/navbar.php';
//Dynamischer Inhalt (später mit php...):
include_once 'content/home.php';
?>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;"> /*
<a href="legal/impressum.php">Impressum</a> Dynamischer Inhalt:
<a href="legal/datenschutz.php">Datenschutz</a> Je nach pfad-Parameter wird die passende Datei aus content geladen.
<a href="legal/nutzungsbedingungen.php">Nutzungsbedingungen</a> */
</footer> if (file_exists('content/' . $pfad . '.php')) {
</body> include_once 'content/' . $pfad . '.php';
} else {
include_once 'content/404.php';
}
</html> include_once 'includes/footer.php';
?>
</body>
</html>
<?php
ob_end_flush();
?>
-67
View File
@@ -1,67 +0,0 @@
<!--
Seite: Datenschutzerklärung
Inhalt: Informationen zur Datenverarbeitung gemäß DSGVO
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Datenschutz</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="impressum.php">Impressum</a>
<a href="datenschutz.php">Datenschutz</a>
<a href="nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
-67
View File
@@ -1,67 +0,0 @@
<!--
Seite: Impressum
Inhalt: wer wie was auf der Webseite
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Impressum</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="impressum.php">Impressum</a>
<a href="datenschutz.php">Datenschutz</a>
<a href="nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
-66
View File
@@ -1,66 +0,0 @@
<!--
Seite: Nutzungsbedingungen
Inhalt: Regelungen für die Nutzung der Plattform (AGBs und so...)
-->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="EduForge">
<meta name="author" content="Niklas Ortmann">
<link rel="stylesheet" href="../css/main.css" />
<title>EduForge</title>
</head>
<body>
<nav style="background:#808080; height: 60px;">
<div style="float:left; text-align: center;">
<a href="../index.php">
<img src="../images/logo.png" alt="" style="height: 44px;">
</a>
|
<a href = "../content/informatik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Informatik</b></a>
|
<a href = "../content/mathe.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Mathe</b></a>
|
<a href = "../content/physik.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Physik</b></a>
|
<a href = "../content/profile.php" style = "padding: 5px; text-align: center; text-decoration: none; display: inline-block;"><b>Dein Profil</b></a>
|
</div>
<div style="float:right; text-align: center;">
<?php
include_once '../includes/search.php';
?>
|
<a href = "../auth/login.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Anmelden </a>
<a href = "../auth/register.php" style = "background-color: #f44336; color: white; padding: 4px 20px; text-align: center; text-decoration: none; display: inline-block;"> Registrieren </a>
</div>
</nav>
<main>
<h1>Nutzungsbedingungen</h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</main>
<footer style="position:fixed;bottom:0;width:100%;background:#fff;text-align:center;">
<a href="impressum.php">Impressum</a>
<a href="datenschutz.php">Datenschutz</a>
<a href="nutzungsbedingungen.php">Nutzungsbedingungen</a>
</footer>
</body>
</html>
@@ -0,0 +1,88 @@
<?php
SESSION_START();
require_once '../model/LocalArticleManager.php';
require_once '../model/ArticleManager.php';
require_once '../validator/article-validator.php';
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$_SESSION["old_title"] = $_POST["title"] ?? '';
$_SESSION["old_content"] = $_POST["content"] ?? '';
$_SESSION["old_category"] = $_POST["category"] ?? '';
$_SESSION["old_tags"] = $_POST["tags"] ?? '';
if(!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
$_SESSION["message"] = "missing_parameters";
header("location: ../../index.php?pfad=createArticle");
exit();
} else {
$title = $_POST["title"];
$content = $_POST["content"];
$author = $_SESSION["user_email"];
$category = $_POST["category"];
$tags = $_POST['tags'] ?? '';
// -------------------------------- Validierung der Daten: -------------------------
if (!articleAuthorValidator($author)) {
$_SESSION["message"] = "author_not_valid";
header("location: ../../index.php?pfad=createArticle");
exit();
}
if (!articleTitleValidator($title)) {
$_SESSION["message"] = "invalid_title";
header("location: ../../index.php?pfad=createArticle");
exit();
}
if (!articleContentValidator($content)) {
$_SESSION["message"] = "invalid_content";
header("location: ../../index.php?pfad=createArticle");
exit();
}
if (!articleCategoryValidator($category)) {
$_SESSION["message"] = "invalid_category";
header("location: ../../index.php?pfad=createArticle");
exit();
}
if (!articleTagValidator($tags)) {
$_SESSION["message"] = "invalid_tags";
header("location: ../../index.php?pfad=createArticle");
exit();
} else {
$cleanedTags = [];
$rawTags = explode(',', $tags);
foreach ($rawTags as $rawTag) {
// Leerzeichen am Anfang/Ende des einzelnen Tags entfernen:
$tag = trim($rawTag);
$cleanedTags[] = $tag;
}
// Duplikate entfernen:
$cleanedTags = array_unique($cleanedTags);
$cleanedTags = implode(',', $cleanedTags);
}
// ----------------- Übertragung der validierten Daten in ArticleManager: ---------------------------
try {
$articleManager = ArticleManager::getInstance();
$articleManager->addArticle($title, $content, $author, $category, $cleanedTags);
// Formulardaten nach erfolgreichem Erstellen aus der Session löschen
unset($_SESSION["old_title"], $_SESSION["old_content"], $_SESSION["old_category"], $_SESSION["old_tags"]);
} catch (Exception $e){
$_SESSION["message"] = "internal_error";
header("location: ../../index.php?pfad=createArticle");
exit();
}
$_SESSION["message"] = "new_article";
// Weiterleitung zur Homepage
header("location: ../../index.php");
exit();
}
}
?>
@@ -0,0 +1,30 @@
<?php
require_once "php/model/UserManager.php";
/*
Deregistrierung
Funktion: Entfernt User aus der Datenbank und beendet die Session
*/
try {
$dao = UserManager::getInstance();
if (isset($_SESSION["user_email"])) {
$dao->deleteUser($_SESSION["user_email"]);
}
$_SESSION = [];
session_destroy();
header("Location: index.php");
exit();
} catch (Exception $e) {
$_SESSION["message"] = "internal_error";
header("Location: index.php?pfad=profile");
exit();
}
+17
View File
@@ -0,0 +1,17 @@
<?php
session_start();
require_once 'php/model/Article.php';
require_once 'php/model/ArticleManager.php';
require_once 'php/model/LocalArticleManager.php';
try {
$articleManager = ArticleManager::getInstance();
// Beziehen der Dummy-Beiträge aus dem ArticleManager:
$dummy1 = $articleManager->getArticle(1);
$dummy2 = $articleManager->getArticle(2);
$dummy3 = $articleManager->getArticle(3);
} catch (Exception $e){
$_SESSION["message"] = "internal_error";
echo "Fehler aufgetreten: " . $e->getMessage();
}
?>
+3
View File
@@ -0,0 +1,3 @@
<?php
?>
+37
View File
@@ -0,0 +1,37 @@
<?php
require_once "php/model/UserManager.php";
$error = null;
/*
Verarbeitung des Login-Formulars
Funktion: Prüft Benutzerdaten und erstellt Session für eingeloggten Nutzer
*/
if ($_SERVER["REQUEST_METHOD"] === "POST") {
try {
$dao = UserManager::getInstance();
$email = $_POST["email"] ?? "";
$password = $_POST["password"] ?? "";
$user = $dao->findUser($email);
if ($user && password_verify($password, $user["password"])) {
$_SESSION["user"] = $user["vorname"] . " " . $user["nachname"];
$_SESSION["user_email"] = $user["email"];
header("Location: index.php");
exit();
} else {
$error = "Login fehlgeschlagen. Bitte überprüfe deine Eingaben.";
}
} catch (Exception $e) {
$error = "Es ist ein interner Fehler aufgetreten. Bitte versuche es erneut.";
}
}
+6
View File
@@ -0,0 +1,6 @@
<?php
$_SESSION = [];
session_destroy();
header("Location: index.php");
exit();
+91
View File
@@ -0,0 +1,91 @@
<?php
require_once "php/model/UserManager.php";
require_once "php/model/Article.php";
require_once "php/model/ArticleManager.php";
require_once "php/validator/user-validator.php";
$error = null;
if (!isset($_SESSION["user"])) {
header("Location: index.php?pfad=login");
exit();
}
try {
$dao = UserManager::getInstance();
$user = $dao->findUser($_SESSION["user_email"] ?? "");
if (!$user) {
$_SESSION = [];
session_destroy();
header("Location: index.php?pfad=login");
exit();
}
if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST["saveProfile"])) {
$oldEmail = $_SESSION["user_email"];
$newEmail = trim($_POST["email"] ?? "");
$vorname = trim($_POST["vorname"] ?? "");
$nachname = trim($_POST["nachname"] ?? "");
$password = $_POST["password"] ?? "";
if (!userEmailValidator($newEmail)) {
$error = "Bitte gib eine gültige E-Mail-Adresse ein.";
$_GET["edit"] = "1";
} elseif (!userNameValidator($vorname)) {
$error = "Der Vorname muss 2 bis 20 Zeichen lang sein und darf nur Buchstaben, Leerzeichen und Bindestriche enthalten.";
$_GET["edit"] = "1";
} elseif (!userNameValidator($nachname)) {
$error = "Der Nachname muss 2 bis 20 Zeichen lang sein und darf nur Buchstaben, Leerzeichen und Bindestriche enthalten.";
$_GET["edit"] = "1";
} elseif (!userOptionalPasswordValidator($password)) {
$error = "Das Passwort muss 5 bis 12 Zeichen lang sein.";
$_GET["edit"] = "1";
} else {
$updated = $dao->updateUser(
$oldEmail,
$newEmail,
$vorname,
$nachname,
$password
);
if ($updated) {
$_SESSION["user"] = $vorname . " " . $nachname;
$_SESSION["user_email"] = $newEmail;
header("Location: index.php?pfad=profile");
exit();
} else {
$error = "Die Daten konnten nicht gespeichert werden.";
$_GET["edit"] = "1";
}
}
}
$user = $dao->findUser($_SESSION["user_email"] ?? "");
$articleManager = ArticleManager::getInstance();
$userArticles = $articleManager->getArticlesByAuthor($_SESSION["user_email"]);
if (!isset($userArticles)) {
$_SESSION["message"] = "user_has_no_articles";
}
} catch (InvalidArgumentException $e) {
$error = $e->getMessage();
$_GET["edit"] = "1";
} catch (Exception $e) {
$error = "Es ist ein interner Fehler aufgetreten. Bitte versuche es erneut.";
$_SESSION["message"] = "internal_error";
$_GET["edit"] = "1";
}
@@ -0,0 +1,24 @@
<?php
/*
* Controller für die Liste der eigenen Beiträge eines Nutzers auf der eigenen Profilseite
*/
require_once 'php/model/Article.php';
require_once 'php/model/ArticleManager.php';
require_once "php/model/UserManager.php";
try {
$dao = UserManager::getInstance();
$user = $dao->findUser($_SESSION["user_email"] ?? "");
$author = $user["email"];
$articleManager = ArticleManager::getInstance();
$userArticles = $articleManager->getArticlesByAuthor($author);
if(!isset($userArticles)) {
$_SESSION["message"] = "user_has_no_articles";
}
} catch (Exception $e) {
$_SESSION["message"] = "internal_error";
}
?>
+43
View File
@@ -0,0 +1,43 @@
<?php
require_once "php/model/UserManager.php";
require_once "php/validator/user-validator.php";
$error = null;
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$email = trim($_POST["email"] ?? "");
$vorname = trim($_POST["vorname"] ?? "");
$nachname = trim($_POST["nachname"] ?? "");
$plainPassword = $_POST["password"] ?? "";
if (!userEmailValidator($email)) {
$error = "Bitte gib eine gültige E-Mail-Adresse ein.";
} elseif (!userNameValidator($vorname)) {
$error = "Der Vorname muss 2 bis 20 Zeichen lang sein und darf nur Buchstaben, Umlaute, Leerzeichen und Bindestriche enthalten.";
} elseif (!userNameValidator($nachname)) {
$error = "Der Nachname muss 2 bis 20 Zeichen lang sein und darf nur Buchstaben, Umlaute, Leerzeichen und Bindestriche enthalten.";
} elseif (!userPasswordValidator($plainPassword)) {
$error = "Das Passwort muss 5 bis 12 Zeichen lang sein.";
} else {
try {
$dao = UserManager::getInstance();
$password = password_hash($plainPassword, PASSWORD_DEFAULT);
$dao->addUser($email, $vorname, $nachname, $password);
$_SESSION["user"] = $vorname . " " . $nachname;
$_SESSION["user_email"] = $email;
header("Location: index.php");
exit();
} catch (InvalidArgumentException $e) {
$error = $e->getMessage();
} catch (Exception $e) {
$error = "Die Registrierung konnte nicht gespeichert werden.";
}
}
}
@@ -0,0 +1,68 @@
<?php
session_start();
require_once '../model/LocalArticleManager.php';
require_once '../model/ArticleManager.php';
require_once '../model/Article.php';
if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) {
$search = trim($_GET["q"]);
if (empty($search)) {
$_SESSION["search_results"] = [];
$_SESSION["search_query"] = "";
$_SESSION["message"] = "missing_parameters";
} else {
try {
$articleManager = ArticleManager::getInstance();
$results = $articleManager->search($search);
$sortStyle = $_GET['sort'] ?? 'alphabet';
$_SESSION['search_sort'] = $sortStyle;
if ($sortStyle === 'alphabet') {
// Titel aufsteigend alphabetiisch sortiert
usort($results, function($a, $b) {
return strcasecmp($a->title, $b->title);
});
} elseif ($sortStyle === 'newest') {
// Datum neu zu alt sortiert
usort($results, function($a, $b) {
return strcmp($b->creationDate, $a->creationDate);
});
} elseif ($sortStyle === 'oldest') {
// Datum alt zu neu sortiert
usort($results, function($a, $b) {
return strcmp($a->creationDate, $b->creationDate);
});
}
// Ergebnisse werden in ein flaches array umgewandelt, da sont incomplete-PHP error im Ergebnis
$safeArrayResults = [];
foreach ($results as $obj) {
$safeArrayResults[] = [
"id" => $obj->id,
"title" => $obj->title,
"content" => $obj->content,
"author" => $obj->author,
"category" => $obj->category,
"tags" => $obj->tags,
"creationDate" => $obj->creationDate
];
}
$_SESSION["search_results"] = $safeArrayResults;
$_SESSION["search_query"] = $search;
$_SESSION["message"] = "new_search_results";
} catch (Exception $e){
$_SESSION["message"] = "internal_error";
}
}
header("Location: ../../index.php?pfad=search-results");
exit();
}
?>
+29
View File
@@ -0,0 +1,29 @@
<?php
session_start();
require_once 'php/model/Article.php';
require_once 'php/model/ArticleManager.php';
if (isset($_GET["id"]) && !empty($_GET["id"])){
try {
$id = $_GET["id"];
$articleManager = ArticleManager::getInstance();
$article = $articleManager->getArticle($id);
if($article != null){
$title = $article->getTitle();
$content = $article->getContent();
$category = $article->getCategory();
$author = $article->getAuthor();
$tags = $article->getTags();
}else{
//header("location: index.php?pfad=404");
include_once "content/404.php";
exit();
}
} catch (Exception $e){
$_SESSION["message"] = "internal_error";
exit();
}
}else{
$_SESSION["message"] = "missing_id";
}
?>
@@ -0,0 +1,21 @@
<?php
require_once 'php/model/Article.php';
require_once 'php/model/ArticleManager.php';
require_once 'php/validator/article-validator.php';
if (isset($_GET["category"]) && !empty($_GET["category"]) && articleCategoryValidator($_GET["category"])){
$category = $_GET["category"];
try {
$articleManager = ArticleManager::getInstance();
$articles = $articleManager->getArticlesByCategory($category);
} catch (Exception $e) {
$_SESSION["message"] = "internal_error";
include_once "content/404.php";
exit();
}
}else{
$_SESSION["message"] = "invalid_category";
include_once "content/404.php";
exit();
}
?>
@@ -0,0 +1,95 @@
<?php
SESSION_START();
require_once '../model/LocalArticleManager.php';
require_once '../model/ArticleManager.php';
require_once '../model/Article.php';
require_once '../validator/article-validator.php';
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$_SESSION["old_title"] = $_POST["title"] ?? '';
$_SESSION["old_content"] = $_POST["content"] ?? '';
$_SESSION["old_category"] = $_POST["category"] ?? ''; // TODO: die Kategorie im Dropdown setzen, wenn der Editor erneut geöffnet wird.
$_SESSION["old_tags"] = $_POST["tags"] ?? '';
if (isset($_GET["id"]) && !empty($_GET["id"])) {
$id = $_GET["id"];
} else {
$_SESSION["message"] = "missing_id";
header("location: ../../index.php?pfad=updateArticle");
exit();
}
if (!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
$_SESSION["message"] = "missing_parameters";
header("location: ../../index.php?pfad=updateArticle");
exit();
}else{
$title = $_POST["title"];
$content = $_POST["content"];
$author = $_SESSION["user_email"];
$category = $_POST["category"];
$tags = $_POST['tags'] ?? '';
// -------------------------------- Validierung der Daten: -------------------------
if (!articleAuthorValidator($author)) {
$_SESSION["message"] = "author_not_valid";
header("location: ../../index.php?pfad=updateArticle");
exit();
}
if (!articleTitleValidator($title)) {
$_SESSION["message"] = "invalid_title";
header("location: ../../index.php?pfad=updateArticle");
exit();
}
if (!articleContentValidator($content)) {
$_SESSION["message"] = "invalid_content";
header("location: ../../index.php?pfad=updateArticle");
exit();
}
if (!articleCategoryValidator($category)) {
$_SESSION["message"] = "invalid_category";
header("location: ../../index.php?pfad=updateArticle");
exit();
}
if (!articleTagValidator($tags)) {
$_SESSION["message"] = "invalid_tags";
header("location: ../../index.php?pfad=updateArticle");
exit();
} else {
$cleanedTags = [];
$rawTags = explode(',', $tags);
foreach ($rawTags as $rawTag) {
// Leerzeichen am Anfang/Ende des einzelnen Tags entfernen:
$tag = trim($rawTag);
$cleanedTags[] = $tag;
}
// Duplikate entfernen:
$cleanedTags = array_unique($cleanedTags);
$cleanedTags = implode(',', $cleanedTags);
}
// ----------------- Übertragung der validierten Daten in ArticleManager: ---------------------------
try {
$articleManager = ArticleManager::getInstance();
$article = $articleManager->getArticle($id);
$article->setTitle($title);
$article->setContent($content);
$article->setCategory($category);
$article->setTags($cleanedTags);
$articleManager->updateArticle($id ,$article, $author);
} catch (Exception $e){
$_SESSION["message"] = $e->getMessage();
header("location: ../../index.php?pfad=updateArticle");
exit();
}
$_SESSION["message"] = "article_updated";
// Weiterleitung zur Homepage
header("location: ../../index.php?pfad=showArticle&id=$id");
}
}
?>
+147
View File
@@ -0,0 +1,147 @@
<?php
/**
* Klasse: Artikel
* Diese Klasse stellt alle Daten eines Beitrags (Beitrag) bereit
*
* @author Niklas Ortmann
*/
class Article
{
public $id;
public $title;
public $content;
public $author;
public $creationDate;
public $category;
public $tags;
/**
* Konstruktor
*
* @param $id integer ID des Beitrages
* @param $title string Titel des Beitrags
* @param $content string Inhalt des Beitrags
* @param $author string der Autor des des Beitrages NID
* @param $category string Kategorie des Beitrages
* @param $tags string optionale Schlagworte für eine bessere Suche
* @param $creationDate string Datum der Beitragserstellung
*/
public function __construct(int $id, string $title, string $content, string $author, string $category, string $tags, string $creationDate)
{
$this->id = $id;
$this->title = $title;
$this->content = $content;
$this->author = $author;
$this->creationDate = $creationDate;
$this->category = $category;
$this->tags = $tags;
}
/**
* Gibt die ID eines Beitrags zurück.
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* Gibt den Titel eines Beitrags zurück.
* @return string
*/
public function getTitle(): string
{
return $this->title;
}
/**
* Setzt den Titel eines Beitrags
* @param $title
* @return void
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* Gibt den Content eines Beitrags zurück.
* TODO: Content muss noch definiert werden.
* @return string
*/
public function getContent(): string
{
return $this->content;
}
/**
* Setzt den Content eines Beitrags.
* TODO: Content muss noch definiert werden.
* @param $content
* @return void
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* Gibt den Autor eines Beitrags zurück.
* @return string
*/
public function getAuthor(): string
{
return $this->author;
}
/**
* Gibt das Veröffentlichungsdatum des Beitrags zurück.
* @return string
*/
public function getCreationDate(): string
{
return $this->creationDate;
}
/**
* Gibt die Kategorie eines Beitrags zurück.
* @return string
*/
public function getCategory(): string
{
return $this->category;
}
/**
* Setzt die Kategorie eines Beitrags.
* @param string $category
* @return void
*/
public function setCategory(string $category)
{
$this->category = $category;
}
/**
* Gibt die Schlagworte eines Beitrags zurück.
* @return string
*/
public function getTags(): string
{
return $this->tags;
}
/**
* Setzt die Schlagworte eines Beitrags.
* @param string $tags
*/
public function setTags(string $tags)
{
$this->tags = $tags;
}
}
?>
+49
View File
@@ -0,0 +1,49 @@
<?php
require_once 'LocalArticleManager.php';
require_once 'DatabaseArticleManager.php';
require_once 'Article.php';
/**
* Die Klasse beinhaltet alle Methoden für die Operation mit den Artikel-Daten.
*
* @author Niklas Ortmann
*/
class ArticleManager
{
public static function getInstance()
{
$articleManager = DatabaseArticleManager::getInstance(); // Hier kann zwischen dem lokalen und datenbankbasiertem ArticleManager gewechselt werden.
// Erstellen von Dummy-Beiträgen:
if($articleManager->getArticle(1) == null ){
$articleManager->addArticle(
"Satz des Pythagoras",
"Der Satz des Pythagoras wurde von dem griechischen Philosophen Pythagoras von Samos formuliert und im dritten Jahrhundert vor Christus veröffentlicht. In der beigefügten Abbildung sehen wir ein rechtwinkliges Dreieck...",
"max.mustermann",
"mathe",
"Dreiecke, Dreiecksseiten berechnen"
);
}
if($articleManager->getArticle(2) == null ){
$articleManager->addArticle(
"Tunneleffekt",
"Der Tunneleffekt ist ein quantenmechanisches Phänomen, bei dem Teilchen...",
"max.mustermann",
"physik",
"Quantenphysik, Energie"
);
}
if($articleManager->getArticle(3) == null ){
$articleManager->addArticle(
"Datenschutz vs Datensicherheit",
"Datenschutz ist in unserer digital vernetzten Welt allgegenwärtig...",
"max.mustermann",
"informatik",
"Daten, DSGVO"
);
}
return $articleManager;
}
}
+96
View File
@@ -0,0 +1,96 @@
<?php
require_once "Article.php";
class NotFoundException extends Exception {}
class UnauthorizedAccessException extends Exception {}
class InternalServerErrorException extends Exception {}
/**
* Die Klasse beinhaltet alle Methoden für die Operation mit den Artikel-Daten.
*
* @author Niklas Ortmann
*/
interface ArticleManagerDAO
{
/**
* Ein angemeldeter Nutzer erstellt einen neuen Beitrag.
* @param $title string Titel des Beitrags
* @param $content string Inhalt des Beitrags
* @param $author string der Autor des des Beitrages NID
* @param $category string Kategorie des Beitrages
* @param $tags string optionale Schlagworte für eine bessere Suche
*
* @throws InternalServerErrorException
*/
public function addArticle($title, $content, $author, $category, $tags);
/**
* Ändert den gespeicherten Beitrag eines übergebenen Beitrags und eines Autors.
* Es wird geprüft, ob der zu änderne Beitrag existiert und ob der übergebene Autor der Autor des originalen
* Beitrages ist.
* @param $id
* @param $article
* @param $author
* @return void
*
* @throws InternalServerErrorException
* @throws NotFoundException
* @throws UnauthorizedAccessException
*/
public function updateArticle($id, $article, $author);
/**
* Löscht einen Beitrag aus übergebener ID und dem Nutzer, der die Löschung ausführt.
* @param $id
* @param $author
* @return void
* @throws InternalServerErrorException
* @throws NotFoundException
* @throws UnauthorizedAccessException
*/
public function deleteArticle($id, $author);
/**
* Beitrag aufrufen.
* $id ID des Beitrags
*
* @return Article
* @throws InternalServerErrorException
*/
public function getArticle($id);
/**
* Alle Beiträge aufrufen.
*
* @throws InternalServerErrorException
*/
public function getAllArticles();
/**
* Gibt alle Beiträge eines Nutzer mit einer gegebenen ID aus.
* @param $author
* @return Article[]
* @throws InternalServerErrorException
*/
public function getArticlesByAuthor($author);
/**
* Durchsucht die vorhandenen Beiträge nach einem bestimmten Suchbegriff.
* Die Suche prüft, ob das übergebene Keyword im Titel oder im Inhalt eines Beitrags vorkommt.
* (Unabhängig von Groß-und Kleinschreibung)
* @param string $keyword Der eingegebene Suchbegriff.
* @return array Ein Array von Artikeln ,die dem Suchkriterium entsprechen. Wenn nichts gefunden wird, ein leeres Array.
*/
public function search(string $keyword): array;
/**
* Gibt alle Beiträge einer gegebenen Kategorie aus.
* @param $category
* @return mixed
* @throws InternalServerErrorException
*/
public function getArticlesByCategory($category);
}
?>
+315
View File
@@ -0,0 +1,315 @@
<?php
require_once 'ArticleManagerDAO.php';
require_once 'Article.php';
/**
* Klasse: Eine SQLLite3 Lösung des ArticleManagerDAO.
*
* @author Niklas Ortmann
*/
class DatabaseArticleManager implements ArticleManagerDAO {
private static $instance = null;
/**
* Konstruktor
*
* Erstellt die Datenbankverbindung und die Tabelle articles.
* @throws InternalServerErrorException
*/
public function __construct()
{
if (!file_exists(__DIR__ . '/../../db/articles.db')) {
try {
$user = 'root';
$pw = null;
$dsn = 'sqlite:' . __DIR__ . '/../../db/articles.db';
$db = new PDO($dsn, $user, $pw);
$db->exec("
CREATE TABLE articles (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
content TEXT,
author TEXT,
category TEXT,
tags TEXT,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);");
unset($db);
} catch (PDOException $e) {
throw new InternalServerErrorException($e->getMessage());
}
}
}
/**
* Baut die Verbindung zur Datenbank auf.
* @throws InternalServerErrorException
*/
private function getConnection()
{
try {
$user = 'root';
$pw = null;
$dsn = 'sqlite:' . __DIR__ . '/../../db/articles.db';
return new PDO($dsn, $user, $pw);
} catch (PDOException $e) {
throw new InternalServerErrorException($e->getMessage());
}
}
/**
* Gibt die DatabaseArticleManager-Instanz zurück.
* @return DatabaseArticleManager
*/
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new DatabaseArticleManager();
}
return self::$instance;
}
public function addArticle($title, $content, $author, $category, $tags)
{
try {
$db = $this->getConnection();
$sql = "INSERT INTO articles (title, content, author, category, tags)
VALUES (:title, :content, :author, :category, :tags);";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
// Verknüpft die übergebenen Parameter exakt mit den SQL-Platzhaltern
$success = $command->execute([
":title" => $title,
":content" => $content,
":author" => $author,
":category" => $category,
":tags" => $tags
]);
if (!$success) {
throw new InternalServerErrorException("internal_error");
}
return intval($db->lastInsertId());
} catch (PDOException $e) {
throw new InternalServerErrorException($e->getMessage());
}
}
public function updateArticle($id, $article, $author)
{
if (empty($article)) {
throw new InternalServerErrorException("internal_error");
}
// Berechtigungsprüfung analog zur lokalen Implementierung:
if ($article->getAuthor() !== $author) {
throw new UnauthorizedAccessException("unauthorized_access");
}
try {
$db = $this->getConnection();
$sql = "UPDATE articles
SET title = :title, content = :content, author = :author, category = :category, tags = :tags
WHERE id = :id;";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
$success = $command->execute([
":id" => $id,
":title" => $article->getTitle(),
":content" => $article->getContent(),
":author" => $author,
":category" => $article->getCategory(),
":tags" => $article->getTags()
]);
// rowCount() prüft, ob eine Zeile mit dieser ID existierte und geändert werden konnte
if (!$success || $command->rowCount() === 0) {
// Falls die ID nicht existiert, prüfen wir, ob sie überhaupt da ist
if (!$this->getArticle($id)) {
throw new NotFoundException("missing_id");
}
}
} catch (PDOException $e) {
throw new InternalServerErrorException("internal_error");
}
}
public function deleteArticle($id, $author)
{
$article = getArticle($id);
if (empty($article)) {
throw new NotFoundException("not_found_article");
}
// Berechtigungsprüfung:
if ($article->getAuthor() !== $author) {
throw new UnauthorizedAccessException("unauthorized_access");
}
try {
$db = $this->getConnection();
$sql = "DELETE FROM articles WHERE id = :id;";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
if (!$command->execute([":id" => $id])) {
throw new InternalServerErrorException("internal_error");
}
} catch (PDOException $exc) {
throw new InternalServerErrorException("internal_error");
}
}
public function getArticle($id)
{
try {
$db = $this->getConnection();
$sql = "SELECT * FROM articles WHERE id = :id;";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
$command->execute([":id" => $id]);
$row = $command->fetch(PDO::FETCH_ASSOC);
if ($row) {
return new Article(
intval($row['id']),
$row['title'],
$row['content'],
$row['author'],
$row['category'],
$row['tags'],
$row['created']
);
}
return null;
} catch (PDOException $e) {
throw new InternalServerErrorException("internal_error");
}
}
public function getAllArticles()
{
try {
$db = $this->getConnection();
$sql = "SELECT * FROM articles;";
$command = $db->query($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
$rows = $command->fetchAll(PDO::FETCH_ASSOC);
$articles = [];
foreach ($rows as $row) {
$articles[] = new Article(
intval($row['id']),
$row['title'],
$row['content'],
$row['author'],
$row['category'],
$row['tags'],
$row['created']
);
}
return $articles;
} catch (PDOException $e) {
throw new InternalServerErrorException("internal_error");
}
}
public function getArticlesByAuthor($author)
{
try {
$db = $this->getConnection();
$sql = "SELECT * FROM articles WHERE author = :author;";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
$command->execute([":author" => $author]);
$rows = $command->fetchAll(PDO::FETCH_ASSOC);
$filteredArticles = [];
foreach ($rows as $row) {
$filteredArticles[] = new Article(
intval($row['id']),
$row['title'],
$row['content'],
$row['author'],
$row['category'],
$row['tags'],
$row['created']
);
}
return $filteredArticles;
} catch (PDOException $e) {
throw new InternalServerErrorException("internal_error");
}
}
public function getArticlesByCategory($category)
{
try {
$db = $this->getConnection();
$sql = "SELECT * FROM articles WHERE category = :category;";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
$command->execute([":category" => $category]);
$rows = $command->fetchAll(PDO::FETCH_ASSOC);
$filteredArticles = [];
foreach ($rows as $row) {
$filteredArticles[] = new Article(
intval($row['id']),
$row['title'],
$row['content'],
$row['author'],
$row['category'],
$row['tags'],
$row['created']
);
}
return $filteredArticles;
} catch (PDOException $exc) {
throw new InternalServerErrorException("internal_error");
}
}
public function search(string $keyword): array
{
// TODO: implement search()
return [];
}
}
+261
View File
@@ -0,0 +1,261 @@
<?php
require_once "UserManagerDAO.php";
/**
* Klasse für den Zugriff auf Benutzerdaten über eine SQLite-Datenbank.
*
* Diese Klasse verwendet PDO, Prepared Statements und speichert
* Benutzerdaten in der Datei db/users.db.
*/
class DatabaseUserManager implements UserManagerDAO {
private static $instance = null;
/**
* Konstruktor.
*
* Erstellt die Benutzerdatenbank und die Tabelle users,
* falls diese noch nicht existieren.
*
* @throws RuntimeException wenn die Datenbank nicht erstellt werden kann
*/
public function __construct()
{
try {
$db = $this->getConnection();
$db->exec("
CREATE TABLE IF NOT EXISTS users (
email TEXT PRIMARY KEY,
vorname TEXT NOT NULL,
nachname TEXT NOT NULL,
password TEXT NOT NULL
);
");
unset($db);
} catch (PDOException $e) {
throw new RuntimeException("Benutzerdatenbank konnte nicht erstellt werden.");
}
}
/**
* Baut eine Verbindung zur SQLite-Datenbank auf.
*
* @return PDO Datenbankverbindung
*
* @throws RuntimeException wenn keine Verbindung hergestellt werden kann
*/
private function getConnection()
{
try {
$dsn = 'sqlite:' . __DIR__ . '/../../db/users.db';
$db = new PDO($dsn, null, null);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
return $db;
} catch (PDOException $e) {
throw new RuntimeException("Verbindung zur Benutzerdatenbank fehlgeschlagen.");
}
}
/**
* Gibt die Singleton-Instanz des DatabaseUserManagers zurück.
*
* @return DatabaseUserManager Instanz des DatabaseUserManagers
*/
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new DatabaseUserManager();
}
return self::$instance;
}
/**
* Sucht einen Benutzer anhand seiner E-Mail-Adresse.
*
* @param string $email E-Mail-Adresse des Benutzers
*
* @return array|null Benutzerdaten als Array oder null,
* wenn kein Benutzer gefunden wurde
*
* @throws RuntimeException wenn der Benutzer nicht geladen werden kann
*/
public function findUser($email)
{
try {
$db = $this->getConnection();
$sql = "SELECT * FROM users WHERE email = :email";
$command = $db->prepare($sql);
$command->execute([
":email" => $email
]);
$user = $command->fetch(PDO::FETCH_ASSOC);
return $user ?: null;
} catch (PDOException $e) {
throw new RuntimeException("Benutzer konnte nicht geladen werden.");
}
}
/**
* Fügt einen neuen Benutzer in die Datenbank ein.
*
* Die Speicherung erfolgt innerhalb einer Transaktion.
* Doppelte E-Mail-Adressen werden durch den Primary Key verhindert.
*
* @param string $email E-Mail-Adresse des Benutzers
* @param string $vorname Vorname des Benutzers
* @param string $nachname Nachname des Benutzers
* @param string $password Passwort-Hash des Benutzers
*
* @return void
*
* @throws InvalidArgumentException wenn die E-Mail-Adresse bereits verwendet wird
* @throws RuntimeException wenn der Benutzer nicht gespeichert werden kann
*/
public function addUser($email, $vorname, $nachname, $password)
{
try {
$db = $this->getConnection();
$db->beginTransaction();
$sql = "
INSERT INTO users (email, vorname, nachname, password)
VALUES (:email, :vorname, :nachname, :password)
";
$command = $db->prepare($sql);
$command->execute([
":email" => $email,
":vorname" => $vorname,
":nachname" => $nachname,
":password" => $password
]);
$db->commit();
} catch (PDOException $e) {
if (isset($db) && $db->inTransaction()) {
$db->rollBack();
}
if ($e->getCode() === "23000") {
throw new InvalidArgumentException("Diese E-Mail-Adresse wird bereits verwendet.");
}
throw new RuntimeException("Benutzer konnte nicht gespeichert werden.");
}
}
/**
* Aktualisiert die Daten eines bestehenden Benutzers.
*
* Optional kann zusätzlich das Passwort geändert werden.
* Wenn kein neues Passwort übergeben wird, bleibt das alte Passwort erhalten.
*
* @param string $oldEmail Aktuelle E-Mail-Adresse des Benutzers
* @param string $newEmail Neue E-Mail-Adresse des Benutzers
* @param string $vorname Neuer Vorname des Benutzers
* @param string $nachname Neuer Nachname des Benutzers
* @param string|null $password Neues Passwort oder null
*
* @return bool true, wenn der Benutzer aktualisiert wurde,
* sonst false
*
* @throws InvalidArgumentException wenn die neue E-Mail-Adresse bereits verwendet wird
* @throws RuntimeException wenn der Benutzer nicht aktualisiert werden kann
*/
public function updateUser($oldEmail, $newEmail, $vorname, $nachname, $password = null)
{
try {
$db = $this->getConnection();
if (!empty($password)) {
$sql = "
UPDATE users
SET email = :newEmail,
vorname = :vorname,
nachname = :nachname,
password = :password
WHERE email = :oldEmail
";
$params = [
":newEmail" => $newEmail,
":vorname" => $vorname,
":nachname" => $nachname,
":password" => password_hash($password, PASSWORD_DEFAULT),
":oldEmail" => $oldEmail
];
} else {
$sql = "
UPDATE users
SET email = :newEmail,
vorname = :vorname,
nachname = :nachname
WHERE email = :oldEmail
";
$params = [
":newEmail" => $newEmail,
":vorname" => $vorname,
":nachname" => $nachname,
":oldEmail" => $oldEmail
];
}
$command = $db->prepare($sql);
$command->execute($params);
return $command->rowCount() > 0;
} catch (PDOException $e) {
if ($e->getCode() === "23000") {
throw new InvalidArgumentException("Diese E-Mail-Adresse wird bereits verwendet.");
}
throw new RuntimeException("Benutzer konnte nicht aktualisiert werden.");
}
}
/**
* Löscht einen Benutzer anhand seiner E-Mail-Adresse.
*
* @param string $email E-Mail-Adresse des zu löschenden Benutzers
*
* @return bool true, wenn der Benutzer gelöscht wurde,
* sonst false
*
* @throws RuntimeException wenn der Benutzer nicht gelöscht werden kann
*/
public function deleteUser($email)
{
try {
$db = $this->getConnection();
$sql = "DELETE FROM users WHERE email = :email";
$command = $db->prepare($sql);
$command->execute([
":email" => $email
]);
return $command->rowCount() > 0;
} catch (PDOException $e) {
throw new RuntimeException("Benutzer konnte nicht gelöscht werden.");
}
}
}
+236
View File
@@ -0,0 +1,236 @@
<?php
require_once 'ArticleManagerDAO.php';
require_once 'Article.php';
/**
* Klasse: Eine lokale Lösung des ArticleManagerDAO.
* Schreibt zunächst Daten lokal in das Verzeichnis und kann diese wieder auslesen.
*
* @author Niklas Ortmann
*/
class LocalArticleManager implements ArticleManagerDAO {
private $file;
private static $instance = null;
/**
* Konstruktor
*/
public function __construct()
{
$this->file = __DIR__ . '/../../data/articles.json';
}
/**
* Gibt die LocalArticleManager-Instanz zurück.
* @return LocalArticleManager
*/
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new LocalArticleManager();
}
return self::$instance;
}
/**
* Speichert alle Artikel/Beiträge in der Datei.
* @param $articles
* @return void
* TODO: Exceptions implementieren.
*/
public function saveArticle($articles)
{
file_put_contents(
$this->file,
json_encode($articles, JSON_PRETTY_PRINT)
);
}
public function addArticle($title, $content, $author, $category, $tags)
{
$articles = $this->getAllArticles();
$articles[] = [
"id" => count($articles)+1,
"title" => $title,
"content" => $content,
"author" => $author,
"category" => $category,
"tags" => $tags,
"creationDate" => date("Y-m-d H:i:s")
];
$this->saveArticle($articles);
}
public function updateArticle($id, $article, $author)
{
if (empty($article)) {
throw new InternalServerErrorException("internal_error");
}
// Berechtigungsprüfung:
if ($article->getAuthor() !== $author) {
throw new UnauthorizedAccessException("unauthorized_access");
}
// Beitrag aktualisieren:
$articles = $this->getAllArticles();
$updated = false;
foreach ($articles as $index => $storedArticle) {
if (isset($storedArticle['id']) && $storedArticle['id'] == $id) {
$articles[$index] = [
"id" => $id,
"title" => $article->getTitle(),
"content" => $article->getContent(),
"author" => $author,
"category" => $article->getCategory(),
"tags" => $article->getTags(),
"creationDate" => $article->getCreationDate()
];
$updated = true;
break;
}
}
// Nur speichern, wenn Beitrag geändert wurde:
if ($updated) {
$this->saveArticle($articles);
} else {
throw new NotFoundException("missing_id");
}
}
public function deleteArticle($id, $author)
{
$article = getArticle($id);
if (empty($article)) {
throw new NotFoundException("not_found_article");
}
// Berechtigungsprüfung:
if ($article->getAuthor() !== $author) {
throw new UnauthorizedAccessException("unauthorized_access");
}
$articles = $this->getAllArticles();
$articleFound = false;
foreach ($articles as $index => $article) {
if (isset($article['id']) && $article['id'] == $id) {
unset($articles[$index]);
$articleFound = true;
break; // Schleife abbrechen, da die ID eindeutig ist
}
}
if ($articleFound) {
// array_values stellt sicher, dass die Array-Keys wieder fortlaufend bei 0 beginnen
$this->saveArticle(array_values($articles));
}
}
public function getArticle($id)
{
$articles = $this->getAllArticles();
foreach ($articles as $article) {
if (isset($article['id']) && $article['id'] == $id) {
return new Article(intval($article['id']), $article['title'], $article['content'], $article['author'], $article['category'], $article['tags'], $article['creationDate']);
}
}
return null;
}
public function getAllArticles(): array
{
if (!file_exists($this->file)) {
return [];
}
$json = file_get_contents($this->file);
$articles = json_decode($json, true);
return is_array($articles) ? $articles : [];
}
public function getArticlesByAuthor($author)
{
$articles = $this->getAllArticles();
$filteredArticles = [];
foreach ($articles as $article) {
if (isset($article['author']) && $article['author'] == $author) {
$filteredArticles[] = new Article(
intval($article['id']),
$article['title'],
$article['content'],
$article['author'],
$article['category'],
$article['tags'],
$article['creationDate']
);
}
}
return $filteredArticles;
}
public function search(string $keyword): array
{
$articles = $this->getAllArticles();
$filteredArticles = [];
if (!is_array($articles)) {
return [];
}
$cleanKeyword = strtolower(trim($keyword));
foreach ($articles as $article) {
$title = isset($article['title']) ? strtolower((string)$article['title']) : '';
$content = isset($article['content']) ? strtolower((string)$article['content']) : '';
if (($cleanKeyword !== '' && strpos($title, $cleanKeyword) !== false) ||
($cleanKeyword !== '' && strpos($content, $cleanKeyword) !== false)) {
$filteredArticles[] = new Article(
intval($article['id'] ?? 0),
$article['title'] ?? '',
$article['content'] ?? '',
$article['author'] ?? '',
$article['category'] ?? '',
$article['tags'] ?? '',
$article['creationDate'] ?? ''
);
}
}
return $filteredArticles;
}
public function getArticlesByCategory($category)
{
$articles = $this->getAllArticles();
$filteredArticles = [];
foreach ($articles as $article) {
if (isset($article['category']) && $article['category'] == $category) {
$filteredArticles[] = new Article(
intval($article['id']),
$article['title'],
$article['content'],
$article['author'],
$article['category'],
$article['tags'],
$article['creationDate']
);
}
}
return $filteredArticles;
}
}
?>
+183
View File
@@ -0,0 +1,183 @@
<?php
require_once "UserManagerDAO.php";
class LocalUserManager implements UserManagerDAO {
private string $file = "data/users.json";
public static function getInstance(){
// TODO: implement the getIsntance method.
}
/**
* Lädt alle Benutzer aus der JSON-Datei.
*
* @return array Liste aller Benutzer
* @throws RuntimeException wenn die Datei nicht gelesen werden kann
* oder fehlerhafte JSON-Daten enthält
*/
private function loadUsers() {
if (!file_exists($this->file)) {
return [];
}
$json = file_get_contents($this->file);
if ($json === false) {
throw new RuntimeException("Benutzerdaten konnten nicht gelesen werden.");
}
$users = json_decode($json, true);
if ($users === null && json_last_error() !== JSON_ERROR_NONE) {
throw new RuntimeException("Benutzerdaten sind fehlerhaft.");
}
return is_array($users) ? $users : [];
}
/**
* Speichert alle Benutzer in die JSON-Datei.
*
* @param array $users Liste aller Benutzer
* @return void
* @throws RuntimeException wenn die Daten nicht gespeichert werden können
*/
private function saveUsers($users) {
$json = json_encode($users, JSON_PRETTY_PRINT);
if ($json === false) {
throw new RuntimeException("Benutzerdaten konnten nicht umgewandelt werden.");
}
$result = file_put_contents($this->file, $json);
if ($result === false) {
throw new RuntimeException("Benutzerdaten konnten nicht gespeichert werden.");
}
}
/**
* Sucht einen Benutzer anhand seiner E-Mail-Adresse.
*
* @param string $email E-Mail-Adresse des gesuchten Benutzers
* @return array|null Benutzerdaten oder null, wenn kein Benutzer gefunden wurde
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen werden können
*/
public function findUser($email) {
$users = $this->loadUsers();
foreach ($users as $user) {
if (isset($user["email"]) && $user["email"] === $email) {
if (!isset($user["vorname"]) && isset($user["username"])) {
$nameParts = explode(" ", $user["username"], 2);
$user["vorname"] = $nameParts[0] ?? "";
$user["nachname"] = $nameParts[1] ?? "";
}
return $user;
}
}
return null;
}
/**
* Fügt einen neuen Benutzer hinzu.
*
* @param string $email E-Mail-Adresse
* @param string $vorname Vorname
* @param string $nachname Nachname
* @param string $password Passwort-Hash
* @return void
* @throws InvalidArgumentException wenn die E-Mail-Adresse bereits verwendet wird
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen oder gespeichert werden können
*/
public function addUser($email, $vorname, $nachname, $password) {
$users = $this->loadUsers();
foreach ($users as $user) {
if (isset($user["email"]) && $user["email"] === $email) {
throw new InvalidArgumentException("Diese E-Mail-Adresse wird bereits verwendet.");
}
}
$users[] = [
"email" => $email,
"vorname" => $vorname,
"nachname" => $nachname,
"password" => $password
];
$this->saveUsers($users);
}
/**
* Aktualisiert einen bestehenden Benutzer.
*
* @param string $oldEmail Alte E-Mail-Adresse
* @param string $newEmail Neue E-Mail-Adresse
* @param string $vorname Neuer Vorname
* @param string $nachname Neuer Nachname
* @param string|null $password Neues Passwort oder null
* @return bool true, wenn der Benutzer aktualisiert wurde, sonst false
* @throws InvalidArgumentException wenn die neue E-Mail-Adresse bereits verwendet wird
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen oder gespeichert werden können
*/
public function updateUser($oldEmail, $newEmail, $vorname, $nachname, $password = null) {
$users = $this->loadUsers();
foreach ($users as $user) {
if (
isset($user["email"])
&& $user["email"] === $newEmail
&& $newEmail !== $oldEmail
) {
throw new InvalidArgumentException("Diese E-Mail-Adresse wird bereits verwendet.");
}
}
foreach ($users as $i => $user) {
if (isset($user["email"]) && $user["email"] === $oldEmail) {
$users[$i]["email"] = $newEmail;
$users[$i]["vorname"] = $vorname;
$users[$i]["nachname"] = $nachname;
unset($users[$i]["username"]);
if (!empty($password)) {
$users[$i]["password"] = password_hash($password, PASSWORD_DEFAULT);
}
$this->saveUsers($users);
return true;
}
}
return false;
}
/**
* Löscht einen Benutzer anhand seiner E-Mail-Adresse.
*
* @param string $email E-Mail-Adresse des zu löschenden Benutzers
* @return bool true, wenn der Benutzer gelöscht wurde, sonst false
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen oder gespeichert werden können
*/
public function deleteUser($email) {
$users = $this->loadUsers();
foreach ($users as $i => $user) {
if (isset($user["email"]) && $user["email"] === $email) {
unset($users[$i]);
$users = array_values($users);
$this->saveUsers($users);
return true;
}
}
return false;
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
require_once "LocalUserManager.php";
require_once "DatabaseUserManager.php";
/**
* Zentrale Klasse für den Zugriff auf Benutzerdaten.
*
* Hier kann zwischen lokaler Speicherung und Datenbankspeicherung
* gewechselt werden.
*/
class UserManager {
public static function getInstance() {
$userManager = DatabaseUserManager::getInstance();
/*
* Dummy-User anlegen, falls er noch nicht existiert.
* Passwort: test123
*/
if ($userManager->findUser("mustermann@web.de") == null) {
$userManager->addUser(
"mustermann@web.de",
"Max",
"Mustermann",
password_hash("test12345", PASSWORD_DEFAULT)
);
}
return $userManager;
}
}
+89
View File
@@ -0,0 +1,89 @@
<?php
/**
* Interface für den Zugriff auf Benutzerdaten.
*
* Definiert die Methoden, die jede UserDAO-Implementierung
* bereitstellen muss.
*/
interface UserManagerDAO {
/**
* Sucht einen Benutzer anhand seiner E-Mail-Adresse.
*
* Funktion:
* Liefert die gespeicherten Benutzerdaten zu einer E-Mail-Adresse.
*
* Eingabe:
* @param string $email E-Mail-Adresse des gesuchten Benutzers
*
* Ausgabe:
* @return array|null Benutzerdaten als Array oder null
*
* Mögliche Fehler:
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen werden können
*/
public function findUser($email);
/**
* Fügt einen neuen Benutzer hinzu.
*
* Funktion:
* Erstellt einen neuen Benutzereintrag und speichert ihn
* in der jeweiligen Datenquelle.
*
* Eingabe:
* @param string $email E-Mail-Adresse des Benutzers
* @param string $vorname Vorname des Benutzers
* @param string $nachname Nachname des Benutzers
* @param string $password Passwort des Benutzers
*
* Ausgabe:
* @return void
*
* Mögliche Fehler:
* @throws InvalidArgumentException wenn die E-Mail-Adresse bereits verwendet wird
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen oder gespeichert werden können
*/
public function addUser($email, $vorname, $nachname, $password);
/**
* Aktualisiert einen bestehenden Benutzer.
*
* Funktion:
* Ändert die E-Mail-Adresse, den Vornamen, den Nachnamen
* und optional das Passwort eines bestehenden Benutzers.
*
* Eingabe:
* @param string $oldEmail Alte E-Mail-Adresse
* @param string $newEmail Neue E-Mail-Adresse
* @param string $vorname Neuer Vorname
* @param string $nachname Neuer Nachname
* @param string|null $password Neues Passwort oder null
*
* Ausgabe:
* @return bool true, wenn der Benutzer aktualisiert wurde, sonst false
*
* Mögliche Fehler:
* @throws InvalidArgumentException wenn die neue E-Mail-Adresse bereits verwendet wird
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen oder gespeichert werden können
*/
public function updateUser($oldEmail, $newEmail, $vorname, $nachname, $password = null);
/**
* Löscht einen Benutzer anhand seiner E-Mail-Adresse.
*
* Funktion:
* Entfernt einen vorhandenen Benutzer aus der Datenquelle.
*
* Eingabe:
* @param string $email E-Mail-Adresse des zu löschenden Benutzers
*
* Ausgabe:
* @return bool true, wenn der Benutzer gelöscht wurde, sonst false
*
* Mögliche Fehler:
* @throws RuntimeException wenn die Benutzerdaten nicht gelesen oder gespeichert werden können
*/
public function deleteUser($email);
}
+107
View File
@@ -0,0 +1,107 @@
<?php
/**
* Prüft, ob der Autor auch der Eigentümer des Beitrags ist.
* @param $author
* @return true
* TODO: Implement this.
*/
function articleAuthorValidator($author)
{
return true;
}
/**
* Prüft, ob der Titel die folgenden Bedingungen erfüllt:
* Buchstaben von a-z; A-Z
* Zahlen von 0-9
* Umlaute äöüÄÖÜß
* Satzeichen .,!?:;()"„“«»_+-
* 5-120 Zeichen
* @param $title
* @return bool
*/
function articleTitleValidator($title)
{
$title = trim($title);
$titlePattern = '/^[a-zA-Z0-9äöüÄÖÜß\s.,!?:;()\'"„“«»_+-]{5,120}$/u';
if (preg_match($titlePattern, $title)) {
return true;
} else {
return false;
}
}
/**
* Prüft, ob der Contenttext 10-7000 Zeichen enthält.
* @param $content
* @return bool
*/
function articleContentValidator($content)
{
$content = trim($content);
$zeichenAnzahl = mb_strlen($content);
if ($zeichenAnzahl <= 7000 && $zeichenAnzahl >= 10) {
return true;
}else{
return false;
}
}
/**
* Prüft, ob die Kategorie eine erlaubt Kategorie ist.
* @param $category
* @return bool
*/
function articleCategoryValidator($category)
{
$allowedCategories = [
'deutsch', 'englisch', 'franzoesisch', 'latein', 'literatur',
'mathe', 'biologie', 'chemie', 'physik', 'informatik', 'astronomie',
'geschichte', 'erdkunde', 'sozialkunde', 'wirtschaft', 'religion',
'ethik', 'philosophie', 'psychologie', 'kunst', 'musik', 'theater',
'technik', 'werken', 'hauswirtschaft', 'sport'
];
if (in_array($category, $allowedCategories, true)) {
return true;
} else {
return false;
}
}
/**
* Prüft, ob die Tags die folgenden Bedingungen erfüllen:
* Buchstaben von a-z; A-Z
* Zahlen von 0-9
* Umlaute äöüÄÖÜß
* Satzeichen -
* 2-50 Zeichen
* @param $tags
* @return bool
*/
function articleTagValidator($tags)
{
if (!isset($tags)) {
$tags = '';
}
$rawTags = explode(',', $tags);
foreach ($rawTags as $rawTag) {
// Leerzeichen am Anfang/Ende des einzelnen Tags entfernen:
$tag = trim($rawTag);
// leere Elemente überspringen:
if ($tag === '') {
continue;
}
// Tag mit Regex prüfen:
$tagPattern = '/^[a-zA-Z0-9äöüÄÖÜß\s-]{2,50}$/u';
if (!preg_match($tagPattern, $tag)) {
return false;
}
}
return true;
}
?>
+75
View File
@@ -0,0 +1,75 @@
<?php
/**
* Prüft, ob ein Vor- oder Nachname gültig ist.
*
* Erlaubt werden Buchstaben, Umlaute, Leerzeichen und Bindestriche.
* Die Länge muss zwischen 2 und 20 Zeichen liegen.
*
* @param string $name Zu prüfender Name
*
* @return bool true wenn der Name gültig ist, sonst false
*/
function userNameValidator($name)
{
$name = trim($name);
$namePattern = '/^[a-zA-ZäöüÄÖÜß\s-]{2,20}$/u';
return preg_match($namePattern, $name) === 1;
}
/**
* Prüft, ob eine E-Mail-Adresse gültig ist.
*
* Die E-Mail-Adresse muss dem Standardformat entsprechen
* und darf höchstens 100 Zeichen lang sein.
*
* @param string $email Zu prüfende E-Mail-Adresse
*
* @return bool true wenn die E-Mail-Adresse gültig ist, sonst false
*/
function userEmailValidator($email)
{
$email = trim($email);
return filter_var($email, FILTER_VALIDATE_EMAIL) !== false
&& mb_strlen($email) <= 100;
}
/**
* Prüft, ob ein Passwort die Längenanforderungen erfüllt.
*
* Das Passwort muss zwischen 5 und 12 Zeichen lang sein.
*
* @param string $password Zu prüfendes Passwort
*
* @return bool true wenn das Passwort gültig ist, sonst false
*/
function userPasswordValidator($password)
{
$zeichenAnzahl = mb_strlen($password);
return $zeichenAnzahl >= 5 && $zeichenAnzahl <= 12;
}
/**
* Prüft ein optionales Passwort.
*
* Ein leeres Passwort ist erlaubt und bedeutet,
* dass das bestehende Passwort unverändert bleibt.
* Falls ein Passwort angegeben wurde, wird es
* mit den normalen Passwortregeln geprüft.
*
* @param string|null $password Zu prüfendes Passwort
*
* @return bool true wenn das Passwort gültig oder leer ist,
* sonst false
*/
function userOptionalPasswordValidator($password)
{
if (!isset($password) || $password === '') {
return true;
}
return userPasswordValidator($password);
}
-56
View File
@@ -1,56 +0,0 @@
<?php
// Webhook: erfasst einen push auf dem dev (und aktualisiert das Webverzeichnis des Servers)
// Quelle: https://docs.gitea.com/usage/webhooks
ini_set('error_log', __DIR__ . '/tmp.log');
$secret_key = '763489347';
// check for POST request
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
error_log('FAILED - not POST - '. $_SERVER['REQUEST_METHOD']);
exit();
}
// get content type
$content_type = isset($_SERVER['CONTENT_TYPE']) ? strtolower(trim($_SERVER['CONTENT_TYPE'])) : '';
if ($content_type != 'application/json') {
error_log('FAILED - not application/json - '. $content_type);
exit();
}
// get payload
$payload = trim(file_get_contents("php://input"));
if (empty($payload)) {
error_log('FAILED - no payload');
exit();
}
// get header signature
$header_signature = isset($_SERVER['HTTP_X_GITEA_SIGNATURE']) ? $_SERVER['HTTP_X_GITEA_SIGNATURE'] : '';
if (empty($header_signature)) {
error_log('FAILED - header signature missing');
exit();
}
// calculate payload signature
$payload_signature = hash_hmac('sha256', $payload, $secret_key, false);
// check payload signature against header signature
if ($header_signature !== $payload_signature) {
error_log('FAILED - payload signature');
exit();
}
// convert json to array
$decoded = json_decode($payload, true);
// check for json decode errors
if (json_last_error() !== JSON_ERROR_NONE) {
error_log('FAILED - json decode - '. json_last_error());
exit();
}
// success, do something
error_log('SUCCESS - Webhook hat funktioniert');