Anmeldung läuft

This commit is contained in:
Robert
2024-01-17 15:23:48 +01:00
parent aa936198c8
commit d47f00093a
125 changed files with 1459 additions and 4444 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
#n:emensawerbeseite
!<md> [1704890629000, 0, null, null, -2147483648, -2147483648]
!<md> [1705498483000, 0, null, null, -2147483648, -2147483648]

178
.idea/workspace.xml generated
View File

@@ -4,10 +4,132 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="6dcbe3e4-9d68-41d8-8c39-5cfbe5cd4a21" name="Changes" comment="Webseite ohne Anmeldung läuft auf laravel">
<list default="true" id="6dcbe3e4-9d68-41d8-8c39-5cfbe5cd4a21" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/dataSources/a1d1df29-b94a-4ad6-bd6f-a458b97a6c0c.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/a1d1df29-b94a-4ad6-bd6f-a458b97a6c0c.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/a1d1df29-b94a-4ad6-bd6f-a458b97a6c0c/storage_v2/_src_/schema/emensawerbeseite.YLWk-w.meta" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/a1d1df29-b94a-4ad6-bd6f-a458b97a6c0c/storage_v2/_src_/schema/emensawerbeseite.YLWk-w.meta" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/a1d1df29-b94a-4ad6-bd6f-a458b97a6c0c/storage_v2/_src_/schema/emensawerbeseite.YLWk-w.zip" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/a1d1df29-b94a-4ad6-bd6f-a458b97a6c0c/storage_v2/_src_/schema/emensawerbeseite.YLWk-w.zip" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M5/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/M5/composer.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/README.md" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/bin/composer.phar" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/composer.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/composer.lock" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/config/db.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/controllers/AnmeldungController.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/controllers/DemoController.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/controllers/ExampleController.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/controllers/HomeController.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/controllers/MainController.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/models/benutzer.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/models/gericht.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/models/gerichte_main.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/models/gerichte_self.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/models/kategorie.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/css/default.min.css" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/css/style.css" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/favicon.ico" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/fh-logo.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/00_image_missing.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/01_bratkartoffel.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/03_bratkartoffel.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/04_tofu.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/06_lasagne.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/09_suppe.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/10_forelle.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/11_soup.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/12_kassler.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/13_reibekuchen.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/15_pilze.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/17_broetchen.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/19_mousse.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/20_suppe.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/gerichte/license.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/mensa21.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/img/test.jpg" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/index.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/public/js/highlight.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/public/js/highlight.min.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/routes/web.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/.layouts.layout_7b6f1811f474eb66a51163e3ee689e7d001c551d.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/.layouts.layout_933596b3f8bdab5243334e13bf36856f2a87605f.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/.layouts.m4_7d_layout_ecc36cbad49aa38782cc08cc5e9ca6c7ae3590d0.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/debug_1cfaf3bc805922afe3272185b5787ee3e27fa4ad.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/demo.dbdata_371b3aba36aa73bbc6704e7ce839ac185b43f3a9.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/demo.demo_ce8d2fe4373603a01d84973e3d70c715b31a9f25.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/demo.demo_fc1036c569380dbc95c820cc4f5096087e39b268.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/examples.m4_7a_queryparameter_964ef996681a5d33ee4d5aaa7f2b050eecc4776f.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/examples.m4_7b_kategorie_c59dd864b2a765e6d956c6e0068f677059df2848.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/examples.m4_7c_gerichte_24dbedd391e1a47ee18b0686a8182fae7dda8164.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/examples.m4_7c_gerichte_f6e172e91bf4a8eefe847109a3dadc12c05eac5d.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/examples.pages.m4_7d_page_1_9bd1621c44e988fb7b6f833fbcefbbdad2f15bc6.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/examples.pages.m4_7d_page_2_ed122779e3e904882984750d979c216b1e98ea8d.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/home_be3f101c28919ade210629435b0b22d1f6f23f27.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/layouts.layout_2f0f79205058eeea097745ed1e89073738d8b7f7.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/layouts.main_layout_3661f571e5a2129da3ca081fa828422117d3b345.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/layouts.main_layout_54314409e9b1b39431b6e14f05f203008160a8be.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/layouts.main_layout_9f099eee303f11c8c3f1b61e05a54e7376df8add.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/layouts.main_layout_ff0dbbbcc8c331f06acac2bd395c317de615c9d1.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/m5_a1.abmeldung_17f241c320c4a8a9a33bfe29835f14c33bd19626.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/m5_a1.anmeldung_01c45fd41d095952aa184fb3fc764d18878732cb.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/m5_a1.anmeldung_c24d33e917eb7ef9d14d646f11f37749504ff5c8.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/m5_a1.anmeldung_verifizieren_06701b6bf7b5936abd21c6cfbe469b752d069cec.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/m5_a1.layout_anmeldung_0bf7f1c53d4cd4970b2790535eaffcc9dddc4266.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/m5_a1.layout_anmeldung_1d2201c8d2863f98b9f307af886814b8305ccb32.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/main.index_1dae39c16001572743356f32c7852146f9bbc1ec.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/main.index_9109369b5cbb1a20226820e2c52ae9625c829d43.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/main.index_b8ca93da07664813b96b9705f586eaa04a44db3c.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/cache/main.index_f9ba54cc63d68ab97f296301b5ce3ed3926b073a.bladec" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/logs/anmeldung.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/storage/logs/werbeseite_log.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/autoload.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/bin/bladeonecli" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/ClassLoader.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/InstalledVersions.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/LICENSE" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/autoload_classmap.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/autoload_namespaces.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/autoload_psr4.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/autoload_real.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/autoload_static.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/installed.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/installed.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/composer/platform_check.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/.github/workflows/php.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/LICENSE" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/composer.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/lib/BladeOne.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/lib/BladeOneCache.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/lib/BladeOneCacheRedis.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/lib/BladeOneCustom.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/vendor/eftec/bladeone/lib/bladeonecli" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/anmeldung/anmeldung.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/debug.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/demo/dbdata.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/demo/demo.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/demo/requestdata.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/examples/m4_7a_queryparameter.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/examples/m4_7b_kategorie.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/examples/m4_7c_gerichte.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/examples/pages/m4_7d_page_1.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/examples/pages/m4_7d_page_2.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/home.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/layouts/layout.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/layouts/m4_7d_layout.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/layouts/main_layout.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/m5_a1/abmeldung.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/m5_a1/anmeldung.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/m5_a1/anmeldung_nichtkorrekt.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/m5_a1/anmeldung_verifizieren.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/m5_a1/layout_anmeldung.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/main/index.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/Dossier/emensa/views/notimplemented.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/app/Http/Controllers/AnmeldungController.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/app/Http/Controllers/AnmeldungController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/app/Http/Controllers/MainController.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/app/Http/Controllers/MainController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/app/Models/Gerichte.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/app/Models/Gerichte.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/app/Models/benutzer.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/app/Models/benutzer.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/resources/views/m5_a1/anmeldung.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/resources/views/m5_a1/anmeldung.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/resources/views/m5_a1/anmeldung_verifizieren.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/resources/views/m5_a1/anmeldung_verifizieren.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/resources/views/main/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/resources/views/main/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/M6/emensamobile/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/M6/emensamobile/routes/web.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -57,33 +179,33 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;database.data.extractors.current.export.id&quot;: &quot;Comma-separated (CSV)_id&quot;,
&quot;git-widget-placeholder&quot;: &quot;dev/m6__robert&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/rober/Documents/GitHub/DBWT-Praktika/M6/emensamobile/resources/views&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"database.data.extractors.current.export.id": "Comma-separated (CSV)_id",
"git-widget-placeholder": "dev/m6__robert",
"last_opened_file_path": "C:/Users/rober/Documents/GitHub/DBWT-Praktika/M6/emensamobile/public",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "preferences.pluginManager",
"vue.rearranger.settings.migration": "true"
},
&quot;keyToStringList&quot;: {
&quot;DatabaseDriversLRU&quot;: [
&quot;mariadb&quot;
"keyToStringList": {
"DatabaseDriversLRU": [
"mariadb"
]
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\rober\Documents\GitHub\DBWT-Praktika\M6\emensamobile\public" />
<recent name="C:\Users\rober\Documents\GitHub\DBWT-Praktika\M6\emensamobile\resources\views" />
<recent name="C:\Users\rober\Documents\GitHub\DBWT-Praktika\M6\emensamobile\app\Models" />
<recent name="C:\Users\rober\Documents\GitHub\DBWT-Praktika\M6\emensamobile\public" />
<recent name="C:\Users\rober\Documents\GitHub\DBWT-Praktika\M6\emensamobile\resources\css" />
<recent name="C:\Users\rober\Documents\GitHub\DBWT-Praktika\M6\emensamobile\app\Http\Controllers" />
</key>
@@ -108,7 +230,9 @@
<workItem from="1705065239294" duration="1925000" />
<workItem from="1705405736678" duration="5488000" />
<workItem from="1705414744237" duration="1967000" />
<workItem from="1705488930166" duration="2798000" />
<workItem from="1705488930166" duration="3342000" />
<workItem from="1705492444098" duration="553000" />
<workItem from="1705493014644" duration="6656000" />
</task>
<task id="LOCAL-00001" summary="Webseite ohne Anmeldung läuft auf laravel">
<option name="closed" value="true" />
@@ -118,7 +242,15 @@
<option name="project" value="LOCAL" />
<updated>1705491845444</updated>
</task>
<option name="localTasksCounter" value="2" />
<task id="LOCAL-00002" summary="Webseite ohne Anmeldung läuft auf laravel">
<option name="closed" value="true" />
<created>1705491897073</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1705491897073</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -1,5 +1,7 @@
{
"require": {
"monolog/monolog": "^3.0"
"monolog/monolog": "^3.0",
"ext-mysqli": "*",
"ext-pdo": "*"
}
}

View File

@@ -1,22 +0,0 @@
# Routingscript MVC
little routing script for use in DBWT
intended to run with only one dependency (bladeone).
## usage
* start this script by either executing `start_server.bat` or running `php -S 127.0.0.1:9000 -t public` in a shell from the project´s root directory.
* [open the website](http://127.0.0.1:9000/)
## folder overview
* `bin/` is only necessary if you need to use composer and dont have it installed already
* `config/` holds configuration files
* `controllers/` contains all Controller Classes
* `models/` contains the Model Classes
* `public/` is the web root for your http server and contains the routing script itself, next to resources that will be accessible by http clients (css, js, images, etc.)
* `storage/` is necessary to hold Blade Cache Files
* `views/` holds all View Files

View File

@@ -1,36 +0,0 @@
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/gericht.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/kategorie.php');
class DemoController
{
public function dbconnect() {
$data = db_gericht_select_all();
// Frage Daten aus kategorie ab:
// $data = db_kategorie_select_all();
return view('demo.dbdata', ['data' => $data]);
}
public function demo(RequestData $rd) {
$vars = [
'bgcolor' => $rd->query['bgcolor'] ?? 'ffffff',
'name' => $rd->query['name'] ?? 'Dich',
'rd' => $rd
];
return view('demo.demo', $vars);
}
/**
* error action for debug purposes
* @throws Exception
* @noinspection PhpUnusedLocalVariableInspection
*/
public function error(RequestData $rd) {
$test = $rd;
throw new Exception("Not implemented");
}
public function requestdata(RequestData $rd) {
return view('demo.requestdata', ['rd' => $rd]);
}
}

View File

@@ -1,47 +0,0 @@
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/kategorie.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/gerichte_self.php');
class ExampleController
{
public function m4_6a_queryparameter(RequestData $rd) {
/*
Wenn Sie hier landen:
bearbeiten Sie diese Action,
so dass Sie die Aufgabe löst
*/
$rd = $rd->query['name'] ?? 'Kein Name angegeben';
return view('examples.m4_7a_queryparameter', [
'request'=>$rd,
'url' => 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"
]);
}
public function m4_7b_kategorie() {
$data = db_kategorie_select_all();
return view('examples.m4_7b_kategorie', [
'data'=>$data,
]);
}
public function m4_7c_gerichte() {
$data = db_gericht_select_intern();
return view('examples.m4_7c_gerichte', [
'data'=>$data,
]);
}
public function m4_7d(RequestData $rd) {
$rd = $rd->query['no'] ?? 1;
if ($rd == 1)
return view('examples.pages.m4_7d_page_1', []);
elseif ($rd == 2)
return view('examples.pages.m4_7d_page_2', []);
}
}

View File

@@ -1,14 +0,0 @@
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/gericht.php');
/* Datei: controllers/HomeController.php */
class HomeController
{
public function index(RequestData $request) {
return view('home', ['rd' => $request ]);
}
public function debug(RequestData $request) {
return view('debug');
}
}

View File

@@ -1,23 +0,0 @@
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/gerichte_main.php');
class MainController
{
public function index() {
/*
Wenn Sie hier landen:
bearbeiten Sie diese Action,
so dass Sie die Aufgabe löst
*/
$data = db_gericht_select_karte();
return view('main.index', [
'data'=>$data,
'url' => 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"
]);
}
}

View File

@@ -1,27 +0,0 @@
<?php
/**
* Diese Datei enthält alle SQL Statements für die Tabelle "gerichte"
*/
function db_gericht_select_all() {
try {
$link = connectdb();
$sql = 'SELECT id, name, beschreibung FROM gericht ORDER BY name';
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_BOTH);
mysqli_close($link);
}
catch (Exception $ex) {
$data = array(
'id'=>'-1',
'error'=>true,
'name' => 'Datenbankfehler '.$ex->getCode(),
'beschreibung' => $ex->getMessage());
}
finally {
return $data;
}
}

View File

@@ -1,62 +0,0 @@
<?php
function db_gericht_select_karte()
{
try {
$link = connectdb();
$sql_gerichte = "SELECT * FROM gericht ORDER BY RAND() LIMIT 5";
$result_sql_gerichte = mysqli_query($link, $sql_gerichte);
$result_sql_gerichte1 = mysqli_query($link, $sql_gerichte);
$verwendete_allergene_code = [];
$verwendete_allergene_string = "";
while ($row_gerichte = mysqli_fetch_assoc($result_sql_gerichte)) {
// Abfrage der vorhandenen Allergene im aktuellen Gericht
$sql_gericht_hat_allergene = "SELECT * FROM gericht_hat_allergen WHERE gericht_id=" . $row_gerichte['id'];
$result_sql_gericht_hat_allergene = mysqli_query($link, $sql_gericht_hat_allergene);
$allergene = "";
while ($row_allergene = mysqli_fetch_assoc($result_sql_gericht_hat_allergene)) {
$allergene .= $row_allergene['code'] . ", ";
if (!in_array($row_allergene['code'], $verwendete_allergene_code)) {
$verwendete_allergene_code[] = $row_allergene['code'];
}
}
}
$sql_allergen = "SELECT code, name FROM allergen";
$result_sql_allergen = mysqli_query($link, $sql_allergen);
$data = [
"allergene" => $verwendete_allergene_string,
"result_sql_allergen" => $result_sql_allergen,
"verwendete_allergene_code" => $verwendete_allergene_code,
"result_sql_gerichte" => $result_sql_gerichte1,
"allergene1" => $allergene
];
mysqli_close($link);
} catch (Exception $ex) {
$data = array(
'id' => '-1',
'error' => true,
'name' => 'Datenbankfehler ' . $ex->getCode(),
'beschreibung' => $ex->getMessage());
} finally {
return $data;
}
}

View File

@@ -1,23 +0,0 @@
<?php
function db_gericht_select_intern()
{
try {
$link = connectdb();
$sql = 'SELECT name, preisintern FROM gericht WHERE preisintern > 2 ORDER BY name DESC';
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_BOTH);
mysqli_close($link);
} catch (Exception $ex) {
$data = array(
'id' => '-1',
'error' => true,
'name' => 'Datenbankfehler ' . $ex->getCode(),
'beschreibung' => $ex->getMessage());
} finally {
return $data;
}
}

View File

@@ -1,15 +0,0 @@
<?php
/**
* Diese Datei enthält alle SQL Statements für die Tabelle "kategorie"
*/
function db_kategorie_select_all() {
$link = connectdb();
$sql = "SELECT * FROM kategorie ORDER BY name ASC";
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_BOTH);
mysqli_close($link);
return $data;
}

View File

@@ -1,96 +0,0 @@
* {
font-family: Arial;
}
.grid {
display: grid;
grid-template-columns: 200px auto 200px;
}
img {
width: 100%;
height: auto;
}
.speisen {
border: solid;
border-collapse: collapse;
}
.speisen td {
border: solid;
border-collapse: collapse;
border-radius: 4px;
padding: 5px;
width: auto;
}
.speisen td:not(:first-of-type) {
text-align: center;
}
.speisen img{
width: 100px;
height: 100px;
}
p {
text-align: justify;
}
.zahlen {
list-style-type: none;
display: grid;
grid-template-columns: auto auto auto;
gap: 10px;
}
.zahlen p {
text-align: center;
font-weight: bold;
}
.formular {
display: grid;
grid-template-columns: auto auto auto;
justify-content: start;
gap: 10px;
}
.wichtig {
text-align: center;
}
.wichtigListe {
display: inline-block;
text-align: left;
}
.freude {
text-align: center;
}
footer {
border-top: 1px solid;
}
.fusszeile {
padding-top: 20px;
padding-bottom: 20px;
margin-left: auto;
margin-right: auto;
border: none;
}
.fusszeile td:first-child {
border-left: none;
padding-left: 20px;
padding-right: 20px;
}
.fusszeile td {
border-left: 3px solid;
padding-left: 20px;
padding-right: 20px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@@ -1,6 +0,0 @@
Grafiken von unsplash.com.
Lizenz:
https://unsplash.com/license
Letzter Zugriff 31.08.2020

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,373 +0,0 @@
<?php
// start session
session_start();
// if session just started and uid is not set, add initial information such as user agent and ip address
if (!isset($_SESSION['uid']))
{
$_SESSION['ipremote'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['useragent'] = $_SERVER['HTTP_USER_AGENT'];
}
else
{
// uid is set in session variables. User gets logged out in case of changed ip address and user agent.
if ($_SESSION['ipremote'] !== $_SERVER['REMOTE_ADDR'] && $_SESSION['useragent'] !== $_SERVER['HTTP_USER_AGENT'])
{
session_unset();
session_destroy();
}
// if client information has not changed just regenerate the session
session_regenerate_id(true);
}
const VERBOSITY = 0;
const PUBLIC_DIRNAME = "public";
const CONFIG_WEBROUTES = "/../routes/web.php"; // like in laravel
const CONFIG_DB = "/../config/db.php";
const ROUTER_VERSION = '0.8.2';
assert_php_version('8.2.0');
assert_path();
try {
if (!file_exists(realpath($_SERVER['DOCUMENT_ROOT'] . "/../vendor/autoload.php"))) {
echo "<h1>Abhängigkeiten nicht gefunden</h1><pre>DOCUMENT_ROOT: {$_SERVER['DOCUMENT_ROOT']}</pre><br><p>Datei nicht gefunden: <strong>{$_SERVER['DOCUMENT_ROOT']}/../vendor/autoload.php</strong></p>";
echo "<p>Häufigste Ursache</p><ul>
<li>Das Verzeichnis <code>public/</code> ist <em>nicht</em> als Wurzelverzeichnis verwendet worden.</li>
<li>Die Abhängigkeiten wurden nicht mit <code>composer update</code> installiert.</code></li>
</ul>";
exit(1);
}
// file exists
require_once realpath($_SERVER['DOCUMENT_ROOT'] . "/../vendor/autoload.php");
} catch (Exception $ex) {
echo "<code>DOCUMENT_ROOT</code><br><pre>{$_SERVER['DOCUMENT_ROOT']}</pre><code>Error</code><br><pre>" . $ex->getMessage() . "</pre>";
}
use eftec\bladeone\BladeOne;
/* Routing Script for PHP Dev Server */
$verbosity = VERBOSITY;
if (preg_match('/\.(?:css|js|png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) {
return false;
} else {
if ($verbosity > 1) {
echo
"<pre>Verbosity-Level: <strong>{$verbosity}</strong></pre>" .
"<pre>" . print_r($_SERVER, 1) . "</pre><hr>";
}
FrontController::handleRequest("$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]", $_SERVER['REQUEST_METHOD'], VERBOSITY);
}
class RequestData
{
/**
* @var array Request Querystring, broken down to key-value pairs
*/
public array $query;
/**
* @var array Request arguments from path, after cutting two segments out for controller and action names
*/
public array $args;
/**
* @var string HTTP Verb used
*/
public string $method;
public function getData()
{
return array_merge($_GET, $_POST);
}
/**
* @return array
*/
public function getPostData()
{
return $_POST;
}
/**
* @return array
*/
public function getGetData()
{
return $_GET;
}
/**
* RequestData is the way the Router will provide information, use it in your Action methods.
* @param $method string Verb used
* @param $args array Arguments
* @param $query array Key-Value Pairs
*/
public function __construct($method, $args, $query)
{
$this->query = $query;
$this->args = $args;
$this->method = $method;
}
}
class FrontController
{
public static function handleRequest($url, $method = 'GET', $verbosity = 0, $configPath = CONFIG_WEBROUTES)
{
assert_blade(); // check if the class is found
if (!str_contains($url, ':')) $url = $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];
$scriptPath = dirname(__FILE__, 2) . '/';
$controllerDirectory = $scriptPath . 'controllers/';
// get a router/web-like config array to override filebased convention
$config = FrontController::getConfig($configPath);
// /Impressum/ --> ImpressumController->index()
$request = parse_url($url);
$ctrlName = $request['path'];
$actionName = 'index';
$args = array();
$query = array();
parse_str($request['query'] ?? "", $query);
// provide POST data
if ($method != 'GET')
$query = array_merge($query, $_REQUEST);
// check, if route has two levels
if (strpos($ctrlName, '/', 1) > 0) {
$path = explode('/', $request['path']); // Werbeseite/Speise/1/mobile?pretty=true&user=marcel
array_shift($path); // skip once
$ctrlName = array_shift($path); // Werbeseite
$actionName = array_shift($path); // Speise
$args = $path; // remainder of path-parts // [1][mobile]
if ($verbosity > 1) {
echo "<pre>Request\n", print_r($request), "</pre>";
echo "<pre>Path\n", print_r($path), "</pre>";
echo "<pre>Query\n", print_r($query), "</pre>";
}
}
// fix: trim slashes
$ctrlName = trim($ctrlName, '/');
$actionName = trim($actionName, '/');
// $config based renaming of Controller/Action, precedes filebased convention
// $config values must use syntax <ClassController>@<actionname>
if (array_key_exists('/' . $ctrlName . '/' . $actionName, $config)) {
$routingConfig = explode('@', $config['/' . $ctrlName . '/' . $actionName]);
if ($verbosity > 0) {
echo "<p>Routing Config matched request for <code>/" . $ctrlName . "/" . $actionName . "</code>:</p><p>routing config is</p><pre>" . print_r($routingConfig, 1) . '</pre>';
}
// important: overwriting controller and action name
$ctrlClass = $routingConfig[0];
$actionName = $routingConfig[1];
} elseif (array_key_exists($request['path'], $config)) {
// exact match on full path, this also means "/"
$routingConfig = explode('@', $config[$request['path']]);
if ($verbosity > 0) {
echo "<p>Routing Config matched for full path <code>" . $request['path'] . "</code>:</p><p>routing config is</p><pre>" . print_r($routingConfig, 1) . '</pre>';
}
// important: overwriting controller and action name
$ctrlClass = $routingConfig[0];
$actionName = $routingConfig[1];
} else {
if ($verbosity > 0) {
echo "Request $ctrlName/$actionName was not in \$config.";
}
// fall back to filebased convention: match controller classes in directory
$ctrlClass = ucfirst($ctrlName . 'Controller');
}
$ctrlFile = ($ctrlClass . '.php');
$validControllers = FrontController::getValidControllers($controllerDirectory);
if (!in_array($controllerDirectory . $ctrlFile, $validControllers)) {
if ($verbosity > 0) {
echo "<div><p>Controller: $ctrlFile not found in</p><pre>" . print_r($validControllers, 1) . "</pre><p>Config Array:</p><pre>" . print_r($config, 1) . "</pre></div>";
}
// #ERROR
FrontController::showErrorMessage("<h1>Web Software Error</h1><img alt='shrug' src='https://c.tenor.com/9TEDud6eP2UAAAAC/woody-woodpecker-shrug-shoulders.gif'>" .
"<p>Keine entspreche Zuordnung der Route für {$ctrlName}::{$actionName} gefunden. Tippfehler in der Route?" .
"<p>Es konnte keine Klasse <abbr title='Gesucht im Verzeichnis {$controllerDirectory}'>" . $ctrlFile . "</abbr> gefunden werden! Request fehlgeschlagen.</p>" .
"<p> Prüfen Sie die Einträge in der Datei <code>config/web.php</code> und gleichen Sie den getätigten Aufruf damit ab.</p>");
}
// a file matching has been found, now try to load the class
try {
require_once $controllerDirectory . $ctrlFile;
// instantiate the controller
$controller = new $ctrlClass();
$rd = new RequestData($method, $args, $query);
if ($verbosity > 0) {
var_dump($controller, $rd);
}
// the controller will load model and view and return some html
print call_user_func_array(array($controller, $actionName), array($rd));
} catch (Exception $ex) {
// #ERROR
FrontController::showErrorMessage(
"<h2>Fehler in Controller " . get_class($controller) . "!</h2><p>Stellen Sie sicher, dass die Action/der Controller existiert.</p>
<p>Das Routing Config-Array hat " . count($config) . " Einträge.</p>
<p><strong>Exception text</strong><br>" . $ex->getMessage() . "</p>");
}
}
public static function showErrorMessage($text, $severity = 3, $die = true)
{
$styles = array(0 => "background-color: #F08170; border: 2px solid lightgray; padding: 2em; margin: 5em; width: 50%; box-shadow: 0em 0em 1em #F08170;",
1 => "background-color: #F08170; border: 2px solid lightgray; padding: 2em; margin: 5em; width: 50%; box-shadow: 0em 0em 1em #F08170;",
2 => "background-color: #F08170; border: 2px solid lightgray; padding: 2em; margin: 5em; width: 50%; box-shadow: 0em 0em 1em #F08170;",
3 => "background-color: #F08170; border: 2px solid lightgray; padding: 2em; margin: 5em; width: 50%; box-shadow: 0em 0em 1em #F08170;");
print("<div style=\"{$styles[$severity]}\">{$text}</div>");
if ($die) exit($severity);
}
public static function getConfig($configPath)
{
try {
// load the $config Array from a file given in $configPath
$path_to_config = realpath($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $configPath);
// print("Path to config " . $path_to_config);
$config = include $path_to_config;
} catch (Exception $e) {
print_r($e);
$config = array('/' => 'HomeController@index');
} finally {
return $config;
}
}
public static function getValidControllers($path = '')
{
if ($path == '') {
$path = getcwd() . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;
}
return glob($path . '*Controller.php');
}
}
function connectdb()
{
$path_to_config_db = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . CONFIG_DB;
$config = include $path_to_config_db;
$link = mysqli_connect( // Daten aus config/db.php
$config['host'],
$config['user'],
$config['password'],
$config['database'], // Auswahl der Datenbank
$config['port'] ?? 3306);
if (!$link) {
FrontController::showErrorMessage("<h1>Verbindung mit der Datenbank nicht möglich</h1>
<p style='margin-bottom: 2em;'>Verbindung fehlgeschlagen: <code>" . mysqli_connect_error() . "</code>.</p>
<h2>Prüfen Sie</h2><ol><li>die Angaben in der Datei <code>config/db.php</code>:
( ist Benutzer <code>{$config['user']}</code> an Datenbank <code>{$config['database']}</code> auf Server <code>{$config['host']}</code> korrekt?)<br>
</li><li>ob Ihre Datenbank unter der oben gezeigten Adresse läuft </li></ol>");
exit(1);
}
if (mysqli_connect_errno()) {
FrontController::showErrorMessage("<h1>Verbindung mit der Datenbank nicht möglich</h1>
<code>Fehlermeldung</code><pre>" . mysqli_connect_error() . "</pre>", 2, true);
exit(1);
}
return $link;
}
function view($viewname, $viewargs = array())
{
$views = dirname(__DIR__) . '/views';
$cache = dirname(__DIR__) . '/storage/cache';
$blade = new BladeOne($views, $cache, BladeOne::MODE_DEBUG);
return $blade->run($viewname, $viewargs);
}
/**
* let the script die if the php minimum version is not met.
* @param $minversion
* @return void
*/
function assert_php_version($minversion = '8.0.0')
{
$version_too_low = 0;
$minver = explode('.', $minversion);
$version = explode('.', phpversion());
if (intval($minver[0]) > intval($version[0])) {
$version_too_low = 1;
} elseif (intval($minver[1]) > intval($version[1])) {
$version_too_low = 1;
} elseif (intval($minver[2]) > intval($version[2])) {
$version_too_low = 1;
}
if ($version_too_low) {
FrontController::showErrorMessage("Diese PHP-Version wird nicht unterstützt: <strong>Minimum PHP Version " . $minversion . "</strong><br>Sie betreiben gerade PHP Version " . phpversion());
exit(1);
}
// version is okay, go on.
}
/**
* let the script die if the path contains problematic characters.
* @return void
*/
function assert_path(): void
{
static $chars = array("[", "]", "{", "}");
$charsfound = 0;
str_ireplace($chars, '', $_SERVER['DOCUMENT_ROOT'], $charsfound);
if ($charsfound > 0) {
FrontController::showErrorMessage("<h1>Bitte verwenden Sie einen anderen Ordner für das Projekt!</h1>
<p>Der Pfad <strong>" . $_SERVER['DOCUMENT_ROOT'] . "</strong> enthält <code>" . $charsfound . "</code> problematische Zeichen, die die korrekte Ausführung verhindern.</p>>
<p>Bekannte problematische Zeichen sind</p>
<pre> " . implode(" ", $chars) . " </pre>");
exit(1);
}
}
function assert_blade(): void
{
if (!class_exists('eftec\bladeone\BladeOne')) {
// #ERROR
FrontController::showErrorMessage("
<h1>Fehler: Blade wurde nicht gefunden</h1>
<p>Tipps für die Lösung:</p>
<ul>
<li><p>führen Sie im Terminal folgende Zeilen aus.</p>
<ol>
<li><code>php bin/composer.phar update</code> oder <code>php bin/composer.phar reinstall eftec/bladeone</code></li>
<li><code>php bin/composer.phar dump-autoload</code></li>
</ol>
<li><p>Prüfen Sie im Anschluss: befindet sich in dem Ordner <code>vendor/eftec/bladeone/lib/</code> die Datei <code>BladeOne.php</code> ?</p></li>
<li><p>Starten Sie dann den Webserver neu.</p></li>
<li><p>Befragen Sie gerne auch das Forum in Ilias.</p></li>
</ul>
</div>");
exit(1);
}
}
use Monolog\Level;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
function logger($name, $path){
$fullpath = $path . '\\' . $name . '.txt';
$log = new Logger($name);
$log->pushHandler(new StreamHandler($fullpath), Level::Warning);
return $log;
}

View File

@@ -1,28 +0,0 @@
<?php
/**
* Mapping of paths to controllers.
* Note, that the path only supports one level of directory depth:
* /demo is ok,
* /demo/subpage will not work as expected
*/
return array(
'/' => "MainController@index",
"/demo" => "DemoController@demo",
'/dbconnect' => 'DemoController@dbconnect',
'/debug' => 'HomeController@debug',
'/error' => 'DemoController@error',
'/requestdata' => 'DemoController@requestdata',
// Erstes Beispiel:
'/m4_6a_queryparameter' => 'ExampleController@m4_6a_queryparameter',
'/m4' => 'ExampleController@m4_6a_queryparameter',
'/m4_7b_kategorie' => 'ExampleController@m4_7b_kategorie',
'/m4_7c_gerichte' => 'ExampleController@m4_7c_gerichte',
'/m4_7d' => 'ExampleController@m4_7d',
'/anmeldung' => 'AnmeldungController@start',
'/anmeldung_verifizieren' => 'AnmeldungController@anmeldung_verifizieren',
'/anmeldung_fehler' => 'AnmeldungController@check',
'/abmeldung' => 'AnmeldungController@abmelden'
);

View File

@@ -1,23 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title>E-Mensa Routing Script</title>
<meta name="description" content="unused">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/default.min.css">
<?php echo $this->yieldContent("cssextra"); ?>
<meta name="theme-color" content="#dadada">
<!-- good developers check the markup ;) -->
</head>
<body>
<div class="container">
<div class="row">
<?php echo $this->yieldContent("content"); ?>
</div>
</div>
<?php echo $this->yieldContent("jsextra"); ?>
</body>
</html>

View File

@@ -1,23 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title>E-Mensa Routing Script</title>
<meta name="description" content="unused">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/default.min.css">
<?php echo $this->yieldContent("cssextra"); ?>
<meta name="theme-color" content="#dadada">
<!-- good developers check the markup ;) -->
</head>
<body>
<div class="container">
<div class="row">
<?php echo $this->yieldContent("content"); ?>
</div>
</div>
<?php echo $this->yieldContent("jsextra"); ?>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
<?php echo $this->yieldContent("header"); ?>
<!-- good developers check the markup ;) -->
</head>
<body>
<?php echo $this->yieldContent("body"); ?>
<footer>
<table class="fusszeile">
<?php echo $this->yieldContent("footer"); ?>
</table>
</footer>
</body>
</html>

View File

@@ -1,6 +0,0 @@
<h1>This is a blade view showing phpinfo();</h1>
<p><a href="/">go back</a>.</p>
<?php
phpinfo();
?>

View File

@@ -1,94 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("content"); ?>
<div>
<h1>Demo für <?php echo \htmlentities($name??'', ENT_QUOTES, 'UTF-8', false); ?></h1>
<p>Kurze Übersicht, wie die Arbeit mit dem Router und der Blade View-Engine funktioniert.</p>
<h2>Router</h2>
<p>Der Router nimmt den Request entgegen und zerlegt ihn in die einzelnen Teile der URI. Wichtig ist hier vor
allem der Pfad und der Querystring.</p>
<p>Wenn der Pfad in der Routenkonfiguration (<code>\$config</code> Array aus der Datei
<code>routes/web.php</code>) gefunden wird, lädt der Router die angegebene Klasse.</p>
<h3>Funktionsweise</h3>
<p>Im vorliegenden Beispiel sehen Sie diese Seite ... </p>
<ol>
<li>weil der Pfad in der Routenkonfiguration gefunden wurde</li>
<li>und dort <span class="code">'DemoController@howto'</span> hinterlegt ist</li>
<li>und im Ordner <span class="code">controllers/</span> die Datei <code class="language-php">DemoController.php</code> gefunden werden konnte
</li>
<li>und mit ihr ein Objekt des Typs <span class="code">DemoController</span> instanziiert werden konnte</li>
<li>und dieses Objekt die Funktion (Action) <span class="code">howto()</span> ausgeführt hat</li>
</ol>
<p>Sie sehen: da muss einiges stimmen und vieles davon ist Konvention.</p>
<h3>Querystrings und Pfadsegmente</h3>
<p>Die Actions in den Controller-Klassen sollen per Konvention immer ein <span class="code">RequestData</span> Objekt
entgegennehmen. Beispiel: <code class="language-php">howto(RequestData \$rd)</code></p>
<p>Dieses RequestData Objekt wird durch den Router befüllt, wenn Daten in der URL extrahiert werden konnten.</p>
<p>Daten finden sich URLs...</p>
<ul>
<li>
<p>
<strong>im Querystring</strong><br>Beispiel: rufen Sie diese mit
<code class="language-http"><?php echo \htmlentities(strtolower(explode('/',$_SERVER["SERVER_PROTOCOL"])[0])??'', ENT_QUOTES, 'UTF-8', false); ?>://<?php echo \htmlentities($_SERVER["HTTP_HOST"]??'', ENT_QUOTES, 'UTF-8', false); ?>/demo?<strong>bgcolor=fefbd8&name=Remmy</strong></code>
auf, werden <span class="language-php">bgcolor</span> und <code class="language-php">name</code> mitsamt Werten als Query Array
<code class="language-php">$rd->query</code>) übergeben
</p>
</li>
</ul>
<p>Probieren Sie es aus ;)</p>
<?php if(count($rd->args)): ?>
<p><strong>Argumente dieses Aufrufs:</strong></p>
<?php $__empty_1 = true; foreach($rd->args as $a): $__empty_1 = false; ?>
<div><span class="code"><?php echo \htmlentities($a??'', ENT_QUOTES, 'UTF-8', false); ?></span></div>
<?php endforeach; if ($__empty_1): ?>
<p>Keine weiteren Argumente im Request</p>
<?php endif; ?>
<?php endif; ?>
<?php if(count($rd->query)): ?>
<p><strong>Daten aus der Query dieses Aufrufs:</strong></p>
<pre><code class="language-php">
<?php $__empty_1 = true; foreach($rd->query as $k => $v): $__empty_1 = false; ?>
$rd->query['<?php echo \htmlentities($k??'', ENT_QUOTES, 'UTF-8', false); ?>']=<?php echo \htmlentities($v??'', ENT_QUOTES, 'UTF-8', false); ?>
<?php endforeach; if ($__empty_1): ?>
<p>Keine Querydaten</p>
<?php endif; ?>
</code></pre>
<?php endif; ?>
<h2>Blade</h2>
<p>Blade <a href="https://github.com/EFTEC/BladeOne#install-pick-one-of-the-next-one">muss installiert</a> sein.
Die Installation ist bereits geschehen und die Bibliothek liegt unter /vendor.
</p>
<h3>Daten übergeben und View rendern</h3>
<p>Bei der Verwendung der View-Engine gelten einige Konventionen:
Die Dateien müssen <code class="language-php">&lt;viewname&gt;.blade.php</code> heißen und im Ordner <code class="language-php">views</code> liegen.
</p>
<p>Sie können der View dann Daten mitgeben, indem Sie alle Daten in ein Array schreiben und dieses dann
übergeben.</p>
<p>Beispiel:</p>
<pre><code class="language-php">
view("viewtest",
array(
"texts"=>$textArray,
"persona"=>$persona,
"rd"=>$rd
)); // öffnet ../views/viewtest.blade.php
</code></pre>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("cssextra"); ?>
<style>
body > div {background-color: <?php echo \htmlentities('#' . $bgcolor??'', ENT_QUOTES, 'UTF-8', false); ?>; }
</style>
<?php $this->stopSection(); ?>
<?php $this->startSection("jsextra"); ?>
<script src="/js/highlight.min.js"></script><script>hljs.highlightAll();</script>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild(".layouts.layout"); } ?>

View File

@@ -1,94 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("content"); ?>
<div>
<h1>Demo für <?php echo \htmlentities($name??'', ENT_QUOTES, 'UTF-8', false); ?></h1>
<p>Kurze Übersicht, wie die Arbeit mit dem Router und der Blade View-Engine funktioniert.</p>
<h2>Router</h2>
<p>Der Router nimmt den Request entgegen und zerlegt ihn in die einzelnen Teile der URI. Wichtig ist hier vor
allem der Pfad und der Querystring.</p>
<p>Wenn der Pfad in der Routenkonfiguration (<code>\$config</code> Array aus der Datei
<code>routes/web.php</code>) gefunden wird, lädt der Router die angegebene Klasse.</p>
<h3>Funktionsweise</h3>
<p>Im vorliegenden Beispiel sehen Sie diese Seite ... </p>
<ol>
<li>weil der Pfad in der Routenkonfiguration gefunden wurde</li>
<li>und dort <span class="code">'DemoController@howto'</span> hinterlegt ist</li>
<li>und im Ordner <span class="code">controllers/</span> die Datei <code class="language-php">DemoController.php</code> gefunden werden konnte
</li>
<li>und mit ihr ein Objekt des Typs <span class="code">DemoController</span> instanziiert werden konnte</li>
<li>und dieses Objekt die Funktion (Action) <span class="code">howto()</span> ausgeführt hat</li>
</ol>
<p>Sie sehen: da muss einiges stimmen und vieles davon ist Konvention.</p>
<h3>Querystrings und Pfadsegmente</h3>
<p>Die Actions in den Controller-Klassen sollen per Konvention immer ein <span class="code">RequestData</span> Objekt
entgegennehmen. Beispiel: <code class="language-php">howto(RequestData \$rd)</code></p>
<p>Dieses RequestData Objekt wird durch den Router befüllt, wenn Daten in der URL extrahiert werden konnten.</p>
<p>Daten finden sich URLs...</p>
<ul>
<li>
<p>
<strong>im Querystring</strong><br>Beispiel: rufen Sie diese mit
<code class="language-http"><?php echo \htmlentities(strtolower(explode('/',$_SERVER["SERVER_PROTOCOL"])[0])??'', ENT_QUOTES, 'UTF-8', false); ?>://<?php echo \htmlentities($_SERVER["HTTP_HOST"]??'', ENT_QUOTES, 'UTF-8', false); ?>/demo?<strong>bgcolor=fefbd8&name=Remmy</strong></code>
auf, werden <span class="language-php">bgcolor</span> und <code class="language-php">name</code> mitsamt Werten als Query Array
<code class="language-php">$rd->query</code>) übergeben
</p>
</li>
</ul>
<p>Probieren Sie es aus ;)</p>
<?php if(count($rd->args)): ?>
<p><strong>Argumente dieses Aufrufs:</strong></p>
<?php $__empty_1 = true; foreach($rd->args as $a): $__empty_1 = false; ?>
<div><span class="code"><?php echo \htmlentities($a??'', ENT_QUOTES, 'UTF-8', false); ?></span></div>
<?php endforeach; if ($__empty_1): ?>
<p>Keine weiteren Argumente im Request</p>
<?php endif; ?>
<?php endif; ?>
<?php if(count($rd->query)): ?>
<p><strong>Daten aus der Query dieses Aufrufs:</strong></p>
<pre><code class="language-php">
<?php $__empty_1 = true; foreach($rd->query as $k => $v): $__empty_1 = false; ?>
$rd->query['<?php echo \htmlentities($k??'', ENT_QUOTES, 'UTF-8', false); ?>']=<?php echo \htmlentities($v??'', ENT_QUOTES, 'UTF-8', false); ?>
<?php endforeach; if ($__empty_1): ?>
<p>Keine Querydaten</p>
<?php endif; ?>
</code></pre>
<?php endif; ?>
<h2>Blade</h2>
<p>Blade <a href="https://github.com/EFTEC/BladeOne#install-pick-one-of-the-next-one">muss installiert</a> sein.
Die Installation ist bereits geschehen und die Bibliothek liegt unter /vendor.
</p>
<h3>Daten übergeben und View rendern</h3>
<p>Bei der Verwendung der View-Engine gelten einige Konventionen:
Die Dateien müssen <code class="language-php">&lt;viewname&gt;.blade.php</code> heißen und im Ordner <code class="language-php">views</code> liegen.
</p>
<p>Sie können der View dann Daten mitgeben, indem Sie alle Daten in ein Array schreiben und dieses dann
übergeben.</p>
<p>Beispiel:</p>
<pre><code class="language-php">
view("viewtest",
array(
"texts"=>$textArray,
"persona"=>$persona,
"rd"=>$rd
)); // öffnet ../views/viewtest.blade.php
</code></pre>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("cssextra"); ?>
<style>
body > div {background-color: <?php echo \htmlentities('#' . $bgcolor??'', ENT_QUOTES, 'UTF-8', false); ?>; }
</style>
<?php $this->stopSection(); ?>
<?php $this->startSection("jsextra"); ?>
<script src="/js/highlight.min.js"></script><script>hljs.highlightAll();</script>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild(".layouts.layout"); } ?>

