From f0b9c6ad406622edbc7245da06d9eba12392063b Mon Sep 17 00:00:00 2001 From: Theo Weijmer Date: Fri, 9 Jan 2026 11:41:28 +0100 Subject: [PATCH] Conversie codeigniter 4 --- .gitignore | 1 + README.md | 166 ++++++ app/Config/App.php | 87 +++ app/Config/Autoload.php | 44 ++ app/Config/Boot.php | 44 ++ app/Config/Boot/development.php | 34 ++ app/Config/Boot/production.php | 25 + app/Config/Boot/testing.php | 31 + app/Config/CURLRequest.php | 20 + app/Config/Cache.php | 162 ++++++ app/Config/Constants.php | 67 +++ app/Config/ContentSecurityPolicy.php | 176 ++++++ app/Config/Cookie.php | 107 ++++ app/Config/Database.php | 75 +++ app/Config/DocTypes.php | 43 ++ app/Config/Email.php | 132 +++++ app/Config/Encryption.php | 92 +++ app/Config/Events.php | 43 ++ app/Config/Exceptions.php | 78 +++ app/Config/Feature.php | 37 ++ app/Config/Filters.php | 87 +++ app/Config/ForeignCharacters.php | 12 + app/Config/Format.php | 64 +++ app/Config/Generators.php | 44 ++ app/Config/Honeypot.php | 42 ++ app/Config/Images.php | 31 + app/Config/Kint.php | 63 +++ app/Config/Logger.php | 35 ++ app/Config/Migrations.php | 50 ++ app/Config/Mimes.php | 534 ++++++++++++++++++ app/Config/Modules.php | 36 ++ app/Config/Optimize.php | 30 + app/Config/Pager.php | 37 ++ app/Config/Paths.php | 46 ++ app/Config/Publisher.php | 28 + app/Config/Routes.php | 195 +++++++ app/Config/Routing.php | 140 +++++ app/Config/Security.php | 86 +++ app/Config/Services.php | 18 + app/Config/Session.php | 71 +++ app/Config/Toolbar.php | 122 ++++ app/Config/UserAgents.php | 252 +++++++++ app/Config/Validation.php | 44 ++ app/Config/View.php | 62 ++ app/Controllers/BaseController.php | 160 ++++++ .../Beheer/AuthorisationController.php | 49 ++ .../Beheer/CustomersController.php | 70 +++ .../Beheer/EmployeeTargetController.php | 56 ++ .../Beheer/ExternalsController.php | 70 +++ app/Controllers/Beheer/RolesController.php | 30 + .../Beheer/TwoFactorController.php | 194 +++++++ app/Controllers/Beheer/UsersController.php | 152 +++++ app/Controllers/Beheer/VatController.php | 58 ++ .../Dashboard/DashboardController.php | 142 +++++ app/Controllers/DownloadDB.php | 39 ++ app/Controllers/FileUpload.php | 79 +++ app/Controllers/Login.php | 311 ++++++++++ app/Controllers/Main.php | 25 + app/Controllers/Menu.php | 20 + .../Projects/CommentsController.php | 57 ++ .../Projects/DocumentsController.php | 55 ++ .../Projects/EmployeeHoursController.php | 91 +++ app/Controllers/Projects/OffersController.php | 99 ++++ .../Projects/ProjectsController.php | 399 +++++++++++++ app/Controllers/Reports/ReportsController.php | 87 +++ .../Reports/ReportsdefaultController.php | 30 + .../Reports/ReservationsController.php | 67 +++ app/Filters/AuthFilter.php | 49 ++ app/Helpers/common_helper.php | 331 +++++++++++ .../Beheer/Customer/RemoveCustomer.php | 36 ++ .../Beheer/Externals/RemoveExternal.php | 36 ++ .../Beheer/Session/CreateUserSession.php | 42 ++ .../Beheer/Session/RetrieveUserSession.php | 45 ++ .../Beheer/TwoFactor/SendOtpEmail.php | 101 ++++ app/Libraries/Beheer/User/CreateUser.php | 16 + app/Libraries/Beheer/User/PasswordRecipe.php | 99 ++++ app/Libraries/Beheer/User/RemoveUser.php | 36 ++ app/Libraries/Beheer/User/RequestPassword.php | 104 ++++ app/Libraries/Beheer/User/UserCreation.php | 72 +++ app/Libraries/Deletions/RemoveInvoice.php | 53 ++ app/Libraries/Deletions/RemoveInvoices.php | 46 ++ app/Libraries/Deletions/RemoveOffer.php | 52 ++ app/Libraries/Deletions/RemoveProject.php | 97 ++++ .../Deletions/RemoveProjectemployee.php | 53 ++ app/Libraries/Deletions/RemoveVat.php | 65 +++ app/Libraries/Projects/RemoveForecast.php | 36 ++ app/Libraries/Projects/RemovePayment.php | 36 ++ app/Libraries/Projects/RemoveProjecthour.php | 36 ++ app/Libraries/Projects/RemoveReservation.php | 36 ++ .../Invoice/Excel/InvoiceForecastSheet.php | 75 +++ .../Invoice/Excel/InvoiceOverviewSheet.php | 80 +++ .../Invoice/Excel/InvoiceSpreadsheet.php | 136 +++++ .../Reports/Invoice/Excel/InvoicedSheet.php | 67 +++ .../Invoice/Excel/MonthForecastSheet.php | 101 ++++ .../Invoice/Excel/MonthPaymentSheet.php | 95 ++++ .../Reports/Invoice/InvoiceForecast.php | 125 ++++ .../Reports/Invoice/InvoiceOverview.php | 151 +++++ app/Libraries/Reports/Invoice/Invoices.php | 133 +++++ .../Reports/Invoice/MonthForecast.php | 92 +++ .../Reports/Invoice/MonthPayments.php | 128 +++++ app/Libraries/Reports/Recapprojects.php | 279 +++++++++ app/Libraries/TwoFactorAuth.php | 181 ++++++ .../InputValidations/BaseValidation.php | 90 +++ .../InputValidations/CustomerValidation.php | 30 + .../EmployeeTargetValidation.php | 38 ++ .../InputValidations/ExternalValidation.php | 34 ++ .../InputValidations/ForecastValidation.php | 38 ++ .../InputValidations/InvoiceValidation.php | 42 ++ .../InputValidations/LoginValidation.php | 27 + .../InputValidations/OfferValidation.php | 42 ++ .../OrganisationValidation.php | 42 ++ .../PasswordRequestValidation.php | 28 + .../InputValidations/PaymentValidation.php | 34 ++ .../InputValidations/ProjectValidation.php | 34 ++ .../ProjectcostValidation.php | 42 ++ .../ProjectemployeeValidation.php | 41 ++ .../ProjecthourValidation.php | 34 ++ .../ReservationValidation.php | 34 ++ .../InputValidations/UserValidation.php | 46 ++ app/Libraries/Validation/Validation.php | 209 +++++++ app/Models/Eloquent/BaseModel.php | 59 ++ app/Models/Eloquent/Comment.php | 52 ++ app/Models/Eloquent/Customer.php | 48 ++ app/Models/Eloquent/Document.php | 32 ++ app/Models/Eloquent/Employeehour.php | 60 ++ app/Models/Eloquent/Employeetarget.php | 64 +++ app/Models/Eloquent/External.php | 53 ++ app/Models/Eloquent/Forecast.php | 38 ++ app/Models/Eloquent/Hourtype.php | 18 + app/Models/Eloquent/Invoice.php | 147 +++++ app/Models/Eloquent/Offer.php | 100 ++++ app/Models/Eloquent/Page.php | 62 ++ app/Models/Eloquent/Payment.php | 112 ++++ app/Models/Eloquent/Project.php | 197 +++++++ app/Models/Eloquent/Projectcost.php | 47 ++ app/Models/Eloquent/Projectemployee.php | 119 ++++ app/Models/Eloquent/Projecthour.php | 83 +++ app/Models/Eloquent/Reservation.php | 43 ++ app/Models/Eloquent/Role.php | 63 +++ app/Models/Eloquent/User.php | 154 +++++ app/Models/Eloquent/UserOtp_model.php | 102 ++++ app/Models/Eloquent/Vat.php | 39 ++ .../Eloquent/queries/EmployeehoursMonthly.php | 85 +++ .../ProjecthoursPerEmployeePerMonth.php | 59 ++ .../Eloquent/queries/QEmployeeHours.php | 80 +++ .../Eloquent/queries/QRecapProjects.php | 12 + .../queries/QinvoiceMonthOverview.php | 43 ++ .../Eloquent/queries/Qinvoiceoverview.php | 66 +++ .../Eloquent/queries/ReservationTotals.php | 69 +++ app/Views/emails/requestpassword_email.php | 366 ++++++++++++ app/Views/emails/twofactor_otp_email.php | 172 ++++++ app/Views/emails/welcome_email.php | 372 ++++++++++++ app/Views/errors/cli/error_404.php | 7 + app/Views/errors/cli/error_db.php | 8 + app/Views/errors/cli/error_exception.php | 65 +++ app/Views/errors/cli/error_general.php | 8 + app/Views/errors/cli/error_php.php | 21 + app/Views/errors/cli/index.html | 11 + app/Views/errors/cli/production.php | 5 + app/Views/errors/html/debug.css | 194 +++++++ app/Views/errors/html/debug.js | 116 ++++ app/Views/errors/html/error_400.php | 84 +++ app/Views/errors/html/error_404.php | 84 +++ app/Views/errors/html/error_db.php | 64 +++ app/Views/errors/html/error_exception.php | 429 ++++++++++++++ app/Views/errors/html/error_general.php | 64 +++ app/Views/errors/html/error_php.php | 33 ++ app/Views/errors/html/index.html | 11 + app/Views/errors/html/production.php | 25 + app/Views/errors/index.html | 11 + app/Views/index.html | 11 + app/Views/main_view.old | 55 ++ app/Views/main_view.php | 100 ++++ app/Views/modals/comment_modal.php | 26 + app/Views/modals/customer_modal.php | 159 ++++++ app/Views/modals/employeetarget_modal.php | 115 ++++ app/Views/modals/external_modal.php | 207 +++++++ app/Views/modals/offer_modal.php | 288 ++++++++++ app/Views/modals/partials/_dashboard.php | 5 + app/Views/modals/partials/_financials.php | 19 + app/Views/modals/partials/_forecasts.php | 104 ++++ app/Views/modals/partials/_hourTotals.php | 57 ++ app/Views/modals/partials/_hours.php | 102 ++++ app/Views/modals/partials/_invoices.php | 197 +++++++ .../modals/partials/_projectcomments.php | 43 ++ app/Views/modals/partials/_projectcosts.php | 137 +++++ .../modals/partials/_projectdashboard.php | 159 ++++++ .../modals/partials/_projectemployees.php | 82 +++ app/Views/modals/partials/_projectfiles.php | 37 ++ app/Views/modals/partials/_projectoffers.php | 49 ++ app/Views/modals/partials/_reservations.php | 68 +++ app/Views/modals/project_modal.php | 84 +++ app/Views/modals/user_modal.php | 159 ++++++ app/Views/pages/authorisation_view.php | 35 ++ app/Views/pages/backupdb_view.php | 7 + .../pages/beheer/twofactor/settings_view.php | 291 ++++++++++ app/Views/pages/content.php | 3 + app/Views/pages/customers_view.php | 62 ++ app/Views/pages/dashboard_view.php | 211 +++++++ app/Views/pages/employeehours_view.php | 107 ++++ app/Views/pages/employeehoursreport_view.php | 31 + app/Views/pages/externals_view.php | 64 +++ app/Views/pages/home_view.php | 30 + app/Views/pages/invoicereport_view.php | 85 +++ app/Views/pages/login/dashboard_view.php | 1 + app/Views/pages/login/login_view.php | 252 +++++++++ app/Views/pages/login/verify2fa_view.php | 219 +++++++ app/Views/pages/monthlyemployeehours_view.php | 86 +++ app/Views/pages/offers_view.php | 124 ++++ app/Views/pages/projects_view.php | 126 +++++ app/Views/pages/reservations_view.php | 138 +++++ app/Views/pages/users_view.php | 65 +++ app/Views/pages/vat_view.php | 42 ++ app/Views/partials/_css.php | 29 + app/Views/partials/_fonts.php | 5 + app/Views/partials/_js.php | 87 +++ app/Views/partials/_modals.php | 12 + app/Views/partials/_navbar-left.php | 31 + app/Views/partials/_topmenu.php | 3 + .../employeehours/employeemonthhours_view.php | 70 +++ .../reports/invoices/contractors_report.php | 7 + .../invoices/invoiceforecast_report.php | 63 +++ .../invoices/invoiceoverview_report.php | 91 +++ .../reports/invoices/invoices_report.php | 80 +++ .../reports/invoices/monthforecast_report.php | 69 +++ .../reports/invoices/monthpayment_report.php | 55 ++ .../_employeehour_view.php | 148 +++++ .../_employeerevenue_view.php | 146 +++++ .../monthlyemployeehours/euro_view.php | 116 ++++ .../monthlyemployeehours/hours_view.php | 89 +++ app/Views/specials/tellme_modal.php | 28 + app/Views/specials/upload_modal.php | 20 + app/Views/underconstruction.php | 79 +++ app/Views/welcome_message.php | 89 +++ composer.json | 84 +-- docker-compose.yml | 40 ++ docker/Dockerfile | 55 ++ docker/nginx.conf | 41 ++ docker/php.ini | 8 + docker/xdebug.ini | 8 + public/.htaccess | 47 ++ public/index.php | 344 ++--------- 242 files changed, 20034 insertions(+), 346 deletions(-) create mode 100644 README.md create mode 100644 app/Config/App.php create mode 100644 app/Config/Autoload.php create mode 100644 app/Config/Boot.php create mode 100644 app/Config/Boot/development.php create mode 100644 app/Config/Boot/production.php create mode 100644 app/Config/Boot/testing.php create mode 100644 app/Config/CURLRequest.php create mode 100644 app/Config/Cache.php create mode 100644 app/Config/Constants.php create mode 100644 app/Config/ContentSecurityPolicy.php create mode 100644 app/Config/Cookie.php create mode 100644 app/Config/Database.php create mode 100644 app/Config/DocTypes.php create mode 100644 app/Config/Email.php create mode 100644 app/Config/Encryption.php create mode 100644 app/Config/Events.php create mode 100644 app/Config/Exceptions.php create mode 100644 app/Config/Feature.php create mode 100644 app/Config/Filters.php create mode 100644 app/Config/ForeignCharacters.php create mode 100644 app/Config/Format.php create mode 100644 app/Config/Generators.php create mode 100644 app/Config/Honeypot.php create mode 100644 app/Config/Images.php create mode 100644 app/Config/Kint.php create mode 100644 app/Config/Logger.php create mode 100644 app/Config/Migrations.php create mode 100644 app/Config/Mimes.php create mode 100644 app/Config/Modules.php create mode 100644 app/Config/Optimize.php create mode 100644 app/Config/Pager.php create mode 100644 app/Config/Paths.php create mode 100644 app/Config/Publisher.php create mode 100644 app/Config/Routes.php create mode 100644 app/Config/Routing.php create mode 100644 app/Config/Security.php create mode 100644 app/Config/Services.php create mode 100644 app/Config/Session.php create mode 100644 app/Config/Toolbar.php create mode 100644 app/Config/UserAgents.php create mode 100644 app/Config/Validation.php create mode 100644 app/Config/View.php create mode 100644 app/Controllers/BaseController.php create mode 100644 app/Controllers/Beheer/AuthorisationController.php create mode 100644 app/Controllers/Beheer/CustomersController.php create mode 100644 app/Controllers/Beheer/EmployeeTargetController.php create mode 100644 app/Controllers/Beheer/ExternalsController.php create mode 100644 app/Controllers/Beheer/RolesController.php create mode 100644 app/Controllers/Beheer/TwoFactorController.php create mode 100644 app/Controllers/Beheer/UsersController.php create mode 100644 app/Controllers/Beheer/VatController.php create mode 100644 app/Controllers/Dashboard/DashboardController.php create mode 100644 app/Controllers/DownloadDB.php create mode 100644 app/Controllers/FileUpload.php create mode 100644 app/Controllers/Login.php create mode 100644 app/Controllers/Main.php create mode 100644 app/Controllers/Menu.php create mode 100644 app/Controllers/Projects/CommentsController.php create mode 100644 app/Controllers/Projects/DocumentsController.php create mode 100644 app/Controllers/Projects/EmployeeHoursController.php create mode 100644 app/Controllers/Projects/OffersController.php create mode 100644 app/Controllers/Projects/ProjectsController.php create mode 100644 app/Controllers/Reports/ReportsController.php create mode 100644 app/Controllers/Reports/ReportsdefaultController.php create mode 100644 app/Controllers/Reports/ReservationsController.php create mode 100644 app/Filters/AuthFilter.php create mode 100644 app/Helpers/common_helper.php create mode 100644 app/Libraries/Beheer/Customer/RemoveCustomer.php create mode 100644 app/Libraries/Beheer/Externals/RemoveExternal.php create mode 100644 app/Libraries/Beheer/Session/CreateUserSession.php create mode 100644 app/Libraries/Beheer/Session/RetrieveUserSession.php create mode 100644 app/Libraries/Beheer/TwoFactor/SendOtpEmail.php create mode 100644 app/Libraries/Beheer/User/CreateUser.php create mode 100644 app/Libraries/Beheer/User/PasswordRecipe.php create mode 100644 app/Libraries/Beheer/User/RemoveUser.php create mode 100644 app/Libraries/Beheer/User/RequestPassword.php create mode 100644 app/Libraries/Beheer/User/UserCreation.php create mode 100644 app/Libraries/Deletions/RemoveInvoice.php create mode 100644 app/Libraries/Deletions/RemoveInvoices.php create mode 100644 app/Libraries/Deletions/RemoveOffer.php create mode 100644 app/Libraries/Deletions/RemoveProject.php create mode 100644 app/Libraries/Deletions/RemoveProjectemployee.php create mode 100644 app/Libraries/Deletions/RemoveVat.php create mode 100644 app/Libraries/Projects/RemoveForecast.php create mode 100644 app/Libraries/Projects/RemovePayment.php create mode 100644 app/Libraries/Projects/RemoveProjecthour.php create mode 100644 app/Libraries/Projects/RemoveReservation.php create mode 100644 app/Libraries/Reports/Invoice/Excel/InvoiceForecastSheet.php create mode 100644 app/Libraries/Reports/Invoice/Excel/InvoiceOverviewSheet.php create mode 100644 app/Libraries/Reports/Invoice/Excel/InvoiceSpreadsheet.php create mode 100644 app/Libraries/Reports/Invoice/Excel/InvoicedSheet.php create mode 100644 app/Libraries/Reports/Invoice/Excel/MonthForecastSheet.php create mode 100644 app/Libraries/Reports/Invoice/Excel/MonthPaymentSheet.php create mode 100644 app/Libraries/Reports/Invoice/InvoiceForecast.php create mode 100644 app/Libraries/Reports/Invoice/InvoiceOverview.php create mode 100644 app/Libraries/Reports/Invoice/Invoices.php create mode 100644 app/Libraries/Reports/Invoice/MonthForecast.php create mode 100644 app/Libraries/Reports/Invoice/MonthPayments.php create mode 100644 app/Libraries/Reports/Recapprojects.php create mode 100644 app/Libraries/TwoFactorAuth.php create mode 100644 app/Libraries/Validation/InputValidations/BaseValidation.php create mode 100644 app/Libraries/Validation/InputValidations/CustomerValidation.php create mode 100644 app/Libraries/Validation/InputValidations/EmployeeTargetValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ExternalValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ForecastValidation.php create mode 100644 app/Libraries/Validation/InputValidations/InvoiceValidation.php create mode 100644 app/Libraries/Validation/InputValidations/LoginValidation.php create mode 100644 app/Libraries/Validation/InputValidations/OfferValidation.php create mode 100644 app/Libraries/Validation/InputValidations/OrganisationValidation.php create mode 100644 app/Libraries/Validation/InputValidations/PasswordRequestValidation.php create mode 100644 app/Libraries/Validation/InputValidations/PaymentValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ProjectValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ProjectcostValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ProjectemployeeValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ProjecthourValidation.php create mode 100644 app/Libraries/Validation/InputValidations/ReservationValidation.php create mode 100644 app/Libraries/Validation/InputValidations/UserValidation.php create mode 100644 app/Libraries/Validation/Validation.php create mode 100644 app/Models/Eloquent/BaseModel.php create mode 100644 app/Models/Eloquent/Comment.php create mode 100644 app/Models/Eloquent/Customer.php create mode 100644 app/Models/Eloquent/Document.php create mode 100644 app/Models/Eloquent/Employeehour.php create mode 100644 app/Models/Eloquent/Employeetarget.php create mode 100644 app/Models/Eloquent/External.php create mode 100644 app/Models/Eloquent/Forecast.php create mode 100644 app/Models/Eloquent/Hourtype.php create mode 100644 app/Models/Eloquent/Invoice.php create mode 100644 app/Models/Eloquent/Offer.php create mode 100644 app/Models/Eloquent/Page.php create mode 100644 app/Models/Eloquent/Payment.php create mode 100644 app/Models/Eloquent/Project.php create mode 100644 app/Models/Eloquent/Projectcost.php create mode 100644 app/Models/Eloquent/Projectemployee.php create mode 100644 app/Models/Eloquent/Projecthour.php create mode 100644 app/Models/Eloquent/Reservation.php create mode 100644 app/Models/Eloquent/Role.php create mode 100644 app/Models/Eloquent/User.php create mode 100644 app/Models/Eloquent/UserOtp_model.php create mode 100644 app/Models/Eloquent/Vat.php create mode 100644 app/Models/Eloquent/queries/EmployeehoursMonthly.php create mode 100644 app/Models/Eloquent/queries/ProjecthoursPerEmployeePerMonth.php create mode 100644 app/Models/Eloquent/queries/QEmployeeHours.php create mode 100644 app/Models/Eloquent/queries/QRecapProjects.php create mode 100644 app/Models/Eloquent/queries/QinvoiceMonthOverview.php create mode 100644 app/Models/Eloquent/queries/Qinvoiceoverview.php create mode 100644 app/Models/Eloquent/queries/ReservationTotals.php create mode 100644 app/Views/emails/requestpassword_email.php create mode 100644 app/Views/emails/twofactor_otp_email.php create mode 100644 app/Views/emails/welcome_email.php create mode 100755 app/Views/errors/cli/error_404.php create mode 100755 app/Views/errors/cli/error_db.php create mode 100755 app/Views/errors/cli/error_exception.php create mode 100755 app/Views/errors/cli/error_general.php create mode 100755 app/Views/errors/cli/error_php.php create mode 100755 app/Views/errors/cli/index.html create mode 100644 app/Views/errors/cli/production.php create mode 100644 app/Views/errors/html/debug.css create mode 100644 app/Views/errors/html/debug.js create mode 100644 app/Views/errors/html/error_400.php create mode 100755 app/Views/errors/html/error_404.php create mode 100755 app/Views/errors/html/error_db.php create mode 100755 app/Views/errors/html/error_exception.php create mode 100755 app/Views/errors/html/error_general.php create mode 100755 app/Views/errors/html/error_php.php create mode 100755 app/Views/errors/html/index.html create mode 100644 app/Views/errors/html/production.php create mode 100755 app/Views/errors/index.html create mode 100755 app/Views/index.html create mode 100644 app/Views/main_view.old create mode 100644 app/Views/main_view.php create mode 100644 app/Views/modals/comment_modal.php create mode 100644 app/Views/modals/customer_modal.php create mode 100644 app/Views/modals/employeetarget_modal.php create mode 100644 app/Views/modals/external_modal.php create mode 100644 app/Views/modals/offer_modal.php create mode 100644 app/Views/modals/partials/_dashboard.php create mode 100644 app/Views/modals/partials/_financials.php create mode 100644 app/Views/modals/partials/_forecasts.php create mode 100644 app/Views/modals/partials/_hourTotals.php create mode 100644 app/Views/modals/partials/_hours.php create mode 100644 app/Views/modals/partials/_invoices.php create mode 100644 app/Views/modals/partials/_projectcomments.php create mode 100644 app/Views/modals/partials/_projectcosts.php create mode 100644 app/Views/modals/partials/_projectdashboard.php create mode 100644 app/Views/modals/partials/_projectemployees.php create mode 100644 app/Views/modals/partials/_projectfiles.php create mode 100644 app/Views/modals/partials/_projectoffers.php create mode 100644 app/Views/modals/partials/_reservations.php create mode 100644 app/Views/modals/project_modal.php create mode 100644 app/Views/modals/user_modal.php create mode 100644 app/Views/pages/authorisation_view.php create mode 100644 app/Views/pages/backupdb_view.php create mode 100644 app/Views/pages/beheer/twofactor/settings_view.php create mode 100644 app/Views/pages/content.php create mode 100644 app/Views/pages/customers_view.php create mode 100644 app/Views/pages/dashboard_view.php create mode 100644 app/Views/pages/employeehours_view.php create mode 100644 app/Views/pages/employeehoursreport_view.php create mode 100644 app/Views/pages/externals_view.php create mode 100644 app/Views/pages/home_view.php create mode 100644 app/Views/pages/invoicereport_view.php create mode 100644 app/Views/pages/login/dashboard_view.php create mode 100644 app/Views/pages/login/login_view.php create mode 100644 app/Views/pages/login/verify2fa_view.php create mode 100644 app/Views/pages/monthlyemployeehours_view.php create mode 100644 app/Views/pages/offers_view.php create mode 100644 app/Views/pages/projects_view.php create mode 100644 app/Views/pages/reservations_view.php create mode 100644 app/Views/pages/users_view.php create mode 100644 app/Views/pages/vat_view.php create mode 100644 app/Views/partials/_css.php create mode 100644 app/Views/partials/_fonts.php create mode 100644 app/Views/partials/_js.php create mode 100644 app/Views/partials/_modals.php create mode 100644 app/Views/partials/_navbar-left.php create mode 100644 app/Views/partials/_topmenu.php create mode 100644 app/Views/reports/employeehours/employeemonthhours_view.php create mode 100644 app/Views/reports/invoices/contractors_report.php create mode 100644 app/Views/reports/invoices/invoiceforecast_report.php create mode 100644 app/Views/reports/invoices/invoiceoverview_report.php create mode 100644 app/Views/reports/invoices/invoices_report.php create mode 100644 app/Views/reports/invoices/monthforecast_report.php create mode 100644 app/Views/reports/invoices/monthpayment_report.php create mode 100644 app/Views/reports/monthlyemployeehours/_employeehour_view.php create mode 100644 app/Views/reports/monthlyemployeehours/_employeerevenue_view.php create mode 100644 app/Views/reports/monthlyemployeehours/euro_view.php create mode 100644 app/Views/reports/monthlyemployeehours/hours_view.php create mode 100644 app/Views/specials/tellme_modal.php create mode 100644 app/Views/specials/upload_modal.php create mode 100644 app/Views/underconstruction.php create mode 100755 app/Views/welcome_message.php create mode 100644 docker-compose.yml create mode 100644 docker/Dockerfile create mode 100644 docker/nginx.conf create mode 100644 docker/php.ini create mode 100644 docker/xdebug.ini create mode 100644 public/.htaccess diff --git a/.gitignore b/.gitignore index 44d49db..57e9a47 100755 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ user_guide_src/cilexer/pycilexer.egg-info/* /.env /themeforest /documents +/writable diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8d2783 --- /dev/null +++ b/README.md @@ -0,0 +1,166 @@ +# PHP Docker Template + +Template voor PHP projecten (CodeIgniter, plain PHP, etc.) met Xdebug support. + +## Snelle start + +### 1. Kopieer bestanden naar je project + +```bash +cp -r docker/ /pad/naar/jouw-project/ +cp docker-compose.yml /pad/naar/jouw-project/ +cp .env.example /pad/naar/jouw-project/.env +``` + +### 2. Configureer je project + +Pas `.env` aan: +```env +PROJECT_NAME=jouwproject +PROJECT_DOMAIN=jouwproject.test +DB_DATABASE=jouwproject_db +``` + +### 3. Pas PHP versie aan (indien nodig) + +In `docker-compose.yml`, wijzig de PHP_VERSION: +```yaml +args: + PHP_VERSION: "8.2" # Opties: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 +``` + +### 4. Pas document root aan (indien nodig) + +In `docker/nginx.conf`, wijzig root als je project geen `/public` map heeft: +```nginx +# Voor CodeIgniter 3: +root /var/www/html; + +# Voor CodeIgniter 4 / Laravel-style: +root /var/www/html/public; +``` + +### 5. DNS instellen + +Voeg toe aan `/etc/hosts`: +``` +127.0.0.1 jouwproject.test +``` + +Of gebruik dnsmasq voor automatische .test domeinen. + +### 6. Database aanmaken + +```bash +docker exec -it shared-mysql mysql -u root -proot -e "CREATE DATABASE jouwproject_db;" +``` + +### 7. Start het project + +```bash +# Zorg dat shared services draaien +cd /Volumes/development/sites/docker-shared +docker compose up -d + +# Start je project +cd /pad/naar/jouw-project +docker compose up -d --build +``` + +Je project is nu beschikbaar op http://jouwproject.test + +--- + +## Xdebug met PHPStorm + +### 1. PHPStorm configureren + +1. **Preferences → PHP → Servers** + - Klik op `+` + - Name: `jouwproject.test` + - Host: `jouwproject.test` + - Port: `80` + - Debugger: `Xdebug` + - ✅ Use path mappings + - Map `/pad/naar/jouw-project` → `/var/www/html` + +2. **Preferences → PHP → Debug** + - Debug port: `9003` + - ✅ Can accept external connections + +3. **Preferences → PHP → Debug → DBGp Proxy** + - IDE key: `PHPSTORM` + +### 2. Debugging starten + +1. Klik op de telefoon-icoon in PHPStorm: "Start Listening for PHP Debug Connections" +2. Zet een breakpoint +3. Open je pagina in de browser +4. PHPStorm stopt automatisch bij je breakpoint + +--- + +## Handige commando's + +```bash +# Start containers +docker compose up -d + +# Herbouw na Dockerfile wijzigingen +docker compose up -d --build + +# Stop containers +docker compose down + +# Bekijk logs +docker compose logs -f + +# Shell in PHP container +docker exec -it jouwproject-app bash + +# Composer commands +docker exec -it jouwproject-app composer install +docker exec -it jouwproject-app composer update + +# Artisan commands (als je Laravel-achtige CLI hebt) +docker exec -it jouwproject-app php artisan migrate +``` + +--- + +## Structuur + +``` +jouw-project/ +├── docker/ +│ ├── Dockerfile # PHP container configuratie +│ ├── nginx.conf # Nginx configuratie +│ ├── php.ini # PHP settings +│ └── xdebug.ini # Xdebug settings +├── docker-compose.yml # Container orchestratie +├── .env # Project variabelen +└── ... je project bestanden +``` + +--- + +## Troubleshooting + +### Container kan shared-mysql niet bereiken +Controleer of shared services draaien: +```bash +docker ps | grep shared-mysql +``` + +### Xdebug werkt niet +1. Check of xdebug actief is: + ```bash + docker exec -it jouwproject-app php -m | grep xdebug + ``` +2. Check PHPStorm luistert op poort 9003 +3. Controleer path mapping in PHPStorm + +### Permission denied errors +```bash +docker exec -it jouwproject-app chown -R www:www /var/www/html/storage +``` diff --git a/app/Config/App.php b/app/Config/App.php new file mode 100644 index 0000000..2e8e5b9 --- /dev/null +++ b/app/Config/App.php @@ -0,0 +1,87 @@ + + */ + public array $allowedHostnames = []; + + /** + * Index File + */ + public string $indexPage = ''; + + /** + * URI Protocol + */ + public string $uriProtocol = 'REQUEST_URI'; + + /** + * Default Locale + */ + public string $defaultLocale = 'nl'; + + /** + * Negotiate Locale + */ + public bool $negotiateLocale = false; + + /** + * Supported Locales + * + * @var list + */ + public array $supportedLocales = ['nl', 'en']; + + /** + * Application Timezone + */ + public string $appTimezone = 'Europe/Amsterdam'; + + /** + * Default Character Set + */ + public string $charset = 'UTF-8'; + + /** + * Force Global Secure Requests + */ + public bool $forceGlobalSecureRequests = false; + + /** + * Reverse Proxy IPs + * + * @var array + */ + public array $proxyIPs = []; + + /** + * Content Security Policy + */ + public bool $CSPEnabled = false; + + public function __construct() + { + parent::__construct(); + + // Set baseURL from environment + $this->baseURL = $_ENV['APP_URL'] ?? 'http://localhost'; + + // Force HTTPS in production + if (($_ENV['ENVIRONMENT'] ?? 'development') === 'production') { + $this->forceGlobalSecureRequests = true; + } + } +} diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php new file mode 100644 index 0000000..1cb8d07 --- /dev/null +++ b/app/Config/Autoload.php @@ -0,0 +1,44 @@ +|string> + */ + public $psr4 = [ + APP_NAMESPACE => APPPATH, + ]; + + /** + * Class Maps + * + * @var array + */ + public $classmap = []; + + /** + * Files to be autoloaded. + * + * @var list + */ + public $files = []; + + /** + * Helpers to be autoloaded. + * + * @var list + */ + public $helpers = ['common']; +} diff --git a/app/Config/Boot.php b/app/Config/Boot.php new file mode 100644 index 0000000..df6e723 --- /dev/null +++ b/app/Config/Boot.php @@ -0,0 +1,44 @@ +appDirectory . '/..') . DIRECTORY_SEPARATOR); + +// Path to the application directory +defined('APPPATH') || define('APPPATH', realpath($paths->appDirectory) . DIRECTORY_SEPARATOR); + +// Path to the public directory +defined('PUBLICPATH') || define('PUBLICPATH', realpath($paths->publicDirectory) . DIRECTORY_SEPARATOR); + +// Path to the writable directory +defined('WRITEPATH') || define('WRITEPATH', realpath($paths->writableDirectory) . DIRECTORY_SEPARATOR); + +// Path to the tests directory +defined('TESTPATH') || define('TESTPATH', realpath($paths->testsDirectory) . DIRECTORY_SEPARATOR); + +/* + * --------------------------------------------------------------- + * GRAB THE CODEIGNITER BOOT CLASS + * --------------------------------------------------------------- + */ + +require ROOTPATH . 'vendor/codeigniter4/framework/system/Boot.php'; + +return Boot::bootWeb($paths); diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php new file mode 100644 index 0000000..a868447 --- /dev/null +++ b/app/Config/Boot/development.php @@ -0,0 +1,34 @@ + WRITEPATH . 'cache/', + 'mode' => 0640, + ]; + + /** + * ------------------------------------------------------------------------- + * Memcached settings + * ------------------------------------------------------------------------- + * + * Your Memcached servers can be specified below, if you are using + * the Memcached drivers. + * + * @see https://codeigniter.com/user_guide/libraries/caching.html#memcached + * + * @var array{host?: string, port?: int, weight?: int, raw?: bool} + */ + public array $memcached = [ + 'host' => '127.0.0.1', + 'port' => 11211, + 'weight' => 1, + 'raw' => false, + ]; + + /** + * ------------------------------------------------------------------------- + * Redis settings + * ------------------------------------------------------------------------- + * + * Your Redis server can be specified below, if you are using + * the Redis or Predis drivers. + * + * @var array{host?: string, password?: string|null, port?: int, timeout?: int, database?: int} + */ + public array $redis = [ + 'host' => '127.0.0.1', + 'password' => null, + 'port' => 6379, + 'timeout' => 0, + 'database' => 0, + ]; + + /** + * -------------------------------------------------------------------------- + * Available Cache Handlers + * -------------------------------------------------------------------------- + * + * This is an array of cache engine alias' and class names. Only engines + * that are listed here are allowed to be used. + * + * @var array> + */ + public array $validHandlers = [ + 'dummy' => DummyHandler::class, + 'file' => FileHandler::class, + 'memcached' => MemcachedHandler::class, + 'predis' => PredisHandler::class, + 'redis' => RedisHandler::class, + 'wincache' => WincacheHandler::class, + ]; + + /** + * -------------------------------------------------------------------------- + * Web Page Caching: Cache Include Query String + * -------------------------------------------------------------------------- + * + * Whether to take the URL query string into consideration when generating + * output cache files. Valid options are: + * + * false = Disabled + * true = Enabled, take all query parameters into account. + * Please be aware that this may result in numerous cache + * files generated for the same page over and over again. + * ['q'] = Enabled, but only take into account the specified list + * of query parameters. + * + * @var bool|list + */ + public $cacheQueryString = false; +} diff --git a/app/Config/Constants.php b/app/Config/Constants.php new file mode 100644 index 0000000..671f59b --- /dev/null +++ b/app/Config/Constants.php @@ -0,0 +1,67 @@ +|string|null + */ + public $defaultSrc; + + /** + * Lists allowed scripts' URLs. + * + * @var list|string + */ + public $scriptSrc = 'self'; + + /** + * Lists allowed stylesheets' URLs. + * + * @var list|string + */ + public $styleSrc = 'self'; + + /** + * Defines the origins from which images can be loaded. + * + * @var list|string + */ + public $imageSrc = 'self'; + + /** + * Restricts the URLs that can appear in a page's `` element. + * + * Will default to self if not overridden + * + * @var list|string|null + */ + public $baseURI; + + /** + * Lists the URLs for workers and embedded frame contents + * + * @var list|string + */ + public $childSrc = 'self'; + + /** + * Limits the origins that you can connect to (via XHR, + * WebSockets, and EventSource). + * + * @var list|string + */ + public $connectSrc = 'self'; + + /** + * Specifies the origins that can serve web fonts. + * + * @var list|string + */ + public $fontSrc; + + /** + * Lists valid endpoints for submission from `
` tags. + * + * @var list|string + */ + public $formAction = 'self'; + + /** + * Specifies the sources that can embed the current page. + * This directive applies to ``, `