From 5bcf2a3546a0d35d73d47b05e3b04306c1853535 Mon Sep 17 00:00:00 2001 From: Fabio Herzig Date: Fri, 31 Jul 2026 23:53:14 +0200 Subject: [PATCH] New Filestructure for Docker --- .DS_Store | Bin 0 -> 6148 bytes .gitignore | 21 +- compose.yaml | 116 +-- config/.env.db-guest.example | 7 - ...{.env.db-tables.example => .env.db-tables} | 2 - config/.env.db-wkvs-user.example | 7 - config/.env.db.example | 3 - config/.env.pw-encryption-key.example | 1 - config/.env.redis.example | 3 - config/{.env.wk-id.example => .env.wk-id} | 0 config/apache/Dockerfile | 12 - config/nginx/nginx.conf | 33 - docker-install.sh | 138 ++++ docker/apache/Dockerfile | 27 + {config => docker}/apache/php/custom.ini | 0 docker/database/wkvs-database-template.sql | 335 +++++++++ docker/nginx/nginx.conf | 51 ++ docker/node/Dockerfile | 23 + html/.DS_Store | Bin 0 -> 6148 bytes {www => html}/.htaccess | 0 {www => html}/RankLive/.htaccess | 0 {www => html}/RankLive/js/script.js | 0 {www => html}/RankLive/router.php | 0 {www => html}/RankLive/script.php | 0 .../custom-display-editor-required-css.css | 0 {www => html}/css/header.css | 0 {www => html}/css/rank-live.css | 0 {www => html}/css/riegeneinteilung.css | 0 {www => html}/error-pages/400.html | 0 {www => html}/error-pages/400.php | 0 {www => html}/error-pages/403.html | 0 {www => html}/error-pages/429.html | 0 {www => html}/error-pages/500.html | 0 {www => html}/error-pages/style.css | 0 {www => html}/error-pages/translations.js | 0 {www => html}/externe-geraete/.htaccess | 0 {www => html}/externe-geraete/audio.php | 0 {www => html}/externe-geraete/css/audio.css | 0 {www => html}/externe-geraete/css/display.css | 0 {www => html}/externe-geraete/display.php | 0 {www => html}/externe-geraete/router.php | 0 .../WKVS_Vorlage_Upload_Personen_Bulk.xlsx | Bin .../files/fonts/Google_Sans_Flex/.DS_Store | Bin ...ableFont_GRAD,ROND,opsz,slnt,wdth,wght.ttf | Bin .../files/fonts/Google_Sans_Flex/OFL.txt | 182 ++--- .../files/fonts/Google_Sans_Flex/README.txt | 0 .../static/GoogleSansFlex_120pt-Black.ttf | Bin .../static/GoogleSansFlex_120pt-Bold.ttf | Bin .../static/GoogleSansFlex_120pt-ExtraBold.ttf | Bin .../GoogleSansFlex_120pt-ExtraLight.ttf | Bin .../static/GoogleSansFlex_120pt-Light.ttf | Bin .../static/GoogleSansFlex_120pt-Medium.ttf | Bin .../static/GoogleSansFlex_120pt-Regular.ttf | Bin .../static/GoogleSansFlex_120pt-SemiBold.ttf | Bin .../static/GoogleSansFlex_120pt-Thin.ttf | Bin .../static/GoogleSansFlex_24pt-Black.ttf | Bin .../static/GoogleSansFlex_24pt-Bold.ttf | Bin .../static/GoogleSansFlex_24pt-ExtraBold.ttf | Bin .../static/GoogleSansFlex_24pt-ExtraLight.ttf | Bin .../static/GoogleSansFlex_24pt-Light.ttf | Bin .../static/GoogleSansFlex_24pt-Medium.ttf | Bin .../static/GoogleSansFlex_24pt-Regular.ttf | Bin .../static/GoogleSansFlex_24pt-SemiBold.ttf | Bin .../static/GoogleSansFlex_24pt-Thin.ttf | Bin .../static/GoogleSansFlex_36pt-Black.ttf | Bin .../static/GoogleSansFlex_36pt-Bold.ttf | Bin .../static/GoogleSansFlex_36pt-ExtraBold.ttf | Bin .../static/GoogleSansFlex_36pt-ExtraLight.ttf | Bin .../static/GoogleSansFlex_36pt-Light.ttf | Bin .../static/GoogleSansFlex_36pt-Medium.ttf | Bin .../static/GoogleSansFlex_36pt-Regular.ttf | Bin .../static/GoogleSansFlex_36pt-SemiBold.ttf | Bin .../static/GoogleSansFlex_36pt-Thin.ttf | Bin .../static/GoogleSansFlex_72pt-Black.ttf | Bin .../static/GoogleSansFlex_72pt-Bold.ttf | Bin .../static/GoogleSansFlex_72pt-ExtraBold.ttf | Bin .../static/GoogleSansFlex_72pt-ExtraLight.ttf | Bin .../static/GoogleSansFlex_72pt-Light.ttf | Bin .../static/GoogleSansFlex_72pt-Medium.ttf | Bin .../static/GoogleSansFlex_72pt-Regular.ttf | Bin .../static/GoogleSansFlex_72pt-SemiBold.ttf | Bin .../static/GoogleSansFlex_72pt-Thin.ttf | Bin .../static/GoogleSansFlex_9pt-Black.ttf | Bin .../static/GoogleSansFlex_9pt-Bold.ttf | Bin .../static/GoogleSansFlex_9pt-ExtraBold.ttf | Bin .../static/GoogleSansFlex_9pt-ExtraLight.ttf | Bin .../static/GoogleSansFlex_9pt-Light.ttf | Bin .../static/GoogleSansFlex_9pt-Medium.ttf | Bin .../static/GoogleSansFlex_9pt-Regular.ttf | Bin .../static/GoogleSansFlex_9pt-SemiBold.ttf | Bin .../static/GoogleSansFlex_9pt-Thin.ttf | Bin {www => html}/files/fonts/fonts.css | 0 {www => html}/files/music/piep.mp3 | Bin html/intern/.DS_Store | Bin 0 -> 6148 bytes {www => html}/intern/.htaccess | 0 .../intern/css/coloris/coloris.min.css | 0 .../intern/css/custom-msg-display.css | 0 {www => html}/intern/css/custom-select.css | 0 {www => html}/intern/css/displaycontrol.css | 0 {www => html}/intern/css/einstellungen-ai.css | 0 {www => html}/intern/css/einstellungen.css | 0 .../intern/css/flatpickr/flatpickr.min.css | 0 {www => html}/intern/css/kampfrichter.css | 0 {www => html}/intern/css/login.css | 0 {www => html}/intern/css/logindata.css | 0 {www => html}/intern/css/otl.css | 0 {www => html}/intern/css/rank-live.css | 0 {www => html}/intern/css/rechnungen.css | 0 {www => html}/intern/css/riegeneinteilung.css | 0 {www => html}/intern/css/sidebar.css | 0 {www => html}/intern/css/trainer.css | 0 {www => html}/intern/css/user.css | 0 {www => html}/intern/img/icon.png | Bin .../intern/img/login/bgKampfrichter.webp | Bin {www => html}/intern/img/login/bgOtl.webp | Bin {www => html}/intern/img/login/bgTrainer.webp | Bin .../intern/img/login/bgWk_leitung.webp | Bin {www => html}/intern/img/login/readme.md | 0 {www => html}/intern/img/logo-normal.png | Bin {www => html}/intern/img/readme.md | 0 {www => html}/intern/js/ace/ace.js | 0 {www => html}/intern/js/ace/mode-css.js | 0 {www => html}/intern/js/chart/chart.js | 0 .../intern/js/coloris/coloris.min.js | 0 {www => html}/intern/js/cookie-banner.js | 0 {www => html}/intern/js/custom-msg-display.js | 0 {www => html}/intern/js/custom-select.js | 0 {www => html}/intern/js/flatpickr/de.min.js | 0 .../intern/js/flatpickr/flatpickr.min.js | 0 {www => html}/intern/js/flatpickr/fr.min.js | 0 {www => html}/intern/js/flatpickr/it.min.js | 0 {www => html}/intern/js/gallery.js | 0 .../intern/js/gsap/MorphSVGPlugin.min.js | 0 {www => html}/intern/js/gsap/gsap.min.js | 0 {www => html}/intern/js/header.js | 0 {www => html}/intern/js/img.js | 0 .../intern/js/jquery/jquery-3.7.1.min.js | 0 .../intern/js/jquery/jquery-ui.min.js | 0 .../js/jquery/jquery.ui.touch-punch.min.js | 0 .../jquery.justifiedGallery.min.js | 0 .../photoswipe/photoswipe-lightbox.umd.min.js | 0 .../js/photoswipe/photoswipe.umd.min.js | 0 {www => html}/intern/js/qr-code/LICENSE | 0 {www => html}/intern/js/qr-code/bower.json | 0 {www => html}/intern/js/qr-code/qrcode.js | 0 {www => html}/intern/js/qr-code/qrcode.min.js | 0 {www => html}/intern/js/sidebar.js | 0 {www => html}/intern/kampfrichter.php | 0 {www => html}/intern/otlogin.php | 0 .../intern/scripts/ajax-create-ws-token.php | 0 .../scripts/ajax-update_selected_freigabe.php | 0 .../scripts/audiofiles-uploads/.user.ini | 0 .../ajax_audiofile_upload.php | 0 .../ajax-update_display_config_json.php | 0 .../intern/scripts/einstellungen/.user.ini | 0 .../einstellungen/ajax-change-value.php | 0 .../einstellungen/ajax-gereate-management.php | 0 .../einstellungen/ajax-noten-management.php | 0 .../einstellungen/ajax-save-user-css.php | 0 .../einstellungen/ajax-upload-image.php | 0 .../ajax-zeitplan-management.php | 0 .../einstellungen/export-config-file.php | 0 .../einstellungen/upload-config-file.php | 0 .../ajax/ajax-delete-noten-turnerinnen.php | 0 .../ajax/ajax-delete_protokoll_entries.php | 0 .../ajax/ajax-delete_rangliste.php | 0 .../ajax/ajax-kampfrichter_currentedit.php | 0 .../kampfrichter/ajax/ajax-neu_protokoll.php | 0 .../kampfrichter/ajax/ajax-neu_rangliste.php | 0 .../ajax-update_kampfrichter_start_musik.php | 0 .../ajax-update_kampfrichter_stopp_musik.php | 0 .../ajax/ajax-update_value_kampfrichter.php | 0 .../ajax/displays/ajax-display-functions.php | 0 .../kampfrichter/js/js-kampfrichter-admin.js | 0 .../kampfrichter/js/js-kampfrichter-normal.js | 0 .../logindata/ajax-create-link-user.php | 0 .../scripts/logindata/ajax-create-otl.php | 0 .../scripts/logindata/ajax-delete-user.php | 0 .../scripts/logindata/ajax-delete-verein.php | 0 .../scripts/logindata/ajax-neu_programm.php | 0 .../logindata/ajax-remove_programm.php | 0 .../ajax-update-user-information.php | 0 .../logindata/ajax-update_programm_value.php | 0 .../logindata/ajax-vereine-handler.php | 0 .../ranklive/ajax-get-ranklive-config.php | 0 .../ranklive/ajax-save-ranklive-config.php | 0 .../scripts/ranklive/export-config-file.php | 0 .../scripts/ranklive/upload-config-file.php | 0 .../scripts/rechnungen/ajax-neu_protokoll.php | 0 .../rechnungen/ajax_update_order_status.php | 0 .../ajax_update_order_status_by_scor.php | 0 .../ajax-zeiten-management.php | 0 .../ajax_auto_riegeneinteilung.php | 0 .../ajax_change_name_of_specific_abt.php | 0 .../ajax_change_number_of_abt.php | 0 ...jax_change_order_index_of_specific_abt.php | 0 .../ajax_delete_specific_abt.php | 0 .../riegeneinteilung/ajax_update_turnerin.php | 0 .../trainer/ajax-add-personen-excel.php | 0 .../trainer/ajax-add_entry_fees_to_basket.php | 0 .../scripts/trainer/ajax-delete-person.php | 0 .../scripts/trainer/ajax-fetch_temp_order.php | 0 .../ajax-neu-verbuchte-startgebuer.php | 0 .../scripts/trainer/ajax-neu_temp_order.php | 0 .../trainer/ajax-remove_basket_item.php | 0 .../trainer/ajax-update-person-kat.php | 0 .../scripts/trainer/ajax_link_bodenmusik.php | 0 .../trainer/ajax_unlink_delete_bodenmusik.php | 0 .../wettkaempfe/ajax-add-wettkampf.php | 0 .../wettkaempfe/ajax-delete-wettkampf.php | 0 .../ajax-update-aktiv-wettkampf.php | 0 .../wettkaempfe/ajax-update-wettkampf.php | 0 {www => html}/intern/trainer.php | 6 - {www => html}/intern/wk-leitung/.htaccess | 0 .../intern/wk-leitung/displaycontrol.php | 0 .../intern/wk-leitung/einstellungen.php | 0 {www => html}/intern/wk-leitung/logindata.php | 0 {www => html}/intern/wk-leitung/rank-live.php | 0 .../intern/wk-leitung/rechnungen-viewer.php | 0 .../intern/wk-leitung/rechnungen.php | 0 .../intern/wk-leitung/riegeneinteilung.php | 0 .../intern/wk-leitung/wettkaempfe.php | 0 {www => html}/js/header.js | 0 {www => html}/licence.txt | 0 {www => html}/riegeneinteilung.php | 0 .../cache-creators/regenerate-noten-cache.php | 2 +- scripts/cache/display-dependencies.php | 658 ------------------ scripts/cache/noten-config-display-cache.php | 10 - scripts/db/db-tables.php | 8 +- scripts/rate-limiter/rate-limiter.php | 6 +- scripts/redis/connect-to-redis.php | 4 +- scripts/session_functions.php | 4 +- setup/.DS_Store | Bin 0 -> 6148 bytes setup/database/generate-sql.php | 74 -- setup/database/generate-users.php | 203 ------ setup/database/init-db.php | 91 --- setup/database/wkvs-database-template.sql | 588 ---------------- setup/init-env.php | 89 --- websocket/index.js | 6 +- 239 files changed, 710 insertions(+), 2000 deletions(-) create mode 100644 .DS_Store delete mode 100644 config/.env.db-guest.example rename config/{.env.db-tables.example => .env.db-tables} (97%) delete mode 100644 config/.env.db-wkvs-user.example delete mode 100644 config/.env.db.example delete mode 100644 config/.env.pw-encryption-key.example delete mode 100644 config/.env.redis.example rename config/{.env.wk-id.example => .env.wk-id} (100%) delete mode 100644 config/apache/Dockerfile delete mode 100644 config/nginx/nginx.conf create mode 100644 docker-install.sh create mode 100644 docker/apache/Dockerfile rename {config => docker}/apache/php/custom.ini (100%) create mode 100644 docker/database/wkvs-database-template.sql create mode 100644 docker/nginx/nginx.conf create mode 100644 docker/node/Dockerfile create mode 100644 html/.DS_Store rename {www => html}/.htaccess (100%) rename {www => html}/RankLive/.htaccess (100%) rename {www => html}/RankLive/js/script.js (100%) rename {www => html}/RankLive/router.php (100%) rename {www => html}/RankLive/script.php (100%) rename {www => html}/css/custom-display-editor-required-css.css (100%) rename {www => html}/css/header.css (100%) rename {www => html}/css/rank-live.css (100%) rename {www => html}/css/riegeneinteilung.css (100%) rename {www => html}/error-pages/400.html (100%) rename {www => html}/error-pages/400.php (100%) rename {www => html}/error-pages/403.html (100%) rename {www => html}/error-pages/429.html (100%) rename {www => html}/error-pages/500.html (100%) rename {www => html}/error-pages/style.css (100%) rename {www => html}/error-pages/translations.js (100%) rename {www => html}/externe-geraete/.htaccess (100%) rename {www => html}/externe-geraete/audio.php (100%) rename {www => html}/externe-geraete/css/audio.css (100%) rename {www => html}/externe-geraete/css/display.css (100%) rename {www => html}/externe-geraete/display.php (100%) rename {www => html}/externe-geraete/router.php (100%) rename {www => html}/files/WKVS_Vorlage_Upload_Personen_Bulk.xlsx (100%) rename {www => html}/files/fonts/Google_Sans_Flex/.DS_Store (100%) rename {www => html}/files/fonts/Google_Sans_Flex/GoogleSansFlex-VariableFont_GRAD,ROND,opsz,slnt,wdth,wght.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/OFL.txt (97%) rename {www => html}/files/fonts/Google_Sans_Flex/README.txt (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-Black.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-Bold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-ExtraBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-ExtraLight.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-Light.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-Medium.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-Regular.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-SemiBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_120pt-Thin.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-Black.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-Bold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-ExtraBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-ExtraLight.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-Light.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-Medium.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-Regular.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-SemiBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_24pt-Thin.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-Black.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-Bold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-ExtraBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-ExtraLight.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-Light.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-Medium.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-Regular.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-SemiBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_36pt-Thin.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-Black.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-Bold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-ExtraBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-ExtraLight.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-Light.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-Medium.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-Regular.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-SemiBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_72pt-Thin.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Black.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Bold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-ExtraBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-ExtraLight.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Light.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Medium.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Regular.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-SemiBold.ttf (100%) rename {www => html}/files/fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Thin.ttf (100%) rename {www => html}/files/fonts/fonts.css (100%) rename {www => html}/files/music/piep.mp3 (100%) create mode 100644 html/intern/.DS_Store rename {www => html}/intern/.htaccess (100%) rename {www => html}/intern/css/coloris/coloris.min.css (100%) rename {www => html}/intern/css/custom-msg-display.css (100%) rename {www => html}/intern/css/custom-select.css (100%) rename {www => html}/intern/css/displaycontrol.css (100%) rename {www => html}/intern/css/einstellungen-ai.css (100%) rename {www => html}/intern/css/einstellungen.css (100%) rename {www => html}/intern/css/flatpickr/flatpickr.min.css (100%) rename {www => html}/intern/css/kampfrichter.css (100%) rename {www => html}/intern/css/login.css (100%) rename {www => html}/intern/css/logindata.css (100%) rename {www => html}/intern/css/otl.css (100%) rename {www => html}/intern/css/rank-live.css (100%) rename {www => html}/intern/css/rechnungen.css (100%) rename {www => html}/intern/css/riegeneinteilung.css (100%) rename {www => html}/intern/css/sidebar.css (100%) rename {www => html}/intern/css/trainer.css (100%) rename {www => html}/intern/css/user.css (100%) rename {www => html}/intern/img/icon.png (100%) rename {www => html}/intern/img/login/bgKampfrichter.webp (100%) rename {www => html}/intern/img/login/bgOtl.webp (100%) rename {www => html}/intern/img/login/bgTrainer.webp (100%) rename {www => html}/intern/img/login/bgWk_leitung.webp (100%) rename {www => html}/intern/img/login/readme.md (100%) rename {www => html}/intern/img/logo-normal.png (100%) rename {www => html}/intern/img/readme.md (100%) rename {www => html}/intern/js/ace/ace.js (100%) rename {www => html}/intern/js/ace/mode-css.js (100%) rename {www => html}/intern/js/chart/chart.js (100%) rename {www => html}/intern/js/coloris/coloris.min.js (100%) rename {www => html}/intern/js/cookie-banner.js (100%) rename {www => html}/intern/js/custom-msg-display.js (100%) rename {www => html}/intern/js/custom-select.js (100%) rename {www => html}/intern/js/flatpickr/de.min.js (100%) rename {www => html}/intern/js/flatpickr/flatpickr.min.js (100%) rename {www => html}/intern/js/flatpickr/fr.min.js (100%) rename {www => html}/intern/js/flatpickr/it.min.js (100%) rename {www => html}/intern/js/gallery.js (100%) rename {www => html}/intern/js/gsap/MorphSVGPlugin.min.js (100%) rename {www => html}/intern/js/gsap/gsap.min.js (100%) rename {www => html}/intern/js/header.js (100%) rename {www => html}/intern/js/img.js (100%) rename {www => html}/intern/js/jquery/jquery-3.7.1.min.js (100%) rename {www => html}/intern/js/jquery/jquery-ui.min.js (100%) rename {www => html}/intern/js/jquery/jquery.ui.touch-punch.min.js (100%) rename {www => html}/intern/js/justified-gallery/jquery.justifiedGallery.min.js (100%) rename {www => html}/intern/js/photoswipe/photoswipe-lightbox.umd.min.js (100%) rename {www => html}/intern/js/photoswipe/photoswipe.umd.min.js (100%) rename {www => html}/intern/js/qr-code/LICENSE (100%) rename {www => html}/intern/js/qr-code/bower.json (100%) rename {www => html}/intern/js/qr-code/qrcode.js (100%) rename {www => html}/intern/js/qr-code/qrcode.min.js (100%) rename {www => html}/intern/js/sidebar.js (100%) rename {www => html}/intern/kampfrichter.php (100%) rename {www => html}/intern/otlogin.php (100%) rename {www => html}/intern/scripts/ajax-create-ws-token.php (100%) rename {www => html}/intern/scripts/ajax-update_selected_freigabe.php (100%) rename {www => html}/intern/scripts/audiofiles-uploads/.user.ini (100%) rename {www => html}/intern/scripts/audiofiles-uploads/ajax_audiofile_upload.php (100%) rename {www => html}/intern/scripts/displaycontrol/ajax-update_display_config_json.php (100%) rename {www => html}/intern/scripts/einstellungen/.user.ini (100%) rename {www => html}/intern/scripts/einstellungen/ajax-change-value.php (100%) rename {www => html}/intern/scripts/einstellungen/ajax-gereate-management.php (100%) rename {www => html}/intern/scripts/einstellungen/ajax-noten-management.php (100%) rename {www => html}/intern/scripts/einstellungen/ajax-save-user-css.php (100%) rename {www => html}/intern/scripts/einstellungen/ajax-upload-image.php (100%) rename {www => html}/intern/scripts/einstellungen/ajax-zeitplan-management.php (100%) rename {www => html}/intern/scripts/einstellungen/export-config-file.php (100%) rename {www => html}/intern/scripts/einstellungen/upload-config-file.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-delete-noten-turnerinnen.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-delete_protokoll_entries.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-delete_rangliste.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-kampfrichter_currentedit.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-neu_protokoll.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-neu_rangliste.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_start_musik.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_stopp_musik.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/ajax-update_value_kampfrichter.php (100%) rename {www => html}/intern/scripts/kampfrichter/ajax/displays/ajax-display-functions.php (100%) rename {www => html}/intern/scripts/kampfrichter/js/js-kampfrichter-admin.js (100%) rename {www => html}/intern/scripts/kampfrichter/js/js-kampfrichter-normal.js (100%) rename {www => html}/intern/scripts/logindata/ajax-create-link-user.php (100%) rename {www => html}/intern/scripts/logindata/ajax-create-otl.php (100%) rename {www => html}/intern/scripts/logindata/ajax-delete-user.php (100%) rename {www => html}/intern/scripts/logindata/ajax-delete-verein.php (100%) rename {www => html}/intern/scripts/logindata/ajax-neu_programm.php (100%) rename {www => html}/intern/scripts/logindata/ajax-remove_programm.php (100%) rename {www => html}/intern/scripts/logindata/ajax-update-user-information.php (100%) rename {www => html}/intern/scripts/logindata/ajax-update_programm_value.php (100%) rename {www => html}/intern/scripts/logindata/ajax-vereine-handler.php (100%) rename {www => html}/intern/scripts/ranklive/ajax-get-ranklive-config.php (100%) rename {www => html}/intern/scripts/ranklive/ajax-save-ranklive-config.php (100%) rename {www => html}/intern/scripts/ranklive/export-config-file.php (100%) rename {www => html}/intern/scripts/ranklive/upload-config-file.php (100%) rename {www => html}/intern/scripts/rechnungen/ajax-neu_protokoll.php (100%) rename {www => html}/intern/scripts/rechnungen/ajax_update_order_status.php (100%) rename {www => html}/intern/scripts/rechnungen/ajax_update_order_status_by_scor.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax-zeiten-management.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax_auto_riegeneinteilung.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax_change_name_of_specific_abt.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax_change_number_of_abt.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax_change_order_index_of_specific_abt.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax_delete_specific_abt.php (100%) rename {www => html}/intern/scripts/riegeneinteilung/ajax_update_turnerin.php (100%) rename {www => html}/intern/scripts/trainer/ajax-add-personen-excel.php (100%) rename {www => html}/intern/scripts/trainer/ajax-add_entry_fees_to_basket.php (100%) rename {www => html}/intern/scripts/trainer/ajax-delete-person.php (100%) rename {www => html}/intern/scripts/trainer/ajax-fetch_temp_order.php (100%) rename {www => html}/intern/scripts/trainer/ajax-neu-verbuchte-startgebuer.php (100%) rename {www => html}/intern/scripts/trainer/ajax-neu_temp_order.php (100%) rename {www => html}/intern/scripts/trainer/ajax-remove_basket_item.php (100%) rename {www => html}/intern/scripts/trainer/ajax-update-person-kat.php (100%) rename {www => html}/intern/scripts/trainer/ajax_link_bodenmusik.php (100%) rename {www => html}/intern/scripts/trainer/ajax_unlink_delete_bodenmusik.php (100%) rename {www => html}/intern/scripts/wettkaempfe/ajax-add-wettkampf.php (100%) rename {www => html}/intern/scripts/wettkaempfe/ajax-delete-wettkampf.php (100%) rename {www => html}/intern/scripts/wettkaempfe/ajax-update-aktiv-wettkampf.php (100%) rename {www => html}/intern/scripts/wettkaempfe/ajax-update-wettkampf.php (100%) rename {www => html}/intern/trainer.php (99%) rename {www => html}/intern/wk-leitung/.htaccess (100%) rename {www => html}/intern/wk-leitung/displaycontrol.php (100%) rename {www => html}/intern/wk-leitung/einstellungen.php (100%) rename {www => html}/intern/wk-leitung/logindata.php (100%) rename {www => html}/intern/wk-leitung/rank-live.php (100%) rename {www => html}/intern/wk-leitung/rechnungen-viewer.php (100%) rename {www => html}/intern/wk-leitung/rechnungen.php (100%) rename {www => html}/intern/wk-leitung/riegeneinteilung.php (100%) rename {www => html}/intern/wk-leitung/wettkaempfe.php (100%) rename {www => html}/js/header.js (100%) rename {www => html}/licence.txt (100%) rename {www => html}/riegeneinteilung.php (100%) create mode 100644 setup/.DS_Store delete mode 100644 setup/database/generate-sql.php delete mode 100644 setup/database/generate-users.php delete mode 100644 setup/database/init-db.php delete mode 100644 setup/database/wkvs-database-template.sql delete mode 100644 setup/init-env.php diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..90694801c045a6d9555cdda61ab5404546148bc5 GIT binary patch literal 6148 zcmeHKOHRWu5PbtF3S!eGOJ9K-L{&Kf7eH?AvW@`FNcJ1gc*gOQ zVtW9{;;^{^<^XCoMNwr$)I91si^(&hSdJEZJm6!qUvEbe{YI01dyO?(ykW=w`}0Mjc?%7myUaty;`rr}3fu1AR=5&8io%5Q&-chrt R-NK3a5HLcrO9m!j;0uA2EC2ui literal 0 HcmV?d00001 diff --git a/.gitignore b/.gitignore index f62ff95..59b7503 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,22 @@ config/.env.db -config/.env.db-tables config/.env.db-guest config/.env.redis config/.env.pw-encryption-key -config/.env.wk-id config/.env.mail config/.env.db-wkvs-user +config/.env.docker.db websocket/node_modules composer/vendor private-files/rechnungen/* private-files/config-uploads/* .php-ini .php-version -www/externe-geraete/json/* -www/files/ranglisten/* -www/sponsoren.php -www/css/sponsoren.css -www/scripts -www/files/music/* -!www/files/music/piep.mp3 -www/.well-known -www/intern/kampfrichter/ajax/ajax-neu_dynamic-rangliste.php \ No newline at end of file +html/externe-geraete/json/* +html/files/ranglisten/* +html/sponsoren.php +html/css/sponsoren.css +html/scripts +html/files/music/* +!html/files/music/piep.mp3 +html/.well-known +html/intern/kampfrichter/ajax/ajax-neu_dynamic-rangliste.php \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 64d3afc..f4dabfa 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,125 +1,55 @@ services: - nginx: image: nginx:latest - container_name: wkvs-nginx ports: - - "127.0.0.1:8080:80" - - "127.0.0.1:8082:8082" - volumes: - - .:/var/wkvs - - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro + - "127.0.0.1:8081:80" depends_on: - apache - node + volumes: + - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro networks: - - wkvs - - env-init: - build: ./config/apache - container_name: wkvs-env-init - volumes: - - .:/var/wkvs - working_dir: /var/wkvs - command: php setup/init-env.php - - composer-init: - image: composer:latest - container_name: wkvs-composer-init - volumes: - - .:/app - working_dir: /app/composer - command: composer install --no-interaction --prefer-dist - depends_on: - env-init: - condition: service_completed_successfully + - app-network apache: - build: ./config/apache - container_name: wkvs-apache + build: ./docker/apache volumes: - - .:/var/wkvs - - ./config/apache/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini - depends_on: - db-init: - condition: service_completed_successfully - composer-init: - condition: service_completed_successfully + - .:/var/www/wkvs networks: - - wkvs + - app-network mariadb: - image: mariadb:latest - container_name: wkvs-mariadb + image: mariadb:11 + container_name: test-mariadb restart: unless-stopped env_file: - - path: ./config/.env.db - required: false + - ./config/.env.docker.db volumes: - db_data:/var/lib/mysql - healthcheck: - test: ["CMD", "mariadb-admin", "ping", "-h", "127.0.0.1"] - interval: 5s - timeout: 5s - retries: 5 - depends_on: - env-init: - condition: service_completed_successfully networks: - - wkvs + - app-network - db-init: - build: ./config/apache - container_name: wkvs-db-init + node: + build: + context: . + dockerfile: docker/node/Dockerfile + expose: + - "8082" volumes: - - .:/var/wkvs - working_dir: /var/wkvs - depends_on: - mariadb: - condition: service_healthy - env-init: - condition: service_completed_successfully + - .:/var/www/wkvs + - /var/www/wkvs/websocket/node_modules networks: - - wkvs - command: php setup/database/init-db.php + - app-network redis: image: redis:7 container_name: wkvs-redis - restart: unless-stopped - env_file: - - path: ./config/.env.redis - required: false - command: ["sh", "-c", "exec redis-server --requirepass \"$REDDIS_PASSWORD\""] - depends_on: - env-init: - condition: service_completed_successfully networks: - - wkvs - - node: - image: node:latest - container_name: wkvs-node - restart: unless-stopped - volumes: - - .:/var/wkvs - working_dir: /var/wkvs/websocket - env_file: - - path: ./config/.env.redis - required: false - environment: - - REDDIS_HOST=redis - command: sh -c "npm install && npm install -g pm2 && pm2-runtime start index.js --max-memory-restart 1G --node-args=\"--max-old-space-size=1024\" --name=\"WebSocket WKVS\"" - depends_on: - redis: - condition: service_started - env-init: - condition: service_completed_successfully - networks: - - wkvs + - app-network volumes: db_data: networks: - wkvs: \ No newline at end of file + app-network: + driver: bridge \ No newline at end of file diff --git a/config/.env.db-guest.example b/config/.env.db-guest.example deleted file mode 100644 index d3a97e0..0000000 --- a/config/.env.db-guest.example +++ /dev/null @@ -1,7 +0,0 @@ -# This Account must have have permissions SELECT, INSERT, UPDATE ! - -DB_USER=DB_GUESTUSER_USERNAME -DB_PASSWORD=DB_GUESTUSER_PASSWORD -DB_NAME=DATABASE_NAME # Same as .env.db-wkvs-user -DB_HOST=mariadb # Same as .env.db-wkvs-user, An IP without Port, often 127.0.0.1 or localhost -DB_PORT=3306 # default Port is 3306 \ No newline at end of file diff --git a/config/.env.db-tables.example b/config/.env.db-tables similarity index 97% rename from config/.env.db-tables.example rename to config/.env.db-tables index 7c3cfd4..d51df9d 100644 --- a/config/.env.db-tables.example +++ b/config/.env.db-tables @@ -1,5 +1,3 @@ -DB_PREFIX=PREFIX - # Tabellennamen DB_TABLE_TEILNEHMENDE=teilnehmende DB_TABLE_TEILNEHMENDE_GRUPPEN=teilnehmende_gruppen diff --git a/config/.env.db-wkvs-user.example b/config/.env.db-wkvs-user.example deleted file mode 100644 index fe305d7..0000000 --- a/config/.env.db-wkvs-user.example +++ /dev/null @@ -1,7 +0,0 @@ -# This Account must have at least have permissions SELECT, INSERT, UPDATE, DELETE ! - -DB_USER=DB_USER_USERNAME -DB_PASSWORD=DB_USER_PASSWORD -DB_NAME=DATABASE_NAME -DB_HOST=mariadb # mariadb for Docker Use, otherwsie An IP with Port 127.0.0.1 or localhost -DB_PORT=3306 # default Port is 3306 \ No newline at end of file diff --git a/config/.env.db.example b/config/.env.db.example deleted file mode 100644 index b467472..0000000 --- a/config/.env.db.example +++ /dev/null @@ -1,3 +0,0 @@ -MYSQL_ROOT_PASSWORD=YOUR_PASSWORD_FOR_ROOT -MYSQL_DATABASE=YOUR_DATABASE_NAME -MYSQL_HOST=localhost \ No newline at end of file diff --git a/config/.env.pw-encryption-key.example b/config/.env.pw-encryption-key.example deleted file mode 100644 index 50ab5a0..0000000 --- a/config/.env.pw-encryption-key.example +++ /dev/null @@ -1 +0,0 @@ -PW_ENCRYPTION_KEY=YOUR_CUSTOM_PASSWORD_ENCRYPTION_KEY \ No newline at end of file diff --git a/config/.env.redis.example b/config/.env.redis.example deleted file mode 100644 index 8ec389a..0000000 --- a/config/.env.redis.example +++ /dev/null @@ -1,3 +0,0 @@ -REDDIS_PASSWORD=YOUR_REDDIS_PASSWORD -REDDIS_HOST=YOUR_REDDIS_IP # An IP, often 127.0.0.1 or localhost -REDDIS_PORT=YOUR_REDDIS_PORT # Default 6379 \ No newline at end of file diff --git a/config/.env.wk-id.example b/config/.env.wk-id similarity index 100% rename from config/.env.wk-id.example rename to config/.env.wk-id diff --git a/config/apache/Dockerfile b/config/apache/Dockerfile deleted file mode 100644 index d7f216a..0000000 --- a/config/apache/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM php:8.3-apache - -# Enable the rewrite module -RUN a2enmod rewrite - -RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli - -# Set Apache DocumentRoot to /var/wkvs/www -ENV APACHE_DOCUMENT_ROOT /var/wkvs/www -RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \ - && sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \ - && sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf \ No newline at end of file diff --git a/config/nginx/nginx.conf b/config/nginx/nginx.conf deleted file mode 100644 index 5e95991..0000000 --- a/config/nginx/nginx.conf +++ /dev/null @@ -1,33 +0,0 @@ -events {} - -http { - server { - listen 80; - - location / { - proxy_pass http://apache:80; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } - - location /ws/ { - proxy_pass http://node:8082; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; - - # Prevent WebSocket timeout - proxy_read_timeout 36000s; # 1 hour - proxy_send_timeout 36000s; # 1 hour - proxy_connect_timeout 75s; # optional - } - location ~ /\. { - deny all; - access_log off; - log_not_found off; - } - } -} \ No newline at end of file diff --git a/docker-install.sh b/docker-install.sh new file mode 100644 index 0000000..96c9496 --- /dev/null +++ b/docker-install.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +set -e + +# 1. Reset containers and volumes +docker compose down -v + +# Ensure the config directory exists +mkdir -p config + +# 2. Generate Random Variables correctly using $(...) +MYSQL_USER=$(openssl rand -hex 16) +MYSQL_PASSWORD=$(openssl rand -base64 32) +MYSQL_DATABASE="wkvs_database" +MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32) + +cat < config/.env.docker.db +MYSQL_ROOT_PASSWORD="$MYSQL_ROOT_PASSWORD" +MYSQL_DATABASE=$MYSQL_DATABASE +MYSQL_USER=$MYSQL_USER +MYSQL_PASSWORD="$MYSQL_PASSWORD" +EOF + +# 3. Handle Admin Hashing +KEYWORD=$(openssl rand -hex 16) +HASHED_KEYWORD=$(php -r "echo password_hash('$KEYWORD', PASSWORD_ARGON2ID);") + +# Replace placeholder in SQL template +sed "s|__ARGON_HASH_PLACEHOLDER__|$HASHED_KEYWORD|g" docker/database/wkvs-database-template.sql > docker/database/db-sql.sql + +# 1. Generate password +REDIS_PASSWORD=$(openssl rand -hex 32) + +# 3. Save variables to your .env file +cat < config/.env.redis +REDIS_PASSWORD="$REDIS_PASSWORD" +REDIS_HOST=redis +REDIS_PORT=6379 +EOF + +# 4. Start Docker Containers +docker compose up -d --build + +# 5. Wait until MariaDB is fully up and accepting connections +echo "Waiting for MariaDB to start..." + +sleep 5 + +until docker compose exec -T mariadb mariadb-admin ping -h localhost -u root -p"$MYSQL_ROOT_PASSWORD" --silent >/dev/null 2>&1; do + sleep 2 +done + +# 6. Execute Primary Schema Import +docker compose exec -T mariadb mariadb -u root -p"$MYSQL_ROOT_PASSWORD" "$MYSQL_DATABASE" < docker/database/db-sql.sql +rm docker/database/db-sql.sql + +# 7. Generate Additional Application Users & Passwords +MYSQL_WKVS_USERNAME="wkvs_normal_user" +MYSQL_GUEST_USERNAME="wkvs_guest_user" + +MYSQL_WKVS_PASSWORD=$(openssl rand -hex 32) +MYSQL_GUEST_PASSWORD=$(openssl rand -hex 16) + +# Write app user configuration files +cat < config/.env.db-wkvs-user +DB_USER=$MYSQL_WKVS_USERNAME +DB_PASSWORD="$MYSQL_WKVS_PASSWORD" +DB_NAME=$MYSQL_DATABASE +DB_HOST=mariadb +DB_PORT=3306 +EOF + + + +cat < config/.env.db-guest +DB_GUEST_USER=$MYSQL_GUEST_USERNAME +DB_GUEST_PASSWORD="$MYSQL_GUEST_PASSWORD" +DB_NAME=$MYSQL_DATABASE +DB_HOST=mariadb +DB_PORT=3306 +EOF + +# 8. Create Additional Users & Grant Permissions in MariaDB +echo "Creating application users and setting permissions..." + +docker compose exec -T mariadb mariadb -u root -p"$MYSQL_ROOT_PASSWORD" < /dev/null && [ ! -f "composer.phar" ]; then + php -r "copy('\''https://getcomposer.org/installer'\'', '\''composer-setup.php'\'');" + php composer-setup.php --quiet + php -r "unlink('\''composer-setup.php'\'');" +fi +' + +# 2. Run composer install against the specified directory +docker compose exec "$SERVICE_NAME" bash -c " +COMPOSER_CMD=\$(command -v composer || echo \"php \$(pwd)/composer.phar\") +TARGET_DIR=\"$COMPOSER_DIR\" + +if [ -f \"\$TARGET_DIR/composer.lock\" ] || [ -f \"\$TARGET_DIR/composer.json\" ]; then + \$COMPOSER_CMD install --working-dir=\"\$TARGET_DIR\" --no-interaction --prefer-dist --quiet +else + echo \"Error: Neither composer.json nor composer.lock found in '\$TARGET_DIR'.\" >&2 + exit 1 +fi +" + +echo "Konfiguriere Redis..." + +# 2. Set password in the currently running Redis container +docker compose exec redis redis-cli CONFIG SET requirepass "$REDIS_PASSWORD" + +PASSWORD_KEY=openssl rand -base64 32 + +cat < config/.env.pw-encryption-key +PW_ENCRYPTION_KEY=$PASSWORD_KEY +EOF + +echo "------------------------------------------------------" +echo "Setup Complete!" +echo "Admin Plain Keyword: $KEYWORD" +echo "------------------------------------------------------" \ No newline at end of file diff --git a/docker/apache/Dockerfile b/docker/apache/Dockerfile new file mode 100644 index 0000000..877f8e6 --- /dev/null +++ b/docker/apache/Dockerfile @@ -0,0 +1,27 @@ +FROM php:8.5-apache + +# Enable Apache rewrite module +RUN a2enmod rewrite + +# Install system dependencies, PHP extensions, and clean up apt cache +RUN apt-get update && apt-get install -y \ + unzip \ + libzip-dev \ + libicu-dev \ + git \ + && docker-php-ext-install \ + bcmath \ + mysqli \ + pdo_mysql \ + zip \ + intl \ + && pecl install redis \ + && docker-php-ext-enable redis \ + && rm -rf /var/lib/apt/lists/* + +# Update Apache DocumentRoot to /var/www/wkvs/html/ and enable .htaccess overrides +ENV APACHE_DOCUMENT_ROOT=/var/www/wkvs/html/ + +RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \ + && sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \ + && sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf \ No newline at end of file diff --git a/config/apache/php/custom.ini b/docker/apache/php/custom.ini similarity index 100% rename from config/apache/php/custom.ini rename to docker/apache/php/custom.ini diff --git a/docker/database/wkvs-database-template.sql b/docker/database/wkvs-database-template.sql new file mode 100644 index 0000000..7773f94 --- /dev/null +++ b/docker/database/wkvs-database-template.sql @@ -0,0 +1,335 @@ +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `audiofiles` +-- -------------------------------------------------------- + +CREATE TABLE `audiofiles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `file_name` varchar(1024) NOT NULL, + `file_path` varchar(1024) NOT NULL, + `edited_by` int(11) DEFAULT NULL, + `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `disziplinen` +-- -------------------------------------------------------- + +CREATE TABLE `disziplinen` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(1024) DEFAULT NULL, + `start_index` int(11) DEFAULT NULL, + `color_kampfrichter` char(7) NOT NULL DEFAULT '#424242', + `audiofile` tinyint(1) DEFAULT NULL, + `audiofile_max_duration` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `einmal_links` +-- -------------------------------------------------------- + +CREATE TABLE `einmal_links` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `url` varchar(1000) DEFAULT NULL, + `user_id` int(11) NOT NULL DEFAULT 0, + `type` enum('login','pwreset','create_profile','') NOT NULL, + `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), + `expires_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `url` (`url`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +DELIMITER $$ +CREATE TRIGGER `before_insert_login_tokens` +BEFORE INSERT ON `einmal_links` +FOR EACH ROW +BEGIN + IF NEW.url IS NULL THEN + SET NEW.url = HEX(RANDOM_BYTES(32)); + END IF; +END$$ +DELIMITER ; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `gruppen` +-- -------------------------------------------------------- + +CREATE TABLE `gruppen` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL DEFAULT 'KEIN NAME', + `order_index` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `gruppen_zeiten` +-- -------------------------------------------------------- + +CREATE TABLE `gruppen_zeiten` ( + `zeitplan_id` int(11) NOT NULL, + `start_time` time NOT NULL, + `end_time` time DEFAULT NULL, + `abt_id` int(11) NOT NULL, + UNIQUE KEY `unique_index` (`zeitplan_id`,`abt_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `intern_benutzende` +-- -------------------------------------------------------- + +CREATE TABLE `intern_benutzende` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `username` varchar(191) DEFAULT NULL, + `name_person` varchar(255) DEFAULT NULL, + `password_hash` varchar(255) DEFAULT NULL, + `password_cipher` text DEFAULT NULL, + `created_at` datetime NOT NULL DEFAULT current_timestamp(), + `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `edited_by` varchar(20) NOT NULL DEFAULT '0', + `freigabe` varchar(500) NOT NULL DEFAULT 'keine', + `login_active` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_page_unique` (`username`,`password_hash`) USING BTREE, + KEY `indexFreigabe` (`freigabe`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- Admin Seed Entry (Uses Argon2id placeholder for replacement via bash sed script) +INSERT INTO `intern_benutzende` (`username`, `password_hash`, `password_cipher`, `freigabe`, `login_active`) +VALUES ('admin', '__ARGON_HASH_PLACEHOLDER__', 'not_set', '{"types":["wk_leitung","trainer","kampfrichter"],"freigabenTrainer":["admin"],"freigabenKampfrichter":["A"]}', 1); + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `kategorien` +-- -------------------------------------------------------- + +CREATE TABLE `kategorien` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `programm` text NOT NULL, + `order_index` int(11) DEFAULT NULL, + `preis` decimal(10,2) DEFAULT 0.00, + `aktiv` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `tabellen_konfiguration` +-- -------------------------------------------------------- + +CREATE TABLE `tabellen_konfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type_slug` varchar(128) NOT NULL, + `json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`json`)), + `all_noten_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`all_noten_json`)), + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `created_by` int(11) DEFAULT NULL, + `updated_by` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_slug` (`type_slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `teilnehmende` +-- -------------------------------------------------------- + +CREATE TABLE `teilnehmende` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `wk_id` int(11) DEFAULT NULL, + `name` text NOT NULL, + `vorname` text NOT NULL, + `geburtsdatum` date NOT NULL, + `programm` text NOT NULL, + `verein` text NOT NULL, + `bezahlt` int(11) NOT NULL DEFAULT 1, + `bezahltoverride` int(11) NOT NULL DEFAULT 0, + `betrag_bezahlt` decimal(12,2) NOT NULL DEFAULT 0.00, + PRIMARY KEY (`id`), + KEY `wk_index` (`wk_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `teilnehmende_audiofiles` +-- -------------------------------------------------------- + +CREATE TABLE `teilnehmende_audiofiles` ( + `person_id` int(7) NOT NULL, + `geraet_id` int(7) NOT NULL, + `audiofile_id` int(7) NOT NULL, + UNIQUE KEY `unique_combo` (`person_id`,`geraet_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `teilnehmende_gruppen` +-- -------------------------------------------------------- + +CREATE TABLE `teilnehmende_gruppen` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `turnerin_id` int(11) NOT NULL, + `abteilung_id` int(11) NOT NULL, + `geraet_id` int(11) NOT NULL, + `turnerin_index` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_turnerin` (`turnerin_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `variables` +-- -------------------------------------------------------- + +CREATE TABLE `variables` ( + `name` varchar(255) NOT NULL DEFAULT 'NaN', + `value` varchar(255) DEFAULT NULL, + UNIQUE KEY `uniqueIndex` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `verbuchte_startgebueren` +-- -------------------------------------------------------- + +CREATE TABLE `verbuchte_startgebueren` ( + `order_id` int(11) NOT NULL, + `order_type` varchar(100) DEFAULT NULL, + `preis` float DEFAULT NULL, + `user_id` int(11) NOT NULL, + `item_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`item_ids`)), + `used_verein_konten` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, + `order_status` int(11) NOT NULL DEFAULT 0, + `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), + `edited_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + PRIMARY KEY (`order_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `verbuchte_startgebueren_log` +-- -------------------------------------------------------- + +CREATE TABLE `verbuchte_startgebueren_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_id` int(11) NOT NULL, + `old_order_status` int(11) NOT NULL, + `new_order_status` int(11) NOT NULL, + `edited_by` int(11) NOT NULL, + `edited_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `vereine` +-- -------------------------------------------------------- + +CREATE TABLE `vereine` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `verein` text NOT NULL, + `email` varchar(100) NOT NULL DEFAULT 'forms@testseite-fh.ch', + `konto` decimal(12,2) NOT NULL DEFAULT 0.00, + PRIMARY KEY (`id`), + UNIQUE KEY `indexturnerinnen` (`id`,`verein`(31)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `warenkorb_startgebueren` +-- -------------------------------------------------------- + +CREATE TABLE `warenkorb_startgebueren` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) UNSIGNED NOT NULL, + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `basket_items_ibfk_1` (`user_id`), + KEY `basket_items_ibfk_2` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `wertungen` +-- -------------------------------------------------------- + +CREATE TABLE `wertungen` ( + `person_id` int(11) NOT NULL, + `note_bezeichnung_id` int(11) NOT NULL, + `geraet_id` int(11) NOT NULL, + `wk_id` int(11) NOT NULL, + `run_number` tinyint(3) NOT NULL DEFAULT 1, + `value` float DEFAULT NULL, + `is_public` tinyint(1) DEFAULT NULL, + `public_value` float DEFAULT NULL, + `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), + UNIQUE KEY `uniquePersonNoteJahrGereat` (`person_id`,`note_bezeichnung_id`,`wk_id`,`geraet_id`,`run_number`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `wertungen_log` +-- -------------------------------------------------------- + +CREATE TABLE `wertungen_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `person_id` int(11) NOT NULL, + `note_bezeichnung_id` int(11) NOT NULL, + `geraet_id` int(11) NOT NULL, + `wk_id` int(11) NOT NULL, + `run_number` tinyint(3) NOT NULL DEFAULT 1, + `old_value` float DEFAULT NULL, + `new_value` float DEFAULT NULL, + `edited_by` int(11) NOT NULL, + `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `wertungstypen` +-- -------------------------------------------------------- + +CREATE TABLE `wertungstypen` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `default_value` float DEFAULT NULL, + `type` enum('input','berechnung') NOT NULL DEFAULT 'input', + `berechnung` varchar(255) DEFAULT NULL, + `berechnung_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`berechnung_json`)), + `max_value` float DEFAULT NULL, + `min_value` float DEFAULT NULL, + `pro_geraet` tinyint(1) NOT NULL DEFAULT 1, + `anzahl_laeufe_json` text DEFAULT NULL, + `geraete_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '[]', + `zeige_auf_rangliste` float DEFAULT NULL, + `groesse_auf_rangliste` int(11) NOT NULL DEFAULT 0, + `nullstellen` int(11) NOT NULL DEFAULT 2, + `display_string` varchar(63) NOT NULL DEFAULT '${note}', + PRIMARY KEY (`id`), + UNIQUE KEY `uniqueName` (`name`) USING BTREE, + KEY `indexMaxValue` (`max_value`), + KEY `indexMinValue` (`min_value`), + KEY `indexBerechnungJson` (`berechnung_json`(768)), + KEY `indexDefaultValue` (`default_value`), + KEY `indexType` (`type`), + KEY `indexNullstellen` (`nullstellen`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `wettkaempfe` +-- -------------------------------------------------------- + +CREATE TABLE `wettkaempfe` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(256) NOT NULL, + `slug` varchar(64) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `slug` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- -------------------------------------------------------- +-- Tabellenstruktur für Tabelle `zeitplan_types` +-- -------------------------------------------------------- + +CREATE TABLE `zeitplan_types` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(2048) NOT NULL, + `has_endtime` tinyint(1) DEFAULT NULL, + `display_index` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +COMMIT; \ No newline at end of file diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf new file mode 100644 index 0000000..126c1ad --- /dev/null +++ b/docker/nginx/nginx.conf @@ -0,0 +1,51 @@ +events { + worker_connections 1024; +} + +http { + # Dynamically set Connection header (handles 'upgrade' and 'Upgrade') + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + # Standard HTTP Proxy to Apache + location / { + proxy_pass http://apache:80; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # WebSocket Proxy to Node + location /ws/ { + # Note: Add trailing slash if you want Nginx to strip '/ws/' before reaching Node + proxy_pass http://node:8082/; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; # Dynamic connection header + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # Keep-alive settings for long-lived WebSocket connections + proxy_read_timeout 36000s; + proxy_send_timeout 36000s; + proxy_connect_timeout 75s; + } + + # Block access to hidden files (.htaccess, .git, .env, etc.) + location ~ /\. { + deny all; + access_log off; + log_not_found off; + } + } +} \ No newline at end of file diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile new file mode 100644 index 0000000..7273cc3 --- /dev/null +++ b/docker/node/Dockerfile @@ -0,0 +1,23 @@ +FROM node:20-alpine + +WORKDIR /var/www/wkvs/websocket + +# Install pm2 globally +RUN npm install -g pm2 + +# Copy package files from the websocket folder +COPY websocket/package*.json ./ + +# Install dependencies strictly following lockfile +RUN npm ci + +# Copy the rest of the application source code from websocket folder +COPY websocket/ ./ + +# Change ownership to the non-root node user for security +RUN chown -R node:node /var/www/wkvs/websocket +USER node + +EXPOSE 3000 + +CMD ["pm2-runtime", "start", "index.js"] \ No newline at end of file diff --git a/html/.DS_Store b/html/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ded39b651e809700e7b6b9227133d78c19160d84 GIT binary patch literal 6148 zcmeHKI|>3p3{6x-u(7n9D|mxJ^aNf&{1k#H`02OuTprDr4}z>Vf{naD@@6u5v+OH2 z8xhgzbu$qeiO2wMC^rjjvvc#7buyzsIPN&fVRK&ZSI6VNRsB9;+`jDOAQ#zw!GC`% zvs8czPys4H1*pI$1+4eN2E#x`DnJFOz*7PHJ`}iNO>6@F(}Cb40I-L&8`eHc0E;Dn zHL(dq2Btv;232#!(4ZqdUU_SV+RS+6bdCERN6a5Jo(g5d2K=-s>h%_lF_XjBWgH;s1fFD2*gb*iEK$P|>zAK-`_#s4ep+TZSW67Rf zpXXLP#rX`tR=dqLummutJL1E`)cm>o#Lg;XL^|K`h-bWGhgUpJs!u1Jdx1S(aE0MJ zfAjV*+;6wTX_~T9Knh3!DIf);z%Lc>-b8c9h8O{e zGp571j#+}(JVES*VLuSI;@5dtCOuJ6pPdO{ubr1o~S4V zq`a|G%OCF#jKuw37l-;9n_Vv-RzI#Vb{Bom|d)ZKL1Oz2-o7<2on|(T<7H ij=Ax6d>KVq*L=LtnI`cs%>Sw@pkx7BSR^Su+;1zuU literal 0 HcmV?d00001 diff --git a/www/intern/.htaccess b/html/intern/.htaccess similarity index 100% rename from www/intern/.htaccess rename to html/intern/.htaccess diff --git a/www/intern/css/coloris/coloris.min.css b/html/intern/css/coloris/coloris.min.css similarity index 100% rename from www/intern/css/coloris/coloris.min.css rename to html/intern/css/coloris/coloris.min.css diff --git a/www/intern/css/custom-msg-display.css b/html/intern/css/custom-msg-display.css similarity index 100% rename from www/intern/css/custom-msg-display.css rename to html/intern/css/custom-msg-display.css diff --git a/www/intern/css/custom-select.css b/html/intern/css/custom-select.css similarity index 100% rename from www/intern/css/custom-select.css rename to html/intern/css/custom-select.css diff --git a/www/intern/css/displaycontrol.css b/html/intern/css/displaycontrol.css similarity index 100% rename from www/intern/css/displaycontrol.css rename to html/intern/css/displaycontrol.css diff --git a/www/intern/css/einstellungen-ai.css b/html/intern/css/einstellungen-ai.css similarity index 100% rename from www/intern/css/einstellungen-ai.css rename to html/intern/css/einstellungen-ai.css diff --git a/www/intern/css/einstellungen.css b/html/intern/css/einstellungen.css similarity index 100% rename from www/intern/css/einstellungen.css rename to html/intern/css/einstellungen.css diff --git a/www/intern/css/flatpickr/flatpickr.min.css b/html/intern/css/flatpickr/flatpickr.min.css similarity index 100% rename from www/intern/css/flatpickr/flatpickr.min.css rename to html/intern/css/flatpickr/flatpickr.min.css diff --git a/www/intern/css/kampfrichter.css b/html/intern/css/kampfrichter.css similarity index 100% rename from www/intern/css/kampfrichter.css rename to html/intern/css/kampfrichter.css diff --git a/www/intern/css/login.css b/html/intern/css/login.css similarity index 100% rename from www/intern/css/login.css rename to html/intern/css/login.css diff --git a/www/intern/css/logindata.css b/html/intern/css/logindata.css similarity index 100% rename from www/intern/css/logindata.css rename to html/intern/css/logindata.css diff --git a/www/intern/css/otl.css b/html/intern/css/otl.css similarity index 100% rename from www/intern/css/otl.css rename to html/intern/css/otl.css diff --git a/www/intern/css/rank-live.css b/html/intern/css/rank-live.css similarity index 100% rename from www/intern/css/rank-live.css rename to html/intern/css/rank-live.css diff --git a/www/intern/css/rechnungen.css b/html/intern/css/rechnungen.css similarity index 100% rename from www/intern/css/rechnungen.css rename to html/intern/css/rechnungen.css diff --git a/www/intern/css/riegeneinteilung.css b/html/intern/css/riegeneinteilung.css similarity index 100% rename from www/intern/css/riegeneinteilung.css rename to html/intern/css/riegeneinteilung.css diff --git a/www/intern/css/sidebar.css b/html/intern/css/sidebar.css similarity index 100% rename from www/intern/css/sidebar.css rename to html/intern/css/sidebar.css diff --git a/www/intern/css/trainer.css b/html/intern/css/trainer.css similarity index 100% rename from www/intern/css/trainer.css rename to html/intern/css/trainer.css diff --git a/www/intern/css/user.css b/html/intern/css/user.css similarity index 100% rename from www/intern/css/user.css rename to html/intern/css/user.css diff --git a/www/intern/img/icon.png b/html/intern/img/icon.png similarity index 100% rename from www/intern/img/icon.png rename to html/intern/img/icon.png diff --git a/www/intern/img/login/bgKampfrichter.webp b/html/intern/img/login/bgKampfrichter.webp similarity index 100% rename from www/intern/img/login/bgKampfrichter.webp rename to html/intern/img/login/bgKampfrichter.webp diff --git a/www/intern/img/login/bgOtl.webp b/html/intern/img/login/bgOtl.webp similarity index 100% rename from www/intern/img/login/bgOtl.webp rename to html/intern/img/login/bgOtl.webp diff --git a/www/intern/img/login/bgTrainer.webp b/html/intern/img/login/bgTrainer.webp similarity index 100% rename from www/intern/img/login/bgTrainer.webp rename to html/intern/img/login/bgTrainer.webp diff --git a/www/intern/img/login/bgWk_leitung.webp b/html/intern/img/login/bgWk_leitung.webp similarity index 100% rename from www/intern/img/login/bgWk_leitung.webp rename to html/intern/img/login/bgWk_leitung.webp diff --git a/www/intern/img/login/readme.md b/html/intern/img/login/readme.md similarity index 100% rename from www/intern/img/login/readme.md rename to html/intern/img/login/readme.md diff --git a/www/intern/img/logo-normal.png b/html/intern/img/logo-normal.png similarity index 100% rename from www/intern/img/logo-normal.png rename to html/intern/img/logo-normal.png diff --git a/www/intern/img/readme.md b/html/intern/img/readme.md similarity index 100% rename from www/intern/img/readme.md rename to html/intern/img/readme.md diff --git a/www/intern/js/ace/ace.js b/html/intern/js/ace/ace.js similarity index 100% rename from www/intern/js/ace/ace.js rename to html/intern/js/ace/ace.js diff --git a/www/intern/js/ace/mode-css.js b/html/intern/js/ace/mode-css.js similarity index 100% rename from www/intern/js/ace/mode-css.js rename to html/intern/js/ace/mode-css.js diff --git a/www/intern/js/chart/chart.js b/html/intern/js/chart/chart.js similarity index 100% rename from www/intern/js/chart/chart.js rename to html/intern/js/chart/chart.js diff --git a/www/intern/js/coloris/coloris.min.js b/html/intern/js/coloris/coloris.min.js similarity index 100% rename from www/intern/js/coloris/coloris.min.js rename to html/intern/js/coloris/coloris.min.js diff --git a/www/intern/js/cookie-banner.js b/html/intern/js/cookie-banner.js similarity index 100% rename from www/intern/js/cookie-banner.js rename to html/intern/js/cookie-banner.js diff --git a/www/intern/js/custom-msg-display.js b/html/intern/js/custom-msg-display.js similarity index 100% rename from www/intern/js/custom-msg-display.js rename to html/intern/js/custom-msg-display.js diff --git a/www/intern/js/custom-select.js b/html/intern/js/custom-select.js similarity index 100% rename from www/intern/js/custom-select.js rename to html/intern/js/custom-select.js diff --git a/www/intern/js/flatpickr/de.min.js b/html/intern/js/flatpickr/de.min.js similarity index 100% rename from www/intern/js/flatpickr/de.min.js rename to html/intern/js/flatpickr/de.min.js diff --git a/www/intern/js/flatpickr/flatpickr.min.js b/html/intern/js/flatpickr/flatpickr.min.js similarity index 100% rename from www/intern/js/flatpickr/flatpickr.min.js rename to html/intern/js/flatpickr/flatpickr.min.js diff --git a/www/intern/js/flatpickr/fr.min.js b/html/intern/js/flatpickr/fr.min.js similarity index 100% rename from www/intern/js/flatpickr/fr.min.js rename to html/intern/js/flatpickr/fr.min.js diff --git a/www/intern/js/flatpickr/it.min.js b/html/intern/js/flatpickr/it.min.js similarity index 100% rename from www/intern/js/flatpickr/it.min.js rename to html/intern/js/flatpickr/it.min.js diff --git a/www/intern/js/gallery.js b/html/intern/js/gallery.js similarity index 100% rename from www/intern/js/gallery.js rename to html/intern/js/gallery.js diff --git a/www/intern/js/gsap/MorphSVGPlugin.min.js b/html/intern/js/gsap/MorphSVGPlugin.min.js similarity index 100% rename from www/intern/js/gsap/MorphSVGPlugin.min.js rename to html/intern/js/gsap/MorphSVGPlugin.min.js diff --git a/www/intern/js/gsap/gsap.min.js b/html/intern/js/gsap/gsap.min.js similarity index 100% rename from www/intern/js/gsap/gsap.min.js rename to html/intern/js/gsap/gsap.min.js diff --git a/www/intern/js/header.js b/html/intern/js/header.js similarity index 100% rename from www/intern/js/header.js rename to html/intern/js/header.js diff --git a/www/intern/js/img.js b/html/intern/js/img.js similarity index 100% rename from www/intern/js/img.js rename to html/intern/js/img.js diff --git a/www/intern/js/jquery/jquery-3.7.1.min.js b/html/intern/js/jquery/jquery-3.7.1.min.js similarity index 100% rename from www/intern/js/jquery/jquery-3.7.1.min.js rename to html/intern/js/jquery/jquery-3.7.1.min.js diff --git a/www/intern/js/jquery/jquery-ui.min.js b/html/intern/js/jquery/jquery-ui.min.js similarity index 100% rename from www/intern/js/jquery/jquery-ui.min.js rename to html/intern/js/jquery/jquery-ui.min.js diff --git a/www/intern/js/jquery/jquery.ui.touch-punch.min.js b/html/intern/js/jquery/jquery.ui.touch-punch.min.js similarity index 100% rename from www/intern/js/jquery/jquery.ui.touch-punch.min.js rename to html/intern/js/jquery/jquery.ui.touch-punch.min.js diff --git a/www/intern/js/justified-gallery/jquery.justifiedGallery.min.js b/html/intern/js/justified-gallery/jquery.justifiedGallery.min.js similarity index 100% rename from www/intern/js/justified-gallery/jquery.justifiedGallery.min.js rename to html/intern/js/justified-gallery/jquery.justifiedGallery.min.js diff --git a/www/intern/js/photoswipe/photoswipe-lightbox.umd.min.js b/html/intern/js/photoswipe/photoswipe-lightbox.umd.min.js similarity index 100% rename from www/intern/js/photoswipe/photoswipe-lightbox.umd.min.js rename to html/intern/js/photoswipe/photoswipe-lightbox.umd.min.js diff --git a/www/intern/js/photoswipe/photoswipe.umd.min.js b/html/intern/js/photoswipe/photoswipe.umd.min.js similarity index 100% rename from www/intern/js/photoswipe/photoswipe.umd.min.js rename to html/intern/js/photoswipe/photoswipe.umd.min.js diff --git a/www/intern/js/qr-code/LICENSE b/html/intern/js/qr-code/LICENSE similarity index 100% rename from www/intern/js/qr-code/LICENSE rename to html/intern/js/qr-code/LICENSE diff --git a/www/intern/js/qr-code/bower.json b/html/intern/js/qr-code/bower.json similarity index 100% rename from www/intern/js/qr-code/bower.json rename to html/intern/js/qr-code/bower.json diff --git a/www/intern/js/qr-code/qrcode.js b/html/intern/js/qr-code/qrcode.js similarity index 100% rename from www/intern/js/qr-code/qrcode.js rename to html/intern/js/qr-code/qrcode.js diff --git a/www/intern/js/qr-code/qrcode.min.js b/html/intern/js/qr-code/qrcode.min.js similarity index 100% rename from www/intern/js/qr-code/qrcode.min.js rename to html/intern/js/qr-code/qrcode.min.js diff --git a/www/intern/js/sidebar.js b/html/intern/js/sidebar.js similarity index 100% rename from www/intern/js/sidebar.js rename to html/intern/js/sidebar.js diff --git a/www/intern/kampfrichter.php b/html/intern/kampfrichter.php similarity index 100% rename from www/intern/kampfrichter.php rename to html/intern/kampfrichter.php diff --git a/www/intern/otlogin.php b/html/intern/otlogin.php similarity index 100% rename from www/intern/otlogin.php rename to html/intern/otlogin.php diff --git a/www/intern/scripts/ajax-create-ws-token.php b/html/intern/scripts/ajax-create-ws-token.php similarity index 100% rename from www/intern/scripts/ajax-create-ws-token.php rename to html/intern/scripts/ajax-create-ws-token.php diff --git a/www/intern/scripts/ajax-update_selected_freigabe.php b/html/intern/scripts/ajax-update_selected_freigabe.php similarity index 100% rename from www/intern/scripts/ajax-update_selected_freigabe.php rename to html/intern/scripts/ajax-update_selected_freigabe.php diff --git a/www/intern/scripts/audiofiles-uploads/.user.ini b/html/intern/scripts/audiofiles-uploads/.user.ini similarity index 100% rename from www/intern/scripts/audiofiles-uploads/.user.ini rename to html/intern/scripts/audiofiles-uploads/.user.ini diff --git a/www/intern/scripts/audiofiles-uploads/ajax_audiofile_upload.php b/html/intern/scripts/audiofiles-uploads/ajax_audiofile_upload.php similarity index 100% rename from www/intern/scripts/audiofiles-uploads/ajax_audiofile_upload.php rename to html/intern/scripts/audiofiles-uploads/ajax_audiofile_upload.php diff --git a/www/intern/scripts/displaycontrol/ajax-update_display_config_json.php b/html/intern/scripts/displaycontrol/ajax-update_display_config_json.php similarity index 100% rename from www/intern/scripts/displaycontrol/ajax-update_display_config_json.php rename to html/intern/scripts/displaycontrol/ajax-update_display_config_json.php diff --git a/www/intern/scripts/einstellungen/.user.ini b/html/intern/scripts/einstellungen/.user.ini similarity index 100% rename from www/intern/scripts/einstellungen/.user.ini rename to html/intern/scripts/einstellungen/.user.ini diff --git a/www/intern/scripts/einstellungen/ajax-change-value.php b/html/intern/scripts/einstellungen/ajax-change-value.php similarity index 100% rename from www/intern/scripts/einstellungen/ajax-change-value.php rename to html/intern/scripts/einstellungen/ajax-change-value.php diff --git a/www/intern/scripts/einstellungen/ajax-gereate-management.php b/html/intern/scripts/einstellungen/ajax-gereate-management.php similarity index 100% rename from www/intern/scripts/einstellungen/ajax-gereate-management.php rename to html/intern/scripts/einstellungen/ajax-gereate-management.php diff --git a/www/intern/scripts/einstellungen/ajax-noten-management.php b/html/intern/scripts/einstellungen/ajax-noten-management.php similarity index 100% rename from www/intern/scripts/einstellungen/ajax-noten-management.php rename to html/intern/scripts/einstellungen/ajax-noten-management.php diff --git a/www/intern/scripts/einstellungen/ajax-save-user-css.php b/html/intern/scripts/einstellungen/ajax-save-user-css.php similarity index 100% rename from www/intern/scripts/einstellungen/ajax-save-user-css.php rename to html/intern/scripts/einstellungen/ajax-save-user-css.php diff --git a/www/intern/scripts/einstellungen/ajax-upload-image.php b/html/intern/scripts/einstellungen/ajax-upload-image.php similarity index 100% rename from www/intern/scripts/einstellungen/ajax-upload-image.php rename to html/intern/scripts/einstellungen/ajax-upload-image.php diff --git a/www/intern/scripts/einstellungen/ajax-zeitplan-management.php b/html/intern/scripts/einstellungen/ajax-zeitplan-management.php similarity index 100% rename from www/intern/scripts/einstellungen/ajax-zeitplan-management.php rename to html/intern/scripts/einstellungen/ajax-zeitplan-management.php diff --git a/www/intern/scripts/einstellungen/export-config-file.php b/html/intern/scripts/einstellungen/export-config-file.php similarity index 100% rename from www/intern/scripts/einstellungen/export-config-file.php rename to html/intern/scripts/einstellungen/export-config-file.php diff --git a/www/intern/scripts/einstellungen/upload-config-file.php b/html/intern/scripts/einstellungen/upload-config-file.php similarity index 100% rename from www/intern/scripts/einstellungen/upload-config-file.php rename to html/intern/scripts/einstellungen/upload-config-file.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-delete-noten-turnerinnen.php b/html/intern/scripts/kampfrichter/ajax/ajax-delete-noten-turnerinnen.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-delete-noten-turnerinnen.php rename to html/intern/scripts/kampfrichter/ajax/ajax-delete-noten-turnerinnen.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-delete_protokoll_entries.php b/html/intern/scripts/kampfrichter/ajax/ajax-delete_protokoll_entries.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-delete_protokoll_entries.php rename to html/intern/scripts/kampfrichter/ajax/ajax-delete_protokoll_entries.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-delete_rangliste.php b/html/intern/scripts/kampfrichter/ajax/ajax-delete_rangliste.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-delete_rangliste.php rename to html/intern/scripts/kampfrichter/ajax/ajax-delete_rangliste.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-kampfrichter_currentedit.php b/html/intern/scripts/kampfrichter/ajax/ajax-kampfrichter_currentedit.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-kampfrichter_currentedit.php rename to html/intern/scripts/kampfrichter/ajax/ajax-kampfrichter_currentedit.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-neu_protokoll.php b/html/intern/scripts/kampfrichter/ajax/ajax-neu_protokoll.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-neu_protokoll.php rename to html/intern/scripts/kampfrichter/ajax/ajax-neu_protokoll.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-neu_rangliste.php b/html/intern/scripts/kampfrichter/ajax/ajax-neu_rangliste.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-neu_rangliste.php rename to html/intern/scripts/kampfrichter/ajax/ajax-neu_rangliste.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_start_musik.php b/html/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_start_musik.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_start_musik.php rename to html/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_start_musik.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_stopp_musik.php b/html/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_stopp_musik.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_stopp_musik.php rename to html/intern/scripts/kampfrichter/ajax/ajax-update_kampfrichter_stopp_musik.php diff --git a/www/intern/scripts/kampfrichter/ajax/ajax-update_value_kampfrichter.php b/html/intern/scripts/kampfrichter/ajax/ajax-update_value_kampfrichter.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/ajax-update_value_kampfrichter.php rename to html/intern/scripts/kampfrichter/ajax/ajax-update_value_kampfrichter.php diff --git a/www/intern/scripts/kampfrichter/ajax/displays/ajax-display-functions.php b/html/intern/scripts/kampfrichter/ajax/displays/ajax-display-functions.php similarity index 100% rename from www/intern/scripts/kampfrichter/ajax/displays/ajax-display-functions.php rename to html/intern/scripts/kampfrichter/ajax/displays/ajax-display-functions.php diff --git a/www/intern/scripts/kampfrichter/js/js-kampfrichter-admin.js b/html/intern/scripts/kampfrichter/js/js-kampfrichter-admin.js similarity index 100% rename from www/intern/scripts/kampfrichter/js/js-kampfrichter-admin.js rename to html/intern/scripts/kampfrichter/js/js-kampfrichter-admin.js diff --git a/www/intern/scripts/kampfrichter/js/js-kampfrichter-normal.js b/html/intern/scripts/kampfrichter/js/js-kampfrichter-normal.js similarity index 100% rename from www/intern/scripts/kampfrichter/js/js-kampfrichter-normal.js rename to html/intern/scripts/kampfrichter/js/js-kampfrichter-normal.js diff --git a/www/intern/scripts/logindata/ajax-create-link-user.php b/html/intern/scripts/logindata/ajax-create-link-user.php similarity index 100% rename from www/intern/scripts/logindata/ajax-create-link-user.php rename to html/intern/scripts/logindata/ajax-create-link-user.php diff --git a/www/intern/scripts/logindata/ajax-create-otl.php b/html/intern/scripts/logindata/ajax-create-otl.php similarity index 100% rename from www/intern/scripts/logindata/ajax-create-otl.php rename to html/intern/scripts/logindata/ajax-create-otl.php diff --git a/www/intern/scripts/logindata/ajax-delete-user.php b/html/intern/scripts/logindata/ajax-delete-user.php similarity index 100% rename from www/intern/scripts/logindata/ajax-delete-user.php rename to html/intern/scripts/logindata/ajax-delete-user.php diff --git a/www/intern/scripts/logindata/ajax-delete-verein.php b/html/intern/scripts/logindata/ajax-delete-verein.php similarity index 100% rename from www/intern/scripts/logindata/ajax-delete-verein.php rename to html/intern/scripts/logindata/ajax-delete-verein.php diff --git a/www/intern/scripts/logindata/ajax-neu_programm.php b/html/intern/scripts/logindata/ajax-neu_programm.php similarity index 100% rename from www/intern/scripts/logindata/ajax-neu_programm.php rename to html/intern/scripts/logindata/ajax-neu_programm.php diff --git a/www/intern/scripts/logindata/ajax-remove_programm.php b/html/intern/scripts/logindata/ajax-remove_programm.php similarity index 100% rename from www/intern/scripts/logindata/ajax-remove_programm.php rename to html/intern/scripts/logindata/ajax-remove_programm.php diff --git a/www/intern/scripts/logindata/ajax-update-user-information.php b/html/intern/scripts/logindata/ajax-update-user-information.php similarity index 100% rename from www/intern/scripts/logindata/ajax-update-user-information.php rename to html/intern/scripts/logindata/ajax-update-user-information.php diff --git a/www/intern/scripts/logindata/ajax-update_programm_value.php b/html/intern/scripts/logindata/ajax-update_programm_value.php similarity index 100% rename from www/intern/scripts/logindata/ajax-update_programm_value.php rename to html/intern/scripts/logindata/ajax-update_programm_value.php diff --git a/www/intern/scripts/logindata/ajax-vereine-handler.php b/html/intern/scripts/logindata/ajax-vereine-handler.php similarity index 100% rename from www/intern/scripts/logindata/ajax-vereine-handler.php rename to html/intern/scripts/logindata/ajax-vereine-handler.php diff --git a/www/intern/scripts/ranklive/ajax-get-ranklive-config.php b/html/intern/scripts/ranklive/ajax-get-ranklive-config.php similarity index 100% rename from www/intern/scripts/ranklive/ajax-get-ranklive-config.php rename to html/intern/scripts/ranklive/ajax-get-ranklive-config.php diff --git a/www/intern/scripts/ranklive/ajax-save-ranklive-config.php b/html/intern/scripts/ranklive/ajax-save-ranklive-config.php similarity index 100% rename from www/intern/scripts/ranklive/ajax-save-ranklive-config.php rename to html/intern/scripts/ranklive/ajax-save-ranklive-config.php diff --git a/www/intern/scripts/ranklive/export-config-file.php b/html/intern/scripts/ranklive/export-config-file.php similarity index 100% rename from www/intern/scripts/ranklive/export-config-file.php rename to html/intern/scripts/ranklive/export-config-file.php diff --git a/www/intern/scripts/ranklive/upload-config-file.php b/html/intern/scripts/ranklive/upload-config-file.php similarity index 100% rename from www/intern/scripts/ranklive/upload-config-file.php rename to html/intern/scripts/ranklive/upload-config-file.php diff --git a/www/intern/scripts/rechnungen/ajax-neu_protokoll.php b/html/intern/scripts/rechnungen/ajax-neu_protokoll.php similarity index 100% rename from www/intern/scripts/rechnungen/ajax-neu_protokoll.php rename to html/intern/scripts/rechnungen/ajax-neu_protokoll.php diff --git a/www/intern/scripts/rechnungen/ajax_update_order_status.php b/html/intern/scripts/rechnungen/ajax_update_order_status.php similarity index 100% rename from www/intern/scripts/rechnungen/ajax_update_order_status.php rename to html/intern/scripts/rechnungen/ajax_update_order_status.php diff --git a/www/intern/scripts/rechnungen/ajax_update_order_status_by_scor.php b/html/intern/scripts/rechnungen/ajax_update_order_status_by_scor.php similarity index 100% rename from www/intern/scripts/rechnungen/ajax_update_order_status_by_scor.php rename to html/intern/scripts/rechnungen/ajax_update_order_status_by_scor.php diff --git a/www/intern/scripts/riegeneinteilung/ajax-zeiten-management.php b/html/intern/scripts/riegeneinteilung/ajax-zeiten-management.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax-zeiten-management.php rename to html/intern/scripts/riegeneinteilung/ajax-zeiten-management.php diff --git a/www/intern/scripts/riegeneinteilung/ajax_auto_riegeneinteilung.php b/html/intern/scripts/riegeneinteilung/ajax_auto_riegeneinteilung.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax_auto_riegeneinteilung.php rename to html/intern/scripts/riegeneinteilung/ajax_auto_riegeneinteilung.php diff --git a/www/intern/scripts/riegeneinteilung/ajax_change_name_of_specific_abt.php b/html/intern/scripts/riegeneinteilung/ajax_change_name_of_specific_abt.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax_change_name_of_specific_abt.php rename to html/intern/scripts/riegeneinteilung/ajax_change_name_of_specific_abt.php diff --git a/www/intern/scripts/riegeneinteilung/ajax_change_number_of_abt.php b/html/intern/scripts/riegeneinteilung/ajax_change_number_of_abt.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax_change_number_of_abt.php rename to html/intern/scripts/riegeneinteilung/ajax_change_number_of_abt.php diff --git a/www/intern/scripts/riegeneinteilung/ajax_change_order_index_of_specific_abt.php b/html/intern/scripts/riegeneinteilung/ajax_change_order_index_of_specific_abt.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax_change_order_index_of_specific_abt.php rename to html/intern/scripts/riegeneinteilung/ajax_change_order_index_of_specific_abt.php diff --git a/www/intern/scripts/riegeneinteilung/ajax_delete_specific_abt.php b/html/intern/scripts/riegeneinteilung/ajax_delete_specific_abt.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax_delete_specific_abt.php rename to html/intern/scripts/riegeneinteilung/ajax_delete_specific_abt.php diff --git a/www/intern/scripts/riegeneinteilung/ajax_update_turnerin.php b/html/intern/scripts/riegeneinteilung/ajax_update_turnerin.php similarity index 100% rename from www/intern/scripts/riegeneinteilung/ajax_update_turnerin.php rename to html/intern/scripts/riegeneinteilung/ajax_update_turnerin.php diff --git a/www/intern/scripts/trainer/ajax-add-personen-excel.php b/html/intern/scripts/trainer/ajax-add-personen-excel.php similarity index 100% rename from www/intern/scripts/trainer/ajax-add-personen-excel.php rename to html/intern/scripts/trainer/ajax-add-personen-excel.php diff --git a/www/intern/scripts/trainer/ajax-add_entry_fees_to_basket.php b/html/intern/scripts/trainer/ajax-add_entry_fees_to_basket.php similarity index 100% rename from www/intern/scripts/trainer/ajax-add_entry_fees_to_basket.php rename to html/intern/scripts/trainer/ajax-add_entry_fees_to_basket.php diff --git a/www/intern/scripts/trainer/ajax-delete-person.php b/html/intern/scripts/trainer/ajax-delete-person.php similarity index 100% rename from www/intern/scripts/trainer/ajax-delete-person.php rename to html/intern/scripts/trainer/ajax-delete-person.php diff --git a/www/intern/scripts/trainer/ajax-fetch_temp_order.php b/html/intern/scripts/trainer/ajax-fetch_temp_order.php similarity index 100% rename from www/intern/scripts/trainer/ajax-fetch_temp_order.php rename to html/intern/scripts/trainer/ajax-fetch_temp_order.php diff --git a/www/intern/scripts/trainer/ajax-neu-verbuchte-startgebuer.php b/html/intern/scripts/trainer/ajax-neu-verbuchte-startgebuer.php similarity index 100% rename from www/intern/scripts/trainer/ajax-neu-verbuchte-startgebuer.php rename to html/intern/scripts/trainer/ajax-neu-verbuchte-startgebuer.php diff --git a/www/intern/scripts/trainer/ajax-neu_temp_order.php b/html/intern/scripts/trainer/ajax-neu_temp_order.php similarity index 100% rename from www/intern/scripts/trainer/ajax-neu_temp_order.php rename to html/intern/scripts/trainer/ajax-neu_temp_order.php diff --git a/www/intern/scripts/trainer/ajax-remove_basket_item.php b/html/intern/scripts/trainer/ajax-remove_basket_item.php similarity index 100% rename from www/intern/scripts/trainer/ajax-remove_basket_item.php rename to html/intern/scripts/trainer/ajax-remove_basket_item.php diff --git a/www/intern/scripts/trainer/ajax-update-person-kat.php b/html/intern/scripts/trainer/ajax-update-person-kat.php similarity index 100% rename from www/intern/scripts/trainer/ajax-update-person-kat.php rename to html/intern/scripts/trainer/ajax-update-person-kat.php diff --git a/www/intern/scripts/trainer/ajax_link_bodenmusik.php b/html/intern/scripts/trainer/ajax_link_bodenmusik.php similarity index 100% rename from www/intern/scripts/trainer/ajax_link_bodenmusik.php rename to html/intern/scripts/trainer/ajax_link_bodenmusik.php diff --git a/www/intern/scripts/trainer/ajax_unlink_delete_bodenmusik.php b/html/intern/scripts/trainer/ajax_unlink_delete_bodenmusik.php similarity index 100% rename from www/intern/scripts/trainer/ajax_unlink_delete_bodenmusik.php rename to html/intern/scripts/trainer/ajax_unlink_delete_bodenmusik.php diff --git a/www/intern/scripts/wettkaempfe/ajax-add-wettkampf.php b/html/intern/scripts/wettkaempfe/ajax-add-wettkampf.php similarity index 100% rename from www/intern/scripts/wettkaempfe/ajax-add-wettkampf.php rename to html/intern/scripts/wettkaempfe/ajax-add-wettkampf.php diff --git a/www/intern/scripts/wettkaempfe/ajax-delete-wettkampf.php b/html/intern/scripts/wettkaempfe/ajax-delete-wettkampf.php similarity index 100% rename from www/intern/scripts/wettkaempfe/ajax-delete-wettkampf.php rename to html/intern/scripts/wettkaempfe/ajax-delete-wettkampf.php diff --git a/www/intern/scripts/wettkaempfe/ajax-update-aktiv-wettkampf.php b/html/intern/scripts/wettkaempfe/ajax-update-aktiv-wettkampf.php similarity index 100% rename from www/intern/scripts/wettkaempfe/ajax-update-aktiv-wettkampf.php rename to html/intern/scripts/wettkaempfe/ajax-update-aktiv-wettkampf.php diff --git a/www/intern/scripts/wettkaempfe/ajax-update-wettkampf.php b/html/intern/scripts/wettkaempfe/ajax-update-wettkampf.php similarity index 100% rename from www/intern/scripts/wettkaempfe/ajax-update-wettkampf.php rename to html/intern/scripts/wettkaempfe/ajax-update-wettkampf.php diff --git a/www/intern/trainer.php b/html/intern/trainer.php similarity index 99% rename from www/intern/trainer.php rename to html/intern/trainer.php index 5d33c67..c4e7aa4 100644 --- a/www/intern/trainer.php +++ b/html/intern/trainer.php @@ -268,12 +268,6 @@ else: $all_warenkorb_items = db_select($mysqli, $db_tabelle_warenkorb_startgebueren, '`item_id`', '`user_id` = ?', [$iduser]); - if (!$result) { - include $baseDir . "/error-pages/500.html"; - http_response_code(500); - exit; - } - $basket_entries = []; $subtotalprice = 0; $abzuege = 0; diff --git a/www/intern/wk-leitung/.htaccess b/html/intern/wk-leitung/.htaccess similarity index 100% rename from www/intern/wk-leitung/.htaccess rename to html/intern/wk-leitung/.htaccess diff --git a/www/intern/wk-leitung/displaycontrol.php b/html/intern/wk-leitung/displaycontrol.php similarity index 100% rename from www/intern/wk-leitung/displaycontrol.php rename to html/intern/wk-leitung/displaycontrol.php diff --git a/www/intern/wk-leitung/einstellungen.php b/html/intern/wk-leitung/einstellungen.php similarity index 100% rename from www/intern/wk-leitung/einstellungen.php rename to html/intern/wk-leitung/einstellungen.php diff --git a/www/intern/wk-leitung/logindata.php b/html/intern/wk-leitung/logindata.php similarity index 100% rename from www/intern/wk-leitung/logindata.php rename to html/intern/wk-leitung/logindata.php diff --git a/www/intern/wk-leitung/rank-live.php b/html/intern/wk-leitung/rank-live.php similarity index 100% rename from www/intern/wk-leitung/rank-live.php rename to html/intern/wk-leitung/rank-live.php diff --git a/www/intern/wk-leitung/rechnungen-viewer.php b/html/intern/wk-leitung/rechnungen-viewer.php similarity index 100% rename from www/intern/wk-leitung/rechnungen-viewer.php rename to html/intern/wk-leitung/rechnungen-viewer.php diff --git a/www/intern/wk-leitung/rechnungen.php b/html/intern/wk-leitung/rechnungen.php similarity index 100% rename from www/intern/wk-leitung/rechnungen.php rename to html/intern/wk-leitung/rechnungen.php diff --git a/www/intern/wk-leitung/riegeneinteilung.php b/html/intern/wk-leitung/riegeneinteilung.php similarity index 100% rename from www/intern/wk-leitung/riegeneinteilung.php rename to html/intern/wk-leitung/riegeneinteilung.php diff --git a/www/intern/wk-leitung/wettkaempfe.php b/html/intern/wk-leitung/wettkaempfe.php similarity index 100% rename from www/intern/wk-leitung/wettkaempfe.php rename to html/intern/wk-leitung/wettkaempfe.php diff --git a/www/js/header.js b/html/js/header.js similarity index 100% rename from www/js/header.js rename to html/js/header.js diff --git a/www/licence.txt b/html/licence.txt similarity index 100% rename from www/licence.txt rename to html/licence.txt diff --git a/www/riegeneinteilung.php b/html/riegeneinteilung.php similarity index 100% rename from www/riegeneinteilung.php rename to html/riegeneinteilung.php diff --git a/scripts/cache/cache-creators/regenerate-noten-cache.php b/scripts/cache/cache-creators/regenerate-noten-cache.php index ee6f444..177494f 100644 --- a/scripts/cache/cache-creators/regenerate-noten-cache.php +++ b/scripts/cache/cache-creators/regenerate-noten-cache.php @@ -4,7 +4,7 @@ function regenerate_noten_cache($mysqli, $db_tabelle_wertungstypen, $baseDir) { $notenRechnerCache = new NotenRechner(); - $all = db_select($mysqli, $db_tabelle_wertungstypen, "id, default_value, pro_geraet, geraete_json, anzahl_laeufe_json, berechnung, nullstellen, zeige_in_rank_live, display_string"); + $all = db_select($mysqli, $db_tabelle_wertungstypen, "id, default_value, pro_geraet, geraete_json, anzahl_laeufe_json, berechnung, nullstellen, display_string"); $ascArrayDefaultValues = array_column($all, 'default_value', 'id'); $ascArrayProGeraet = array_column($all, 'pro_geraet', 'id'); diff --git a/scripts/cache/display-dependencies.php b/scripts/cache/display-dependencies.php index 0d06d72..6cf866c 100644 --- a/scripts/cache/display-dependencies.php +++ b/scripts/cache/display-dependencies.php @@ -1,661 +1,3 @@ - array ( - 1 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 1, - 2 => 1, - 3 => 70, - 4 => 1, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 1, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 60, - ), - '70|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 1, - 2 => 2, - 3 => 70, - 4 => 1, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 1, - 11 => 2, - ), - 'intersect_noten' => - array ( - '60|1|2' => - array ( - 'r' => 2, - 'g_id' => 1, - 'n_id' => 60, - ), - '70|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|1|2' => - array ( - 'r' => 2, - 'g_id' => 1, - 'n_id' => 40, - ), - ), - ), - ), - 2 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 2, - 2 => 1, - 3 => 70, - 4 => 2, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 2, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 60, - ), - '70|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 70, - 1 => 2, - 2 => 1, - 3 => 80, - 4 => 0, - 5 => 1, - ), - 'intersect_noten' => - array ( - '70|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - ), - ), - ), - 3 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 3, - 2 => 1, - 3 => 70, - 4 => 3, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 3, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 60, - ), - '70|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 70, - 1 => 3, - 2 => 1, - 3 => 80, - 4 => 0, - 5 => 1, - ), - 'intersect_noten' => - array ( - '70|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - ), - ), - ), - 4 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 4, - 2 => 1, - 3 => 70, - 4 => 4, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 4, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 60, - ), - '70|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 70, - 1 => 4, - 2 => 1, - 3 => 80, - 4 => 0, - 5 => 1, - ), - 'intersect_noten' => - array ( - '70|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - ), - ), - ), - ), - 13 => - array ( - 1 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 1, - 2 => 1, - 3 => 70, - 4 => 1, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 1, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 60, - ), - '70|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 1, - 2 => 2, - 3 => 70, - 4 => 1, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 1, - 11 => 2, - ), - 'intersect_noten' => - array ( - '60|1|2' => - array ( - 'r' => 2, - 'g_id' => 1, - 'n_id' => 60, - ), - '70|1|1' => - array ( - 'r' => 1, - 'g_id' => 1, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|1|2' => - array ( - 'r' => 2, - 'g_id' => 1, - 'n_id' => 40, - ), - ), - ), - ), - 2 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 2, - 2 => 1, - 3 => 70, - 4 => 2, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 2, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 60, - ), - '70|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 70, - 1 => 2, - 2 => 1, - 3 => 80, - 4 => 0, - 5 => 1, - ), - 'intersect_noten' => - array ( - '70|2|1' => - array ( - 'r' => 1, - 'g_id' => 2, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - ), - ), - ), - 3 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 3, - 2 => 1, - 3 => 70, - 4 => 3, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 3, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 60, - ), - '70|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 70, - 1 => 3, - 2 => 1, - 3 => 80, - 4 => 0, - 5 => 1, - ), - 'intersect_noten' => - array ( - '70|3|1' => - array ( - 'r' => 1, - 'g_id' => 3, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - ), - ), - ), - 4 => - array ( - 1 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 60, - 1 => 4, - 2 => 1, - 3 => 70, - 4 => 4, - 5 => 1, - 6 => 80, - 7 => 0, - 8 => 1, - 9 => 40, - 10 => 4, - 11 => 1, - ), - 'intersect_noten' => - array ( - '60|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 60, - ), - '70|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - '40|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 40, - ), - ), - ), - 2 => - array ( - 'SQL' => '(`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?) OR (`note_bezeichnung_id` = ? AND `geraet_id` = ? AND `run_number` = ?)', - 'values' => - array ( - 0 => 70, - 1 => 4, - 2 => 1, - 3 => 80, - 4 => 0, - 5 => 1, - ), - 'intersect_noten' => - array ( - '70|4|1' => - array ( - 'r' => 1, - 'g_id' => 4, - 'n_id' => 70, - ), - '80|0|1' => - array ( - 'r' => 1, - 'g_id' => 0, - 'n_id' => 80, - ), - ), - ), - ), - ), ); \ No newline at end of file diff --git a/scripts/cache/noten-config-display-cache.php b/scripts/cache/noten-config-display-cache.php index 79490b5..b16230e 100644 --- a/scripts/cache/noten-config-display-cache.php +++ b/scripts/cache/noten-config-display-cache.php @@ -119,16 +119,6 @@ return [ 60 => 2, 70 => 2, 80 => 2, -), - 'zeige_in_rank_live' => array ( - 10 => 1, - 11 => 1, - 20 => 1, - 40 => 1, - 50 => 1, - 60 => 1, - 70 => 1, - 80 => 1, ), 'display_string' => array ( 10 => '${note}', diff --git a/scripts/db/db-tables.php b/scripts/db/db-tables.php index 6798621..0940bfc 100644 --- a/scripts/db/db-tables.php +++ b/scripts/db/db-tables.php @@ -29,10 +29,6 @@ try { ]); } - -$prefix = $_ENV['DB_PREFIX'] ?? ''; - - $tableDefinitions = [ 'teilnehmende' => 'DB_TABLE_TEILNEHMENDE', 'verbuchte_startgebueren' => 'DB_TABLE_VERBUCHTE_STARTGEBUEREN', @@ -62,9 +58,7 @@ foreach ($tableDefinitions as $baseName => $envVarKey) { $rawTableName = $_ENV[$envVarKey] ?? ''; - $fullTableName = $prefix . $rawTableName; - $variableName = 'db_tabelle_' . $baseName; - $$variableName = $fullTableName; + $$variableName = $rawTableName; } \ No newline at end of file diff --git a/scripts/rate-limiter/rate-limiter.php b/scripts/rate-limiter/rate-limiter.php index 65fc9bb..f6714d4 100644 --- a/scripts/rate-limiter/rate-limiter.php +++ b/scripts/rate-limiter/rate-limiter.php @@ -33,9 +33,9 @@ try { // Create a Redis connection $redis = new PredisClient([ 'scheme' => 'tcp', - 'host' => $_ENV['REDDIS_HOST'], - 'port' => $_ENV['REDDIS_PORT'], - 'password' => $_ENV['REDDIS_PASSWORD'] + 'host' => $_ENV['REDIS_HOST'], + 'port' => $_ENV['REDIS_PORT'], + 'password' => $_ENV['REDIS_PASSWORD'] ]); /** diff --git a/scripts/redis/connect-to-redis.php b/scripts/redis/connect-to-redis.php index 4959cc0..3e98d1f 100644 --- a/scripts/redis/connect-to-redis.php +++ b/scripts/redis/connect-to-redis.php @@ -38,11 +38,11 @@ function connectToRedis(): bool $redis = new Redis(); - if (!$redis->connect($_ENV['REDDIS_HOST'], $_ENV['REDDIS_PORT'])) { + if (!$redis->connect($_ENV['REDIS_HOST'], $_ENV['REDIS_PORT'])) { return false; } - if (!$redis->auth($_ENV['REDDIS_PASSWORD'])) { + if (!$redis->auth($_ENV['REDIS_PASSWORD'])) { return false; } return true; diff --git a/scripts/session_functions.php b/scripts/session_functions.php index 8c358d5..b184d0c 100644 --- a/scripts/session_functions.php +++ b/scripts/session_functions.php @@ -77,7 +77,7 @@ function check_user_permission(string $type, bool $return = false, bool $display } else { if ($display) { http_response_code(403); - include __DIR__ . "/../www/error-pages/403.html"; + include __DIR__ . "/../html/error-pages/403.html"; exit; } else { http_response_code(403); @@ -98,7 +98,7 @@ function check_user_permission(string $type, bool $return = false, bool $display } else { if ($display) { http_response_code(403); - include __DIR__ . "/../www/error-pages/403.html"; + include __DIR__ . "/../html/error-pages/403.html"; exit; } else { http_response_code(403); diff --git a/setup/.DS_Store b/setup/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d625f4218d4b4326c85377b8eb06804066d74b3a GIT binary patch literal 6148 zcmeHKISv9b477n_C7LZM^96noA$S2F;8;2&3ZUPLckwjFM*&*sph08FnZ)rV$`tFh zi0Ia;(5S$#6?g!7oE2XH literal 0 HcmV?d00001 diff --git a/setup/database/generate-sql.php b/setup/database/generate-sql.php deleted file mode 100644 index ebd2276..0000000 --- a/setup/database/generate-sql.php +++ /dev/null @@ -1,74 +0,0 @@ - WK-Leitungs Benutzer hinzugefügt. Benutzername: admin Passwort: $randPw\n-\n-\n"; - -// 4. .env-Datei verarbeiten -echo "Aktualisiere .env-Datei...\n"; -$envContent = file_get_contents($envFile); - -// Wir ersetzen die Zeile DB_PREFIX=... durch DB_PREFIX=... -// Regex sucht nach "DB_PREFIX=" gefolgt von beliebigen Zeichen bis Zeilenende -$pattern = '/^DB_PREFIX=.*/m'; -$replacement = "DB_PREFIX=$newPrefix"; - -$updatedEnv = preg_replace($pattern, $replacement, $envContent); - -if ($updatedEnv === $envContent) { - // Falls die Zeile nicht gefunden wurde, hängen wir sie an - $updatedEnv .= "\nDB_PREFIX=$newPrefix"; - echo "⚠️ Hinweis: DB_PREFIX war nicht in der .env, wurde angehängt.\n"; -} - -file_put_contents($envFile, $updatedEnv); -echo "✓ .env-Datei aktualisiert.\n"; - -// 5. Abschluss -echo "\n Prozess erfolgreich abgeschlossen!\n"; -echo "Bitte prüfen Sie Ihre Dateien und setzen Sie den neuen Prefix in Ihrer Konfiguration. Dateiname: $newSqlFile\n"; \ No newline at end of file diff --git a/setup/database/generate-users.php b/setup/database/generate-users.php deleted file mode 100644 index f00ef09..0000000 --- a/setup/database/generate-users.php +++ /dev/null @@ -1,203 +0,0 @@ - $val) { - $content .= "{$key}={$val}\n"; - } - return file_put_contents($filepath, $content) !== false; -} - -// Main logic wrapped in a reusable function -function sync_and_create_db_users( - ?string $overrideUser = null, - ?string $overrideUserPass = null, - ?string $overrideGuest = null, - ?string $overrideGuestPass = null -): array { - $baseDir = dirname(__DIR__, 2); - $configDir = $baseDir . '/config'; - - $dbEnvFile = $configDir . '/.env.db'; - $userEnvFile = $configDir . '/.env.db-wkvs-user'; - $guestEnvFile = $configDir . '/.env.db-guest'; - - // 1. Load Root DB config - $dbEnv = parse_env_file_simple($dbEnvFile); - $rootPass = $dbEnv['MYSQL_ROOT_PASSWORD'] ?? ''; - $dbName = $dbEnv['MYSQL_DATABASE'] ?? 'devdb_'; - - // Target host for MySQL connection from PHP script - // If running inside Docker container or host, determine host - $dbHost = getenv('DB_HOST') ?: ($dbEnv['DB_HOST'] ?? 'mariadb'); - $dbPort = (int)($dbEnv['DB_PORT'] ?? 3306); - - // Fallback connection attempt hosts - $hostsToTry = [$dbHost, '127.0.0.1', 'mariadb', 'localhost']; - - $mysqli = null; - $connectedHost = null; - - foreach ($hostsToTry as $tryHost) { - try { - $testConn = @new mysqli($tryHost, 'root', $rootPass, '', $dbPort); - if (!$testConn->connect_error) { - $mysqli = $testConn; - $connectedHost = $tryHost; - break; - } - } catch (Throwable $e) { - continue; - } - } - - if (!$mysqli) { - return [ - 'success' => false, - 'message' => "Konnte keine Verbindung als 'root' zu MariaDB herstellen. Bitte prüfen Sie MYSQL_ROOT_PASSWORD in config/.env.db." - ]; - } - - // 2. Load existing user env files or generate defaults - $userEnv = parse_env_file_simple($userEnvFile); - $guestEnv = parse_env_file_simple($guestEnvFile); - - // Prefix helper for usernames if creating new - $dbUser = $overrideUser ?: ($userEnv['DB_USER'] ?? 'wkvs_user'); - $dbPass = $overrideUserPass ?: ($userEnv['DB_PASSWORD'] ?? bin2hex(random_bytes(16))); - - $dbGuestUser = $overrideGuest ?: ($guestEnv['DB_GUEST_USER'] ?? 'wkvs_guest'); - $dbGuestPass = $overrideGuestPass?: ($guestEnv['DB_GUEST_PASSWORD'] ?? bin2hex(random_bytes(16))); - - $appDbHost = $userEnv['DB_HOST'] ?? 'mariadb'; - $appDbPort = $userEnv['DB_PORT'] ?? 3306; - - // 3. Create database if it does not exist - $mysqli->query("CREATE DATABASE IF NOT EXISTS `$dbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"); - - // 4. Create or Update Normal User (SELECT, INSERT, UPDATE, DELETE) - // Access is isolated to the Docker network container level via compose.yaml - $escapedUser = $mysqli->real_escape_string($dbUser); - $escapedPass = $mysqli->real_escape_string($dbPass); - $escapedDb = $mysqli->real_escape_string($dbName); - - // Clean up legacy per-host entries if present - $mysqli->query("DROP USER IF EXISTS '{$escapedUser}'@'%'"); - - - // Normal User (1 user entry) - $mysqli->query("CREATE USER IF NOT EXISTS '{$escapedUser}'@'%' IDENTIFIED BY '{$escapedPass}'"); - $mysqli->query("ALTER USER '{$escapedUser}'@'%' IDENTIFIED BY '{$escapedPass}'"); - $mysqli->query("GRANT SELECT, INSERT, UPDATE, DELETE ON `{$escapedDb}`.* TO '{$escapedUser}'@'%'"); - - // Guest User (SELECT only) - $escapedGuest = $mysqli->real_escape_string($dbGuestUser); - $escapedGuestPass = $mysqli->real_escape_string($dbGuestPass); - - // Clean up legacy per-host entries if present - foreach (['127.0.0.1', 'localhost', '172.%.%.%', '10.%.%.%', '192.168.%.%.%'] as $oldHost) { - $mysqli->query("DROP USER IF EXISTS '{$escapedGuest}'@'{$oldHost}'"); - } - - // Guest User (1 user entry) - $mysqli->query("CREATE USER IF NOT EXISTS '{$escapedGuest}'@'%' IDENTIFIED BY '{$escapedGuestPass}'"); - $mysqli->query("ALTER USER '{$escapedGuest}'@'%' IDENTIFIED BY '{$escapedGuestPass}'"); - $mysqli->query("GRANT SELECT ON `{$escapedDb}`.* TO '{$escapedGuest}'@'%'"); - - $mysqli->query("FLUSH PRIVILEGES"); - $mysqli->close(); - - // 5. Update .env files - $newUserEnvData = [ - 'DB_USER' => $dbUser, - 'DB_PASSWORD' => $dbPass, - 'DB_NAME' => $dbName, - 'DB_HOST' => $appDbHost, - 'DB_PORT' => $appDbPort, - ]; - - $newGuestEnvData = [ - 'DB_GUEST_USER' => $dbGuestUser, - 'DB_GUEST_PASSWORD' => $dbGuestPass, - 'DB_NAME' => $dbName, - 'DB_HOST' => $appDbHost, - 'DB_PORT' => $appDbPort, - ]; - - write_env_file_simple($userEnvFile, $newUserEnvData); - write_env_file_simple($guestEnvFile, $newGuestEnvData); - - return [ - 'success' => true, - 'message' => 'Datenbank-Benutzer erfolgreich erstellt/aktualisiert.', - 'normal_user' => [ - 'username' => $dbUser, - 'password' => $dbPass, - ], - 'guest_user' => [ - 'username' => $dbGuestUser, - 'password' => $dbGuestPass, - ] - ]; -} - -// If invoked directly from CLI -if (php_sapi_name() === 'cli' && realpath($argv[0] ?? '') === __FILE__) { - echo "=== WKVS Database User Auto-Generator ===\n"; - - $user = $argv[1] ?? null; - $userPass = $argv[2] ?? null; - $guest = $argv[3] ?? null; - $guestPass = $argv[4] ?? null; - - $result = sync_and_create_db_users($user, $userPass, $guest, $guestPass); - - if ($result['success']) { - echo "✓ " . $result['message'] . "\n\n"; - echo "Normal User (SELECT, INSERT, UPDATE, DELETE):\n"; - echo " Benutzername: " . $result['normal_user']['username'] . "\n"; - echo " Passwort: " . $result['normal_user']['password'] . "\n\n"; - echo "Guest User (SELECT only):\n"; - echo " Benutzername: " . $result['guest_user']['username'] . "\n"; - echo " Passwort: " . $result['guest_user']['password'] . "\n"; - } else { - echo "❌ Fehler: " . $result['message'] . "\n"; - exit(1); - } -} diff --git a/setup/database/init-db.php b/setup/database/init-db.php deleted file mode 100644 index 5dcbc2f..0000000 --- a/setup/database/init-db.php +++ /dev/null @@ -1,91 +0,0 @@ -connect_error) { - $mysqli = $conn; - break; - } - } catch (Throwable $e) { - continue; - } -} - -if (!$mysqli) { - echo "❌ Fehler: Konnte keine Verbindung als 'root' zu MariaDB herstellen.\n"; - exit(1); -} - -$sqlContent = file_get_contents($generatedSqlFile); - -if ($mysqli->multi_query($sqlContent)) { - do { - if ($res = $mysqli->store_result()) { - $res->free(); - } - } while ($mysqli->more_results() && $mysqli->next_result()); - - if ($mysqli->errno) { - echo "❌ SQL Import-Fehler: " . $mysqli->error . "\n"; - exit(1); - } - echo "✓ Datenbank-Struktur erfolgreich importiert!\n\n"; -} else { - echo "❌ SQL Import-Fehler: " . $mysqli->error . "\n"; - exit(1); -} - -$mysqli->close(); - -echo "========================================\n"; -echo "✅ Datenbank-Initialisierung abgeschlossen!\n"; -echo "========================================\n"; diff --git a/setup/database/wkvs-database-template.sql b/setup/database/wkvs-database-template.sql deleted file mode 100644 index a8085f4..0000000 --- a/setup/database/wkvs-database-template.sql +++ /dev/null @@ -1,588 +0,0 @@ - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_audiofiles` --- - -CREATE TABLE `prefix-placeholder_audiofiles` ( - `id` int(11) NOT NULL, - `file_name` varchar(1024) NOT NULL, - `file_path` varchar(1024) NOT NULL, - `edited_by` int(11) DEFAULT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_disziplinen` --- - -CREATE TABLE `prefix-placeholder_disziplinen` ( - `id` int(11) NOT NULL, - `name` varchar(1024) DEFAULT NULL, - `start_index` int(11) DEFAULT NULL, - `color_kampfrichter` char(7) NOT NULL DEFAULT '#424242', - `audiofile` tinyint(1) DEFAULT NULL, - `audiofile_max_duration` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_einmal_links` --- - -CREATE TABLE `prefix-placeholder_einmal_links` ( - `id` int(11) NOT NULL, - `url` varchar(1000) DEFAULT NULL, - `user_id` int(11) NOT NULL DEFAULT 0, - `type` enum('login','pwreset','create_profile','') NOT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), - `expires_at` timestamp NULL DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- --- Trigger `prefix-placeholder_einmal_links` --- - -CREATE TRIGGER `before_insert_login_tokens` -BEFORE INSERT ON `prefix-placeholder_einmal_links` -FOR EACH ROW -BEGIN - IF NEW.url IS NULL THEN - SET NEW.url = HEX(RANDOM_BYTES(32)); - END IF; -END; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_gruppen` --- - -CREATE TABLE `prefix-placeholder_gruppen` ( - `id` int(11) NOT NULL, - `name` varchar(100) NOT NULL DEFAULT 'KEIN NAME', - `order_index` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_gruppen_zeiten` --- - -CREATE TABLE `prefix-placeholder_gruppen_zeiten` ( - `zeitplan_id` int(11) NOT NULL, - `start_time` time NOT NULL, - `end_time` time DEFAULT NULL, - `abt_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_intern_benutzende` --- - -CREATE TABLE `prefix-placeholder_intern_benutzende` ( - `id` bigint(20) UNSIGNED NOT NULL, - `username` varchar(191) DEFAULT NULL, - `name_person` varchar(255) DEFAULT NULL, - `password_hash` varchar(255) DEFAULT NULL, - `password_cipher` text DEFAULT NULL, - `created_at` datetime NOT NULL DEFAULT current_timestamp(), - `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `edited_by` varchar(20) NOT NULL DEFAULT '0', - `freigabe` varchar(500) NOT NULL DEFAULT 'keine', - `login_active` tinyint(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -INSERT INTO `prefix-placeholder_intern_benutzende` (`id`, `username`, `password_hash`, `password_cipher`, `freigabe`, `login_active`) -VALUES ('1', 'admin', 'PW_HASH', 'not_set', '{"types":["wk_leitung","trainer","kampfrichter"],"freigabenTrainer":["admin"],"freigabenKampfrichter":["A"]}', '1'); - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_kategorien` --- - -CREATE TABLE `prefix-placeholder_kategorien` ( - `id` int(11) NOT NULL, - `programm` text NOT NULL, - `order_index` int(11) DEFAULT NULL, - `preis` decimal(10,2) DEFAULT 0.00, - `aktiv` tinyint(1) NOT NULL DEFAULT 0 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_tabellen_konfiguration` --- - -CREATE TABLE `prefix-placeholder_tabellen_konfiguration` ( - `id` int(11) NOT NULL, - `type_slug` varchar(128) NOT NULL, - `json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`json`)), - `all_noten_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`all_noten_json`)), - `created_at` timestamp NOT NULL DEFAULT current_timestamp(), - `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `created_by` int(11) DEFAULT NULL, - `updated_by` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_teilnehmende` --- - -CREATE TABLE `prefix-placeholder_teilnehmende` ( - `id` int(11) NOT NULL, - `wk_id` int(11) DEFAULT NULL, - `name` text NOT NULL, - `vorname` text NOT NULL, - `geburtsdatum` date NOT NULL, - `programm` text NOT NULL, - `verein` text NOT NULL, - `bezahlt` int(11) NOT NULL DEFAULT 1, - `bezahltoverride` int(11) NOT NULL DEFAULT 0, - `betrag_bezahlt` decimal(12,2) NOT NULL DEFAULT 0.00 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_teilnehmende_audiofiles` --- - -CREATE TABLE `prefix-placeholder_teilnehmende_audiofiles` ( - `person_id` int(7) NOT NULL, - `geraet_id` int(7) NOT NULL, - `audiofile_id` int(7) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_teilnehmende_gruppen` --- - -CREATE TABLE `prefix-placeholder_teilnehmende_gruppen` ( - `id` int(11) NOT NULL, - `turnerin_id` int(11) NOT NULL, - `abteilung_id` int(11) NOT NULL, - `geraet_id` int(11) NOT NULL, - `turnerin_index` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_variables` --- - -CREATE TABLE `prefix-placeholder_variables` ( - `name` varchar(255) NOT NULL DEFAULT 'NaN', - `value` varchar(255) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_verbuchte_startgebueren` --- - -CREATE TABLE `prefix-placeholder_verbuchte_startgebueren` ( - `order_id` int(11) NOT NULL, - `order_type` varchar(100) DEFAULT NULL, - `preis` float DEFAULT NULL, - `user_id` int(11) NOT NULL, - `item_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`item_ids`)), - `used_verein_konten` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, - `order_status` int(11) NOT NULL DEFAULT 0, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), - `edited_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_verbuchte_startgebueren_log` --- - -CREATE TABLE `prefix-placeholder_verbuchte_startgebueren_log` ( - `id` int(11) NOT NULL, - `order_id` int(11) NOT NULL, - `old_order_status` int(11) NOT NULL, - `new_order_status` int(11) NOT NULL, - `edited_by` int(11) NOT NULL, - `edited_at` timestamp NOT NULL DEFAULT current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_vereine` --- - -CREATE TABLE `prefix-placeholder_vereine` ( - `id` int(11) NOT NULL, - `verein` text NOT NULL, - `email` varchar(100) NOT NULL DEFAULT 'forms@testseite-fh.ch', - `konto` decimal(12,2) NOT NULL DEFAULT 0.00 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_warenkorb_startgebueren` --- - -CREATE TABLE `prefix-placeholder_warenkorb_startgebueren` ( - `id` int(11) NOT NULL, - `user_id` bigint(20) UNSIGNED NOT NULL, - `item_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_wertungen` --- - -CREATE TABLE `prefix-placeholder_wertungen` ( - `person_id` int(11) NOT NULL, - `note_bezeichnung_id` int(11) NOT NULL, - `geraet_id` int(11) NOT NULL, - `wk_id` int(11) NOT NULL, - `run_number` tinyint(3) NOT NULL DEFAULT 1, - `value` float DEFAULT NULL, - `is_public` tinyint(1) DEFAULT NULL, - `public_value` float DEFAULT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_wertungen_log` --- - -CREATE TABLE `prefix-placeholder_wertungen_log` ( - `id` int(11) NOT NULL, - `person_id` int(11) NOT NULL, - `note_bezeichnung_id` int(11) NOT NULL, - `geraet_id` int(11) NOT NULL, - `wk_id` int(11) NOT NULL, - `run_number` tinyint(3) NOT NULL DEFAULT 1, - `old_value` float DEFAULT NULL, - `new_value` float DEFAULT NULL, - `edited_by` int(11) NOT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp() -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_wertungstypen` --- - -CREATE TABLE `prefix-placeholder_wertungstypen` ( - `id` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `default_value` float DEFAULT NULL, - `type` enum('input','berechnung') NOT NULL DEFAULT 'input', - `berechnung` varchar(255) DEFAULT NULL, - `berechnung_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`berechnung_json`)), - `max_value` float DEFAULT NULL, - `min_value` float DEFAULT NULL, - `pro_geraet` tinyint(1) NOT NULL DEFAULT 1, - `anzahl_laeufe_json` text DEFAULT NULL, - `geraete_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '[]', - `zeige_auf_rangliste` float DEFAULT NULL, - `groesse_auf_rangliste` int(11) NOT NULL DEFAULT 0, - `nullstellen` int(11) NOT NULL DEFAULT 2, - `display_string` varchar(63) NOT NULL DEFAULT '${note}' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_wettkaempfe` --- - -CREATE TABLE `prefix-placeholder_wettkaempfe` ( - `id` int(11) NOT NULL, - `name` varchar(256) NOT NULL, - `slug` varchar(64) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - - --- -------------------------------------------------------- - --- --- Tabellenstruktur für Tabelle `prefix-placeholder_zeitplan_types` --- - -CREATE TABLE `prefix-placeholder_zeitplan_types` ( - `id` int(11) NOT NULL, - `name` varchar(2048) NOT NULL, - `has_endtime` tinyint(1) DEFAULT NULL, - `display_index` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; - - --- --- Indizes der exportierten Tabellen --- - --- --- Indizes für die Tabelle `prefix-placeholder_audiofiles` --- -ALTER TABLE `prefix-placeholder_audiofiles` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `prefix-placeholder_disziplinen` --- -ALTER TABLE `prefix-placeholder_disziplinen` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `prefix-placeholder_einmal_links` --- -ALTER TABLE `prefix-placeholder_einmal_links` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `url` (`url`); - --- --- Indizes für die Tabelle `prefix-placeholder_gruppen` --- -ALTER TABLE `prefix-placeholder_gruppen` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `prefix-placeholder_gruppen_zeiten` --- -ALTER TABLE `prefix-placeholder_gruppen_zeiten` - ADD UNIQUE KEY `unique_index` (`zeitplan_id`,`abt_id`); - --- --- Indizes für die Tabelle `prefix-placeholder_intern_benutzende` --- -ALTER TABLE `prefix-placeholder_intern_benutzende` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `username_page_unique` (`username`,`password_hash`) USING BTREE, - ADD KEY `indexFreigabe` (`freigabe`); - --- --- Indizes für die Tabelle `prefix-placeholder_kategorien` --- -ALTER TABLE `prefix-placeholder_kategorien` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `prefix-placeholder_tabellen_konfiguration` --- -ALTER TABLE `prefix-placeholder_tabellen_konfiguration` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `unique_slug` (`type_slug`); - --- --- Indizes für die Tabelle `prefix-placeholder_teilnehmende` --- -ALTER TABLE `prefix-placeholder_teilnehmende` - ADD PRIMARY KEY (`id`), - ADD KEY `wk_index` (`wk_id`); - --- --- Indizes für die Tabelle `prefix-placeholder_teilnehmende_audiofiles` --- -ALTER TABLE `prefix-placeholder_teilnehmende_audiofiles` - ADD UNIQUE KEY `unique_combo` (`person_id`,`geraet_id`); - --- --- Indizes für die Tabelle `prefix-placeholder_teilnehmende_gruppen` --- -ALTER TABLE `prefix-placeholder_teilnehmende_gruppen` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `unique_turnerin` (`turnerin_id`); - --- --- Indizes für die Tabelle `prefix-placeholder_variables` --- -ALTER TABLE `prefix-placeholder_variables` - ADD UNIQUE KEY `uniqueIndex` (`name`); - --- --- Indizes für die Tabelle `prefix-placeholder_verbuchte_startgebueren` --- -ALTER TABLE `prefix-placeholder_verbuchte_startgebueren` - ADD PRIMARY KEY (`order_id`); - --- --- Indizes für die Tabelle `prefix-placeholder_verbuchte_startgebueren_log` --- -ALTER TABLE `prefix-placeholder_verbuchte_startgebueren_log` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `prefix-placeholder_vereine` --- -ALTER TABLE `prefix-placeholder_vereine` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `indexturnerinnen` (`id`,`verein`(31)); - --- --- Indizes für die Tabelle `prefix-placeholder_warenkorb_startgebueren` --- -ALTER TABLE `prefix-placeholder_warenkorb_startgebueren` - ADD PRIMARY KEY (`id`), - ADD KEY `prefix-placeholder_basket_items_ibfk_1` (`user_id`), - ADD KEY `prefix-placeholder_basket_items_ibfk_2` (`item_id`); - --- --- Indizes für die Tabelle `prefix-placeholder_wertungen` --- -ALTER TABLE `prefix-placeholder_wertungen` - ADD UNIQUE KEY `uniquePersonNoteJahrGereat` (`person_id`,`note_bezeichnung_id`,`wk_id`,`geraet_id`,`run_number`) USING BTREE; - --- --- Indizes für die Tabelle `prefix-placeholder_wertungen_log` --- -ALTER TABLE `prefix-placeholder_wertungen_log` - ADD PRIMARY KEY (`id`); - --- --- Indizes für die Tabelle `prefix-placeholder_wertungstypen` --- -ALTER TABLE `prefix-placeholder_wertungstypen` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `uniqueName` (`name`) USING BTREE, - ADD KEY `indexMaxValue` (`max_value`), - ADD KEY `indexMinValue` (`min_value`), - ADD KEY `indexBerechnungJson` (`berechnung_json`(768)), - ADD KEY `indexDefaultValue` (`default_value`), - ADD KEY `indexType` (`type`), - ADD KEY `indexNullstellen` (`nullstellen`) USING BTREE; - --- --- Indizes für die Tabelle `prefix-placeholder_wettkaempfe` --- -ALTER TABLE `prefix-placeholder_wettkaempfe` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `slug` (`slug`); - --- --- Indizes für die Tabelle `prefix-placeholder_zeitplan_types` --- -ALTER TABLE `prefix-placeholder_zeitplan_types` - ADD PRIMARY KEY (`id`); - --- --- AUTO_INCREMENT für exportierte Tabellen --- - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_audiofiles` --- -ALTER TABLE `prefix-placeholder_audiofiles` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_disziplinen` --- -ALTER TABLE `prefix-placeholder_disziplinen` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_einmal_links` --- -ALTER TABLE `prefix-placeholder_einmal_links` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=118; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_gruppen` --- -ALTER TABLE `prefix-placeholder_gruppen` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=165; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_intern_benutzende` --- -ALTER TABLE `prefix-placeholder_intern_benutzende` - MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_kategorien` --- -ALTER TABLE `prefix-placeholder_kategorien` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_tabellen_konfiguration` --- -ALTER TABLE `prefix-placeholder_tabellen_konfiguration` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=106; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_teilnehmende` --- -ALTER TABLE `prefix-placeholder_teilnehmende` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=295; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_teilnehmende_gruppen` --- -ALTER TABLE `prefix-placeholder_teilnehmende_gruppen` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1030; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_verbuchte_startgebueren_log` --- -ALTER TABLE `prefix-placeholder_verbuchte_startgebueren_log` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=86; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_vereine` --- -ALTER TABLE `prefix-placeholder_vereine` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_warenkorb_startgebueren` --- -ALTER TABLE `prefix-placeholder_warenkorb_startgebueren` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1241; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_wertungen_log` --- -ALTER TABLE `prefix-placeholder_wertungen_log` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=883; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_wettkaempfe` --- -ALTER TABLE `prefix-placeholder_wettkaempfe` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; - --- --- AUTO_INCREMENT für Tabelle `prefix-placeholder_zeitplan_types` --- -ALTER TABLE `prefix-placeholder_zeitplan_types` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/setup/init-env.php b/setup/init-env.php deleted file mode 100644 index d729654..0000000 --- a/setup/init-env.php +++ /dev/null @@ -1,89 +0,0 @@ - [ - 'example' => 'env.redis.example', - 'replacements' => [ - '/REDDIS_HOST=127\.0\.0\.1/' => 'REDDIS_HOST=redis', - '/REDDIS_HOST=localhost/' => 'REDDIS_HOST=redis', - '/REDDIS_HOST=YOUR_REDDIS_IP.*/' => 'REDDIS_HOST=redis', - '/REDDIS_PORT=YOUR_REDDIS_PORT.*/' => 'REDDIS_PORT=6379', - '/YOUR_REDDIS_PASSWORD/' => '"' . base64_encode(random_bytes(64)) . '"', - ] - ], - 'env.db' => [ - 'example' => 'env.db.example', - 'replacements' => [ - '/MYSQL_HOST=localhost/' => 'MYSQL_HOST=mariadb', - '/MYSQL_HOST=127\.0\.0\.1/' => 'MYSQL_HOST=mariadb', - '/YOUR_PASSWORD_FOR_ROOT/' => '"' . base64_encode(random_bytes(64)) . '"', - '/YOUR_DATABASE_NAME/' => 'devdb_', - ] - ], - 'env.db-tables' => [ - 'example' => 'env.db-tables.example', - 'replacements' => [ - '/DB_PREFIX=PREFIX/' => 'DB_PREFIX=wkvs_', - ] - ], - 'env.pw-encryption-key' => [ - 'example' => 'env.pw-encryption-key.example', - 'replacements' => [ - '/YOUR_CUSTOM_PASSWORD_ENCRYPTION_KEY/' => '"' . base64_encode(random_bytes(64)) . '"', - ] - ], - 'env.wk-id' => [ - 'example' => 'env.wk-id.example', - 'replacements' => [] - ], - 'env.db-wkvs-user' => [ - 'example' => 'env.db-wkvs-user.example', - 'replacements' => [ - '/DB_HOST=localhost/' => 'DB_HOST=mariadb', - '/DB_HOST=127\.0\.0\.1/' => 'DB_HOST=mariadb', - '/DATABASE_NAME/' => 'devdb_', - ] - ], - 'env.db-guest' => [ - 'example' => 'env.db-guest.example', - 'replacements' => [ - '/DB_HOST=localhost/' => 'DB_HOST=mariadb', - '/DB_HOST=127\.0\.0\.1/' => 'DB_HOST=mariadb', - '/DATABASE_NAME/' => 'devdb_', - ] - ], -]; - -echo "========================================\n"; -echo " WKVS Environment Initializer \n"; -echo "========================================\n\n"; - -foreach ($envMappings as $targetName => $config) { - $targetPath = $configDir . '/.' . $targetName; - $examplePath = $configDir . '/.' . $config['example']; - - if (!file_exists($targetPath)) { - if (file_exists($examplePath)) { - echo "Creating missing ." . $targetName . " from ." . $config['example'] . "...\n"; - $content = file_get_contents($examplePath); - foreach ($config['replacements'] as $pattern => $replacement) { - $content = preg_replace($pattern, $replacement, $content); - } - file_put_contents($targetPath, $content); - } else { - echo "⚠️ Warning: Example file ." . $config['example'] . " not found.\n"; - } - } else { - echo "Skipping ." . $targetName . " (file already exists).\n"; - } -} - -echo "✓ Environment initialization complete.\n\n"; diff --git a/websocket/index.js b/websocket/index.js index c1ebcf8..a023e3a 100644 --- a/websocket/index.js +++ b/websocket/index.js @@ -9,10 +9,10 @@ const envPath = path.resolve(__dirname, '..', 'config', '.env.redis'); dotenv.config({ path: envPath }); const redisClient = createClient({ - password: process.env.REDDIS_PASSWORD, + password: process.env.REDIS_PASSWORD, socket: { - host: process.env.REDDIS_HOST, - port: process.env.REDDIS_PORT + host: process.env.REDIS_HOST || 'redis', + port: process.env.REDIS_PORT || 6379 } });