View File

@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>7a</title>
</head>
<body>
Der Wert von name lautet: <?php echo \htmlentities($request??'', ENT_QUOTES, 'UTF-8', false); ?>
</body>
</html>

View File

@@ -1,41 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Beispiel: Daten aus der Datenbank</title>
<style>
h1 {
font-weight: 300;
}
</style>
</head>
<body>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<?php
$zweites = false; ?>
<article>
<h1>Daten aus der Datenbank der Tabelle: Kategorien</h1>
<ul>
<?php $__empty_1 = true; foreach($data as $a): $__empty_1 = false; ?>
<?php if($zweites): ?> <h1><li><?php echo \htmlentities($a['name']??'', ENT_QUOTES, 'UTF-8', false); ?></li></h1> <?php $zweites = false; ?>
<?php else: ?>
<li><?php echo \htmlentities($a['name']??'', ENT_QUOTES, 'UTF-8', false); ?></li> <?php $zweites = true; ?>
<?php endif; ?>
<?php endforeach; if ($__empty_1): ?>
<li>Keine Daten vorhanden.</li>
<?php endif; ?>
</ul>
</article>
<?php endif; ?>
</body>
</html>

View File

@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Beispiel: Daten aus der Datenbank</title>
</head>
<body>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<article>
<h1>Daten aus der Datenbank der Tabelle: Kategorien</h1>
<ul>
<?php $__empty_1 = true; foreach($data as $a): $__empty_1 = false; ?>
<?php if(!empty($a['name'])): ?>
<li><?php echo \htmlentities($a['name']??'', ENT_QUOTES, 'UTF-8', false); ?></li>
<?php endif; ?>
<?php endforeach; if ($__empty_1): ?>
<li>Es sind keine Gerichte vorhanden</li>
<?php endif; ?>
</ul>
</article>
<?php endif; ?>
</body>
</html>

