Compare commits

...

322 Commits

Author SHA1 Message Date
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
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
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
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
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
44 changed files with 2207 additions and 455 deletions
Generated
+3
View File
@@ -10,6 +10,9 @@
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.0">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
-40
View File
@@ -1,40 +0,0 @@
<!--
Seite: 404 Seite nicht gefunden
Funktion: Wenn eine Seite nicht gefunden wurde oder noch fehlt, dann wird hierauf verwiesen.
-->
<!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>
<main>
<?php
include_once 'includes/navbar.php';
?>
<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>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
<!--
Seite: 404 Seite nicht gefunden
Funktion: Wenn eine Seite nicht gefunden wurde oder noch fehlt, dann wird hierauf verwiesen.
-->
<main>
<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>
+118
View File
@@ -0,0 +1,118 @@
<?php
session_start();
?>
<!--
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" class="btn-publish">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>
@@ -2,28 +2,6 @@
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">
<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>Datenschutz</h1>
@@ -38,10 +16,3 @@ include_once 'includes/navbar.php';
</p>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
+24 -6
View File
@@ -1,8 +1,25 @@
<?php
include_once 'php/controller/home-controller.php';
?>
<!--
Seite: Home
Inhalt: Beinhaltet den Inhalt der Startseite
-->
<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
unset($_SESSION["message"]);
?>
<h1>Home</h1>
<p>
@@ -17,24 +34,25 @@
<!-- Flexbox -->
<div class="flexbox">
<div class="container">
<a href="informatik.php" class="category-link">Informatik</a>
<a href="index.php?pfad=informatik" class="category-link">Informatik</a>
<div class="article-link">
<a href="datenschutzVSdatensicherheit.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 class="container">
<a href="mathe.php" class="category-link">Mathe</a>
<a href="index.php?pfad=mathe" class="category-link">Mathe</a>
<div class="article-link">
<a href="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 class="container">
<a href="physik.php" class="category-link">Physik</a>
<a href="index.php?pfad=physik" class="category-link">Physik</a>
<div class="article-link">
<a href="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>
</main>
-28
View File
@@ -2,27 +2,6 @@
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">
<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>
@@ -38,10 +17,3 @@ include_once 'includes/navbar.php';
</p>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
-27
View File
@@ -2,26 +2,6 @@
Seite: Informatik
Inhalt: Eine Übersicht über alle Beiträge zum Fach
-->
<!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>Informatik</h1>
@@ -39,10 +19,3 @@ include_once 'includes/navbar.php';
<a href="datenschutzVSdatensicherheit.php">Datenschutz vs. Datensicherheit</a>
</div>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
-28
View File
@@ -2,27 +2,6 @@
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">
<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 class="login-page">
<div class="login-container">
@@ -51,10 +30,3 @@ include_once 'includes/navbar.php';
</form>
</div>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
-28
View File
@@ -2,27 +2,6 @@
Seite: Mathe
Inhalt: Eine Übersicht über alle Beiträge zum Fach
-->
<!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>Mathe</h1>
@@ -41,10 +20,3 @@ include_once 'includes/navbar.php';
<a href="pythagoras.php">Satz des Pythagoras</a>
</div>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
@@ -10,10 +10,10 @@
<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="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>
-28
View File
@@ -2,27 +2,6 @@
Seite: Physik
Inhalt: Eine Übersicht über alle Beiträge zum Fach
-->
<!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>Physik</h1>
@@ -42,10 +21,3 @@ include_once 'includes/navbar.php';
</div>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
+95
View File
@@ -0,0 +1,95 @@
<!--
Content: Profil
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
-->
<?php
include_once 'php/controller/profileArticles-controller.php';
?>
<main class="form-page">
<div class="flexbox">
<!-- Linke Spalte: Profildaten -->
<div class="container">
<form>
<label class="input-label">Vorname</label>
<input type="text" name="Vorname" class="login-input" required
placeholder="Vorname"
value="<?php //DB-Daten ?>">
<label class="input-label">Nachname</label>
<input type="text" name="Nachname" class="login-input" required
placeholder="Nachname"
value="<?php //DB-Daten ?>">
<label class="input-label">Email-Adresse</label>
<input type="email" name="Email" class="login-input" required
placeholder="mustermann@web.de"
value="<?php //DB-Daten ?>">
<label class="input-label">Passwort</label>
<input type="password" name="Passwort" class="login-input"
required placeholder="Passwort">
<button type="submit" class="login-button">
Speichern
</button>
<button type="button" class="login-button delete-account-button">
Account löschen
</button>
</form>
</div>
<!-- Rechte Spalte: Eigene Beiträge -->
<div class="container">
<h2 class="section-title">Meine Beiträge</h2>
<div class="articles-list">
<?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 elseif (isset($userArticles) && count($userArticles) > 0): ?>
<?php foreach ($userArticles as $userArticle): ?>
<!-- Ein einzelner Artikel-Eintrag -->
<div class="article-item">
<div class="article-meta">
<span class="article-date"><?php echo htmlspecialchars($userArticle->getCreationDate()); ?></span>
<span class="article-category"><?php echo htmlspecialchars($userArticle->getCategory()); ?></span>
</div>
<h3 class="article-title"><?php echo htmlspecialchars($userArticle->getTitle()); ?></h3>
<?php
$tags = $userArticle->getTags();
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
$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="login-button" onclick="window.location.href='index.php?pfad=createArticle';">
Beitrag erstellen!
</button>
<?php endif; ?>
<?php
unset($_SESSION["message"]);
?>
</div>
</div>
</div>
</main>
-27
View File
@@ -2,27 +2,6 @@
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">
<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 class="login-page">
<div class="login-container">
@@ -51,9 +30,3 @@ include_once 'includes/navbar.php';
</form>
</div>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
+125
View File
@@ -0,0 +1,125 @@
<?php
session_start();
?>
<!--
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">
<!-- Suchleiste Box -->
<div class="s-res-sidebar-box">
<h3 class="s-res-sidebar-title">Suche anpassen</h3>
<form action="#" method="GET" class="s-res-search-form">
<input type="search" id="site-search" name="q" placeholder="Suchen..." class="nav__search">
<button type="submit" class="nav__search-button">Suchen</button>
</form>
</div>
<!-- Sortierfuntion Box -->
<div class="s-res-sidebar-box">
<h3 class="s-res-sidebar-title">Sortierung</h3>
<div class="s-res-filter-group">
<label class="s-res-filter-option">
<input type="radio" name="sort" value="alphabet" checked>
<span>Alphabetisch</span>
</label>
<label class="s-res-filter-option">
<input type="radio" name="sort" value="likes">
<span>Beliebtheit (Likes)</span>
</label>
<label class="s-res-filter-option">
<input type="radio" name="sort" value="newest">
<span>Neueste Beiträge</span>
</label>
<label class="s-res-filter-option">
<input type="radio" name="sort" value="oldest">
<span>Älteste Beiträge</span>
</label>
</div>
</div>
</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">3 Treffer für Ihre Suchanfrage</p>
</div>
<!-- Ergebnisliste -->
<div class="s-res-list">
<?php
if(isset($_SESSION['message']) && $_SESSION['message'] == "new_search_results"): ?>
<!-- TODO: Hier die Beiträge ausgeben. -->
<?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"]);
?>
<!-- Beispielbeitrag -->
<div class="s-res-item">
<div class="s-res-content">
<h2 class="s-res-item-title">
<a href="#" class="s-res-link">Pythagoras</a>
</h2>
<p class="s-res-author">Von: <span class="s-res-author-name">Max Mustermann</span></p>
</div>
<div class="s-res-arrow">&rarr;</div>
</div>
<!-- Beispielbeitrag -->
<div class="s-res-item">
<div class="s-res-content">
<h2 class="s-res-item-title">
<a href="#" class="s-res-link">Pythagoras</a>
</h2>
<p class="s-res-author">Von: <span class="s-res-author-name">Max Mustermann</span></p>
</div>
<div class="s-res-arrow">&rarr;</div>
</div>
<!-- Beispielbeitrag -->
<div class="s-res-item">
<div class="s-res-content">
<h2 class="s-res-item-title">
<a href="#" class="s-res-link">Pythagoras</a>
</h2>
<p class="s-res-author">Von: <span class="s-res-author-name">Max Mustermann</span></p>
</div>
<div class="s-res-arrow">&rarr;</div>
</div>
</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>
+142
View File
@@ -0,0 +1,142 @@
<?php
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
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" class="btn-publish">Ä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>
+128
View File
@@ -0,0 +1,128 @@
/* 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 */
.article-editor-scope .btn-publish {
background-color: #007cba;
color: white;
border: none;
padding: 12px;
border-radius: 4px;
font-weight: 600;
cursor: pointer;
font-size: 1rem;
width: 100%;
}
.article-editor-scope .btn-publish:hover {
background-color: #006ba1;
}
/* 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;
}
}
-2
View File
@@ -1,7 +1,5 @@
/* FooterGrundlayout */
footer {
position: fixed;
bottom: 0;
width: 100%;
background: #333d43;
text-align: center;
+24 -2
View File
@@ -3,18 +3,29 @@ main {
max-width:1200px;
margin: 0 auto;
padding: 20px;
font-family: Arial, sans-serif;
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;
}
.flexbox {
display: flex;
flex-direction: column;
flex-direction: row;
flex-wrap: wrap;
gap: 20px;
margin-top: 30px;
}
@@ -26,6 +37,7 @@ body {
border: 1px solid #dbe3ec;
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 {
@@ -200,3 +212,13 @@ body {
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;
}
+23 -2
View File
@@ -79,6 +79,8 @@ CSS für die navbar
text-decoration: none;
font-weight: 600;
margin-left: 0.5rem;
white-space: nowrap;
}
.nav__search {
@@ -149,8 +151,8 @@ CSS für die navbar
display: none;
}
/* Responsive Anpassungen unter 660px (für z.B. Smartphones) */
@media (max-width: 660px) {
/* Responsive Anpassungen unter 760px (für z.B. Smartphones) */
@media (max-width: 760px) {
.nav {
flex-direction: row;
flex-wrap: wrap;
@@ -205,6 +207,10 @@ CSS für die navbar
margin-left: 4px;
}
.nav__search-button:hover {
background-color: #f8f9fa;
}
/* restliche desktop-navbar aus */
.nav__center,
.nav__right .nav__button,
@@ -227,6 +233,9 @@ CSS für die navbar
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 {
@@ -237,6 +246,18 @@ CSS für die navbar
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;
+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
+3 -3
View File
@@ -1,5 +1,5 @@
<footer>
<a href="impressum.php">Impressum</a>
<a href="datenschutz.php">Datenschutz</a>
<a href="nutzungsbedingungen.php">Nutzungsbedingungen</a>
<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>
+63 -58
View File
@@ -15,56 +15,60 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
</label>
<ul id="mobile-nav" class="nav__mobile-menu">
<li><a href="profile.php">Profil</a></li>
<li><a href="login.php">Anmelden</a></li>
<li><a href="register.php">Registrieren</a></li>
<li>
<label for="nav-toggle" class="nav__close-btn">&times;</label>
</li>
<li><a href="index.php?pfad=profile">Profil</a></li>
<li><a href="index.php?pfad=login">Anmelden</a></li>
<li><a href="index.php?pfad=register">Registrieren</a></li>
<li><a href="index.php?pfad=createArticle">Beitrag erstellen</a></li>
<li>
<label class="nav__mobile-label">Sprachen</label>
<ul class="nav__mobile-submenu">
<li><a href="404.php">Deutsch</a></li>
<li><a href="404.php">Englisch</a></li>
<li><a href="404.php">Französisch</a></li>
<li><a href="404.php">Latein</a></li>
<li><a href="404.php">Literatur</a></li>
<li><a href="index.php?pfad=deutsch">Deutsch</a></li>
<li><a href="index.php?pfad=englisch">Englisch</a></li>
<li><a href="index.php?pfad=franzoesisch">Französisch</a></li>
<li><a href="index.php?pfad=latein">Latein</a></li>
<li><a href="index.php?pfad=literatur">Literatur</a></li>
</ul>
</li>
<li>
<label class="nav__mobile-label">MINT</label>
<ul class="nav__mobile-submenu">
<li><a href="mathe.php">Mathematik</a></li>
<li><a href="404.php">Biologie</a></li>
<li><a href="404.php">Chemie</a></li>
<li><a href="physik.php">Physik</a></li>
<li><a href="informatik.php">Informatik</a></li>
<li><a href="404.php">Astronomie</a></li>
<li><a href="index.php?pfad=mathe">Mathematik</a></li>
<li><a href="index.php?pfad=biologie">Biologie</a></li>
<li><a href="index.php?pfad=chemie">Chemie</a></li>
<li><a href="index.php?pfad=englisch">Physik</a></li>
<li><a href="index.php?pfad=informatik">Informatik</a></li>
<li><a href="index.php?pfad=astronomie">Astronomie</a></li>
</ul>
</li>
<li>
<label class="nav__mobile-label">Gesellschaft & Werte</label>
<ul class="nav__mobile-submenu">
<li><a href="404.php">Geschichte</a></li>
<li><a href="404.php">Erdkunde</a></li>
<li><a href="404.php">Sozialkunde</a></li>
<li><a href="404.php">Wirtschaftskunde</a></li>
<li><a href="404.php">Religion</a></li>
<li><a href="404.php">Ethikunterricht</a></li>
<li><a href="404.php">Philosophie</a></li>
<li><a href="404.php">Psychologie</a></li>
<li><a href="404.php">Kunst</a></li>
<li><a href="404.php">Musik</a></li>
<li><a href="404.php">Theater</a></li>
<li><a href="index.php?pfad=geschichte">Geschichte</a></li>
<li><a href="index.php?pfad=erdkunde">Erdkunde</a></li>
<li><a href="index.php?pfad=sozialkunde">Sozialkunde</a></li>
<li><a href="index.php?pfad=wirtschaft">Wirtschaftskunde</a></li>
<li><a href="index.php?pfad=religion">Religion</a></li>
<li><a href="index.php?pfad=ethik">Ethikunterricht</a></li>
<li><a href="index.php?pfad=philosophie">Philosophie</a></li>
<li><a href="index.php?pfad=psychologie">Psychologie</a></li>
<li><a href="index.php?pfad=kunst">Kunst</a></li>
<li><a href="index.php?pfad=musik">Musik</a></li>
<li><a href="index.php?pfad=theater">Theater</a></li>
</ul>
</li>
<li>
<label class="nav__mobile-label">Technik & Praxis</label>
<ul class="nav__mobile-submenu">
<li><a href="404.php">Technik</a></li>
<li><a href="404.php">Werken</a></li>
<li><a href="404.php">Hauswirtschaft</a></li>
<li><a href="404.php">Sport</a></li>
<li><a href="index.php?pfad=technik">Technik</a></li>
<li><a href="index.php?pfad=werken">Werken</a></li>
<li><a href="index.php?pfad=hauswirtschaft">Hauswirtschaft</a></li>
<li><a href="index.php?pfad=sport">Sport</a></li>
</ul>
</li>
</ul>
@@ -74,59 +78,60 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
<div class="nav__item nav__dropdown">
<button class="nav__dropdown-toggle">Sprachen</button>
<div class="nav__dropdown-menu">
<a href="404.php">Deutsch</a>
<a href="404.php">Englisch</a>
<a href="404.php">Französisch</a>
<a href="404.php">Latein</a>
<a href="404.php">Literatur</a>
<a href="index.php?pfad=deutsch">Deutsch</a>
<a href="index.php?pfad=englisch">Englisch</a>
<a href="index.php?pfad=franzoesisch">Französisch</a>
<a href="index.php?pfad=latein">Latein</a>
<a href="index.php?pfad=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="mathe.php">Mathematik</a>
<a href="404.php">Biologie</a>
<a href="404.php">Chemie</a>
<a href="physik.php">Physik</a>
<a href="informatik.php">Informatik</a>
<a href="404.php">Astronomie</a>
<a href="index.php?pfad=mathe">Mathematik</a>
<a href="index.php?pfad=biologie">Biologie</a>
<a href="index.php?pfad=chemie">Chemie</a>
<a href="index.php?pfad=physik">Physik</a>
<a href="index.php?pfad=informatik">Informatik</a>
<a href="index.php?pfad=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="404.php">Geschichte</a>
<a href="404.php">Erdkunde</a>
<a href="404.php">Sozialkunde</a>
<a href="404.php">Wirtschaftskunde</a>
<a href="404.php">Religion</a>
<a href="404.php">Ethikunterricht</a>
<a href="404.php">Philosophie</a>
<a href="404.php">Psychologie</a>
<a href="404.php">Kunst</a>
<a href="404.php">Musik</a>
<a href="404.php">Theater</a>
<a href="index.php?pfad=geschichte">Geschichte</a>
<a href="index.php?pfad=erdkunde">Erdkunde</a>
<a href="index.php?pfad=sozialkunde">Sozialkunde</a>
<a href="index.php?pfad=wirtschaft">Wirtschaftskunde</a>
<a href="index.php?pfad=religion">Religion</a>
<a href="index.php?pfad=ethik">Ethikunterricht</a>
<a href="index.php?pfad=philosophie">Philosophie</a>
<a href="index.php?pfad=psychologie">Psychologie</a>
<a href="index.php?pfad=kunst">Kunst</a>
<a href="index.php?pfad=musik">Musik</a>
<a href="index.php?pfad=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="404.php">Technik</a>
<a href="404.php">Werken</a>
<a href="404.php">Hauswirtschaft</a>
<a href="404.php">Sport</a>
<a href="index.php?pfad=technik">Technik</a>
<a href="index.php?pfad=werken">Werken</a>
<a href="index.php?pfad=hauswirtschaft">Hauswirtschaft</a>
<a href="index.php?pfad=sport">Sport</a>
</div>
</div>
</div>
<div class="nav__right">
<a href = "profile.php" class="nav_item nav__link">Profil</a>
<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 = "login.php" class="nav__item nav__button">Anmelden</a>
<a href = "register.php" class="nav__item nav__button">Registrieren</a>
<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>
<a href="index.php?pfad=createArticle" class="nav__item nav__button">Beitrag erstellen</a>
</div>
</nav>
+27 -9
View File
@@ -1,6 +1,15 @@
<?php
session_start();
if (!isset($abs_path)) {
require_once "path.php";
}
require_once $abs_path . "/php/controller/index-controller.php";
?>
<!--
Seite: Hompage der Lernplattform
Funktion: Webseitengerüst, Anzeigen von Beiträgen, Suchfunktion etc.
Seite: Index der Lernplattform
Funktion: Webseitengerüst, Anzeigen von Content
-->
<!DOCTYPE html>
<html lang="de">
@@ -14,20 +23,29 @@
<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
include_once 'includes/navbar.php';
//Dynamischer Inhalt (später mit php...):
include_once 'content/home.php';
?>
<?php
include_once 'includes/footer.php';
//Dynamischer Inhalt:
if (isset($_GET["pfad"])) {
if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) {
include_once $abs_path . '/content/' . $_GET["pfad"] . '.php';
} else {
include_once $abs_path . '/content/404.php';
}
} else {
include_once $abs_path . '/content/home.php';
}
include_once $abs_path . '/includes/footer.php';
?>
</body>
+4
View File
@@ -0,0 +1,4 @@
<?php
// mit $_SERVER['DOCUMENT_ROOT'] später umbauen?
$abs_path = __DIR__;
?>
@@ -0,0 +1,86 @@
<?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 = "max.mustermann"; // TODO: später aus Session den angemeldeten Nutzer beziehen.
$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();
}
}
?>
+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
?>
@@ -0,0 +1,21 @@
<?php
/*
* Controller für die Liste der eigenen Beiträge eines Nutzers auf der eigenen Profilseite
*/
session_start();
require_once 'php/model/Article.php';
require_once 'php/model/ArticleManager.php';
try {
$author = "max.mustermann"; // TODO: später Nutzer aus der Session beziehen.
$articleManager = ArticleManager::getInstance();
$userArticles = $articleManager->getArticlesByAuthor($author);
if(!isset($userArticles)) {
$_SESSION["message"] = "user_has_no_articles";
}
} catch (Exception $e) {
$_SESSION["message"] = "internal_error";
}
?>
@@ -0,0 +1,29 @@
<?php
session_start();
require_once '../model/LocalArticleManager.php';
require_once '../model/ArticleManager.php';
if ($_SERVER["REQUEST_METHOD"] === "POST") {
if(!isset($_POST["search"])){
$_SESSION["message"] = "missing_parameters";
header("location: ../../index.php?pfad=search-results");
} else {
$search = $_POST["search"];
try {
$articleManager = ArticleManager::getInstance();
$articleManager->search($search); // TODO: Methode implementieren.
} catch (Exception $e){
$_SESSION["message"] = "internal_error";
}
$_SESSION["message"] = "new_search_results";
// TODO: Liste mit Artikeln in der Suchreihenfolge übertragen.
// Weiterleitung zur Suchergebnisanzeige
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,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"] ?? '';
$_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 = "max.mustermann"; // TODO: später aus Session den angemeldeten Nutzer beziehen.
$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"] = "internal_error";
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
{
private $id;
private $title;
private $content;
private $author;
private $creationDate;
private $category;
private $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;
}
}
?>
+47
View File
@@ -0,0 +1,47 @@
<?php
require_once 'LocalArticleManager.php';
require_once 'Article.php';
/**
* Die Klasse beinhaltet alle Methoden für die Operation mit den Artikel-Daten.
*
* @author Niklas Ortmann
*/
class ArticleManager extends LocalArticleManager
{
public static function getInstance()
{
$articleManager = LocalArticleManager::getInstance(); // TODO: später durch DataBaseArticleManager ersetzen.
// 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;
}
}
+71
View File
@@ -0,0 +1,71 @@
<?php
require_once "Article.php";
/**
* 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
*
* Mögliche Exceptions:
* TODO Fehlerbeschreibung hinzufügen & tags hinzufügen
*/
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
*
* TODO: Fehlerbeschreibung hinzufügen
*/
public function updateArticle($id, $article, $author);
/**
* Löscht einen Beitrag aus übergebener ID.
* @param $id
* @return void
*
* TODO: Fehlerbeschreibung hinzufügen
*/
public function deleteArticle($id);
/**
* Beitrag aufrufen.
* $id ID des Beitrags
*
* @return Article
* Mögliche Exceptions:
* TODO Fehlerbeschreibung hinzufügen
*/
public function getArticle($id);
/**
* Alle Beiträge aufrufen.
*
* Mögliche Exceptions:
* TODO Fehlerbeschreibung hinzufügen
*/
public function getAllArticles();
/**
* Gibt alle Beiträge eines Nutzer mit einer gegebenen ID aus.
* @param $author
* @return Article[]
*/
public function getArticlesByAuthor($author);
}
?>
+172
View File
@@ -0,0 +1,172 @@
<?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
*/
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)) {
// TODO: Implement Exception.
return;
}
// Berechtigungsprüfung:
if ($article->getAuthor() !== $author) {
// TODO: Implement Exception.
return;
}
// 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;
}else{
// TODO: Implement Exception.
return;
}
}
// Nur speichern, wenn Beitrag geändert wurde:
if ($updated) {
$this->saveArticle($articles);
}
}
public function deleteArticle($id)
{
$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;
}
}
?>
+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;
}
?>
-73
View File
@@ -1,73 +0,0 @@
<!--
Seite: Profil
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
-->
<!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 class="form-page">
<div class="form-container">
<form>
<label class="input-label">Vorname</label>
<input type="text" name="Vorname" class="login-input" required
placeholder="Vorname"
value="<?php //DB-Daten ?>">
<label class="input-label">Nachname</label>
<input type="text" name="Nachname" class="login-input" required
placeholder="Nachname"
value="<?php //DB-Daten ?>">
<label class="input-label">Email-Adresse</label>
<input type="email" name="Email" class="login-input" required
placeholder="mustermann@web.de"
value="<?php //DB-Daten ?>">
<label class="input-label">Passwort</label>
<input type="password" name="Passwort" class="login-input"
required placeholder="Passwort">
<br>
<button type="submit" class="login-button">
Speichern
</button>
<br><br>
<button type="button" class="login-button">
Account löschen
</button>
</form>
</div>
</main>
<?php
include_once 'includes/footer.php';
?>
</body>
</html>
-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');