View File

@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Beispiel: Daten aus der Datenbank</title>
</head>
<body>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<article>
<h1>Daten aus der Datenbank der Tabelle: Kategorien</h1>
<ul>
<?php $__empty_1 = true; foreach($data as $a): $__empty_1 = false; ?>
<?php if(!empty($a['name'])): ?>
<li><?php echo \htmlentities($a['name']??'', ENT_QUOTES, 'UTF-8', false); ?></li>
<?php endif; ?>
<?php endforeach; if ($__empty_1): ?>
<li>Es sind keine Gerichte vorhanden</li>
<?php endif; ?>
</ul>
</article>
<?php endif; ?>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("header"); ?>
<?php $this->stopSection(); ?>
<?php $this->startSection("body"); ?>
<p>Page 1</p>
<?php $this->stopSection(); ?>
<?php $this->startSection("footer"); ?>
<p>Footer of Page 1</p>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild(".layouts.m4_7d_layout",['title' => "Page 1"]); } ?>

View File

@@ -1,14 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("header"); ?>
<?php $this->stopSection(); ?>
<?php $this->startSection("body"); ?>
<p>Page 2</p>
<?php $this->stopSection(); ?>
<?php $this->startSection("footer"); ?>
<p>Footer of Page 2</p>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild(".layouts.m4_7d_layout",['title' => "Page 2"]); } ?>

View File

@@ -1,36 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("content"); ?>
<header class="mt-5">
<h1>Hauptseite E-Mensa</h1>
<img src="/img/test.jpg"
alt="Testbild von https://cdn.pixabay.com/photo/2014/06/03/19/38/road-sign-361513_960_720.jpg">
</header>
<nav class="mt-5">
<strong>Navigation</strong>
<ul>
<li><a href="/demo">Demo</a></li>
<li><a href="/dbconnect">Datenbank: Gerichte</a></li>
</ul>
<ul>
<li><a href="/debug"><code class="language-php">phpinfo();</code></a></li>
</ul>
</nav>
<footer>
&copy; Team-Name DBWT
</footer>
<?php $this->stopSection(); ?>
<?php $this->startSection("cssextra"); ?>
<style>
body > div {
background-color: <?php echo \htmlentities($rd->query['bgcolor'] ?? 'ffffff'??'', ENT_QUOTES, 'UTF-8', false); ?>
}
</style>
<?php $this->stopSection(); ?>
<?php $this->startSection("jsextra"); ?>
<script src="/js/highlight.min.js"></script><script>hljs.highlightAll();</script>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.layout"); } ?>

View File

@@ -1,23 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title>E-Mensa Routing Script</title>
<meta name="description" content="unused">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/default.min.css">
<?php echo $this->yieldContent("cssextra"); ?>
<meta name="theme-color" content="#dadada">
<!-- good developers check the markup ;) -->
</head>
<body>
<div class="container">
<div class="row">
<?php echo $this->yieldContent("content"); ?>
</div>
</div>
<?php echo $this->yieldContent("jsextra"); ?>
</body>
</html>

View File

@@ -1,30 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
<?php echo $this->yieldContent("header"); ?>
<!-- good developers check the markup ;) -->
</head>
<body>
<?php echo $this->yieldContent("nav"); ?>
<hr>
<div class="grid">
<div></div>
<div>
<?php echo $this->yieldContent("text"); ?>
<?php echo $this->yieldContent("gerichte"); ?>
</div>
<div></div>
</div>
<footer>
<table class="fusszeile">
<?php echo $this->yieldContent("footer"); ?>
</table>
</footer>
</body>
</html>

View File

@@ -1,30 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
<?php echo $this->yieldContent("header"); ?>
<!-- good developers check the markup ;) -->
</head>
<body>
<?php echo $this->yieldContent("nav"); ?>
<hr>
<div class="grid">
<div></div>
<div>
<?php echo $this->yieldContent("text"); ?>
<?php echo $this->yieldContent("gerichte"); ?>
</div>
<div></div>
</div>
<footer>
<table class="fusszeile">
<?php echo $this->yieldContent("footer"); ?>
</table>
</footer>
</body>
</html>

View File

@@ -1,30 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
<?php echo $this->yieldContent("header"); ?>
<!-- good developers check the markup ;) -->
</head>
<body>
<?php echo $this->yieldContent("nav"); ?>
<hr>
<div class="grid">
<div></div>
<div>
<?php echo $this->yieldContent("text"); ?>
<?php echo $this->yieldContent("gerichte"); ?>
</div>
<div></div>
</div>
<footer>
<table class="fusszeile">
<?php echo $this->yieldContent("footer"); ?>
</table>
</footer>
</body>
</html>

View File

@@ -1,30 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
<?php echo $this->yieldContent("header"); ?>
<!-- good developers check the markup ;) -->
</head>
<body>
<?php echo $this->yieldContent("nav"); ?>
<hr>
<div class="grid">
<div></div>
<div>
<?php echo $this->yieldContent("text"); ?>
<?php echo $this->yieldContent("gerichte"); ?>
</div>
<div></div>
</div>
<footer>
<table class="fusszeile">
<?php echo $this->yieldContent("footer"); ?>
</table>
</footer>
</body>
</html>

View File

@@ -1,12 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("main"); ?>
<?php if(!isset($_SESSION['name'])): ?>
<meta http-equiv="refresh" content="0;url=/" />
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>

View File

@@ -1,25 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("main"); ?>
<form action="/anmeldung_verifizieren" method="post">
<label for="email">E-Mail</label>
<input id="email" name="email" type="email" placeholder="email" required maxlength="100">
<label for="passwort">Passwort</label>
<input id="passwort" name="passwort" type="password" placeholder="passwort" required maxlength="200">
<button type="submit" >Anmelden</button>
</form>
<?php if(!isset($anmeldung)): ?> Bitte anmelden!
<?php elseif($anmeldung == 1): ?>
<?php echo \htmlentities(session_start()??'', ENT_QUOTES, 'UTF-8', false); ?>
Anmeldung erlaubt!
<?php else: ?> Es ist ein Fehler aufgetretten!
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>

View File

@@ -1,25 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("main"); ?>
<form action="/anmeldung_verifizieren" method="post">
<label for="email">E-Mail</label>
<input id="email" name="email" type="email" placeholder="email" required maxlength="100">
<label for="passwort">Passwort</label>
<input id="passwort" name="passwort" type="password" placeholder="passwort" required maxlength="200">
<button type="submit" >Anmelden</button>
</form>
<?php if(!isset($anmeldung)): ?> Bitte anmelden!
<?php elseif($anmeldung == 1): ?>
<?php echo \htmlentities(session_start()??'', ENT_QUOTES, 'UTF-8', false); ?>
Anmeldung erlaubt!
<?php else: ?> Es ist ein Fehler aufgetretten!
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>

View File

@@ -1,51 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("main"); ?>
<?php if($anmeldung == 1): ?>
<meta http-equiv="refresh" content="/"/>
<form id="form_ok" action="/"></form>
<script type="text/javascript">
function formAutoSubmit() {
var frm = document.getElementById("form_ok");
frm.submit();
}
window.onload = formAutoSubmit;
</script>
<?php else: ?>
<form method="post" id="auto_form" action="/anmeldung_fehler">
<input type="hidden" name="email" value=<?php echo \htmlentities($email??'', ENT_QUOTES, 'UTF-8', false); ?>>
<input type="hidden" name="passwort" value=<?php echo \htmlentities($passwort??'', ENT_QUOTES, 'UTF-8', false); ?>>
<input type="hidden" name="anmeldung" value=<?php echo \htmlentities($anmeldung??'', ENT_QUOTES, 'UTF-8', false); ?>>
</form>
<script type="text/javascript">
function formAutoSubmit() {
var frm = document.getElementById("auto_form");
frm.submit();
}
window.onload = formAutoSubmit;
</script>
<?php endif; ?>
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Loading_icon.gif?20151024034921" alt="loading">
<br>
Bitte warten!
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>

View File

@@ -1,21 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title>Layout-m5-a1</title>
</head>
<body>
<header class="header_7d">
<?php echo $this->yieldContent("header"); ?>
</header>
<main class="main">
<?php echo $this->yieldContent("main"); ?>
</main>
<footer class="footer">
<?php echo $this->yieldContent("footer"); ?>
</footer>
</body>
</html>

View File

@@ -1,21 +0,0 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title>Layout-m5-a1</title>
</head>
<body>
<header class="header_7d">
<?php echo $this->yieldContent("header"); ?>
</header>
<main class="main">
<?php echo $this->yieldContent("main"); ?>
</main>
<footer class="footer">
<?php echo $this->yieldContent("footer"); ?>
</footer>
</body>
</html>

View File

@@ -1,62 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("header"); ?>
<link rel="stylesheet" href="/css/style.css">
<?php $this->stopSection(); ?>
<?php $this->startSection("nav"); ?>
<div class="grid">
<div>
<img src="/img/fh-logo.jpg" alt="FH-Logo">
</div>
<div>
<a href="#ankündigung">Ankündigung</a>
<a href="#speisen">Speisen</a>
<a href="#zahlen">Zahlen</a>
<a href="#kontakt">Kontakt</a>
<a href="#wichtig">Wichtig für uns</a>
</div>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("text"); ?>
<img src="/img/mensa21.jpg" alt="Essen">
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
<?php $this->stopSection(); ?>
<?php $this->startSection("gerichte"); ?>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<?php
echo $data["gericht"];
echo $data["allergene"];
?>
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php $this->startSection("footer"); ?>
<tr>
<td>(c) E-Mensa GmbH</td>
<td>Şafak Hazinedar & Robert Joel</td>
<td><a href="">Impressum</a></td>
</tr>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>

View File

@@ -1,73 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("header"); ?>
<link rel="stylesheet" href="/css/style.css">
<?php $this->stopSection(); ?>
<?php $this->startSection("nav"); ?>
<div class="grid">
<div>
<img src="/img/fh-logo.jpg" alt="FH-Logo">
</div>
<div>
<a href="#ankündigung">Ankündigung</a>
<a href="#speisen">Speisen</a>
<a href="#zahlen">Zahlen</a>
<a href="#kontakt">Kontakt</a>
<a href="#wichtig">Wichtig für uns</a>
</div>
<div>
<?php if(($_SESSION['login'] ?? NULL) == 0): ?>
<a href="/anmeldung">Anmelden</a>
<?php else: ?>
Angemeldet als:<br>
<div><?php echo \htmlentities($_SESSION['name']??'', ENT_QUOTES, 'UTF-8', false); ?></div>
<a href="/abmeldung">Abmelden</a>
<?php endif; ?>
</div>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("text"); ?>
<img src="/img/mensa21.jpg" alt="Essen">
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
<?php $this->stopSection(); ?>
<?php $this->startSection("gerichte"); ?>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<?php
echo $data["gericht"];
echo $data["allergene"];
?>
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php $this->startSection("footer"); ?>
<tr>
<td>(c) E-Mensa GmbH</td>
<td>Şafak Hazinedar & Robert Joel</td>
<td><a href="">Impressum</a></td>
</tr>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>

View File

@@ -1,112 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("header"); ?>
<link rel="stylesheet" href="/css/style.css">
<?php $this->stopSection(); ?>
<?php $this->startSection("nav"); ?>
<div class="grid">
<div>
<img src="/img/fh-logo.jpg" alt="FH-Logo">
</div>
<div>
<a href="#ankündigung">Ankündigung</a>
<a href="#speisen">Speisen</a>
<a href="#zahlen">Zahlen</a>
<a href="#kontakt">Kontakt</a>
<a href="#wichtig">Wichtig für uns</a>
</div>
<div>
<?php if(($_SESSION['login'] ?? NULL) == 0): ?>
<a href="/anmeldung">Anmelden</a>
<?php else: ?>
Angemeldet als:<br>
<div><?php echo \htmlentities($_SESSION['name']??'', ENT_QUOTES, 'UTF-8', false); ?></div>
<a href="/abmeldung">Abmelden</a>
<?php endif; ?>
</div>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("text"); ?>
<img src="/img/mensa21.jpg" alt="Essen">
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
<?php $this->stopSection(); ?>
<?php $this->startSection("gerichte"); ?>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<?php
$result_sql_allergen = $data["result_sql_allergen"];
$verwendete_allergene_code = $data["verwendete_allergene_code"];
$result_sql_gerichte = $data["result_sql_gerichte"];
$verwendete_allergene_string = $data["allergene"];
$allergene = $data["allergene1"];
$tabelle = "<table class=\"speisen\"><tr class=\"speisen\"> <td>Gerichte</td><td>Preis intern</td><td>Preis extern</td><td>Bild</td></tr>";
while ($row_gerichte = mysqli_fetch_assoc($result_sql_gerichte)) {
$preisintern = number_format($row_gerichte['preisintern'], 2, ',', '.');
$preisextern = number_format($row_gerichte['preisextern'], 2, ',', '.');
$bildname = $row_gerichte['bildname'];
if ($bildname == Null) {
$bildname = "00_image_missing.jpg";
}
$bildname = "/img/gerichte/" . $bildname;
$tabelle .= "<tr class=\"speisen\"><td>" . htmlspecialchars($row_gerichte['name']) . " <sup>" . htmlspecialchars($allergene) . "</sup></td><td>" . htmlspecialchars($preisintern) . "€</td><td>" . htmlspecialchars($preisextern) . "€</td><td> <img src=\"" . $bildname . "\" alt =\"Bild vom Gericht\" width= \"10\" height=\"10\"> </td></tr>";
}
$tabelle .= "</table>";
while ($row_allergen = mysqli_fetch_assoc($result_sql_allergen)) {
if (in_array($row_allergen['code'], $verwendete_allergene_code)) {
$verwendete_allergene_string .= "<sup>" . htmlspecialchars($row_allergen['code']) . "</sup> " . htmlspecialchars($row_allergen['name']) . ", ";
}
}
echo $tabelle;
echo $verwendete_allergene_string;
?>
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php $this->startSection("footer"); ?>
<tr>
<td>(c) E-Mensa GmbH</td>
<td>Şafak Hazinedar & Robert Joel</td>
<td><a href="">Impressum</a></td>
</tr>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>

View File

@@ -1,62 +0,0 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("header"); ?>
<link rel="stylesheet" href="/css/style.css">
<?php $this->stopSection(); ?>
<?php $this->startSection("nav"); ?>
<div class="grid">
<div>
<img src="/img/fh-logo.jpg" alt="FH-Logo">
</div>
<div>
<a href="#ankündigung">Ankündigung</a>
<a href="#speisen">Speisen</a>
<a href="#zahlen">Zahlen</a>
<a href="#kontakt">Kontakt</a>
<a href="#wichtig">Wichtig für uns</a>
</div>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("text"); ?>
<img src="/img/mensa21.jpg" alt="Essen">
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
<?php $this->stopSection(); ?>
<?php $this->startSection("gerichte"); ?>
<?php if(isset($data['error'])): ?>
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
<p>Fehlermeldung</p>
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
<?php else: ?>
<?php
echo $data["gericht"];
echo $data["allergene"];
?>
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php $this->startSection("footer"); ?>
<tr>
<td>(c) E-Mensa GmbH</td>
<td>Şafak Hazinedar & Robert Joel</td>
<td><a href="">Impressum</a></td>
</tr>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>

View File

@@ -1,17 +0,0 @@
[2023-12-20T16:17:52.471118+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2023-12-20T16:18:56.302288+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2023-12-20T16:19:05.430442+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2023-12-21T14:22:30.892716+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2023-12-21T14:29:56.044899+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T17:35:05.003569+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T17:35:10.520517+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:01.915599+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:27.020355+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:36.435542+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:37.189838+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:37.906183+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:38.505567+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:40:42.359774+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:50:12.019483+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:50:32.335954+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2024-01-06T18:50:56.902291+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []

View File

@@ -1,359 +0,0 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
}
}

View File

@@ -1,21 +0,0 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,225 +0,0 @@
{
"packages": [
{
"name": "eftec/bladeone",
"version": "4.9",
"version_normalized": "4.9.0.0",
"source": {
"type": "git",
"url": "https://github.com/EFTEC/BladeOne.git",
"reference": "019036c226086fbe7591360d260067c5d82400ca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/EFTEC/BladeOne/zipball/019036c226086fbe7591360d260067c5d82400ca",
"reference": "019036c226086fbe7591360d260067c5d82400ca",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": ">=7.2.5"
},
"require-dev": {
"phpunit/phpunit": "^8.5.23"
},
"suggest": {
"eftec/bladeonehtml": "Extension to create forms",
"ext-mbstring": "This extension is used if it's active"
},
"time": "2023-05-01T12:48:42+00:00",
"bin": [
"lib/bladeonecli"
],
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"eftec\\bladeone\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jorge Patricio Castro Castillo",
"email": "jcastro@eftec.cl"
}
],
"description": "The standalone version Blade Template Engine from Laravel in a single php file",
"homepage": "https://github.com/EFTEC/BladeOne",
"keywords": [
"blade",
"php",
"template",
"templating",
"view"
],
"support": {
"issues": "https://github.com/EFTEC/BladeOne/issues",
"source": "https://github.com/EFTEC/BladeOne/tree/4.9"
},
"install-path": "../eftec/bladeone"
},
{
"name": "monolog/monolog",
"version": "3.5.0",
"version_normalized": "3.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^2.0 || ^3.0"
},
"provide": {
"psr/log-implementation": "3.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^3.0",
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*",
"graylog2/gelf-php": "^1.4.2 || ^2.0",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "^10.1",
"predis/predis": "^1.1 || ^2",
"ruflin/elastica": "^7",
"symfony/mailer": "^5.4 || ^6",
"symfony/mime": "^5.4 || ^6"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
"ext-openssl": "Required to send log messages using SSL",
"ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
},
"time": "2023-10-27T15:32:31+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"installation-source": "source",
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "https://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "https://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/3.5.0"
},
"funding": [
{
"url": "https://github.com/Seldaek",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
"type": "tidelift"
}
],
"install-path": "../monolog/monolog"
},
{
"name": "psr/log",
"version": "3.0.0",
"version_normalized": "3.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"time": "2021-07-14T16:46:02+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"installation-source": "source",
"autoload": {
"psr-4": {
"Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"install-path": "../psr/log"
}
],
"dev": true,
"dev-package-names": []
}

View File

@@ -1,56 +0,0 @@
<?php return array(
'root' => array(
'name' => 'emensa/mvc',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '713d5059b7498abaa5ba6784fbf4048a0f45e15c',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'eftec/bladeone' => array(
'pretty_version' => '4.9',
'version' => '4.9.0.0',
'reference' => '019036c226086fbe7591360d260067c5d82400ca',
'type' => 'library',
'install_path' => __DIR__ . '/../eftec/bladeone',
'aliases' => array(),
'dev_requirement' => false,
),
'emensa/mvc' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '713d5059b7498abaa5ba6784fbf4048a0f45e15c',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'monolog/monolog' => array(
'pretty_version' => '3.5.0',
'version' => '3.5.0.0',
'reference' => 'c915e2634718dbc8a4a15c61b0e62e7a44e14448',
'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/log' => array(
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/log-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '3.0.0',
),
),
),
);

View File

@@ -1,26 +0,0 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View File

@@ -1,39 +0,0 @@
name: PHP Composer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
# - name: Run test suite
# run: composer run-script test

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 Jorge Patricio Castro Castillo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice, other copyright notices and this permission notice
shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Some files were not shown because too many files have changed in this diff Show More