From ee58dcedefff706f0dae29ea2540e4e6720e258c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Tue, 7 May 2024 13:20:45 +0900 Subject: [PATCH] vhost init...1 --- .gitignore | 20 + LICENSE | 22 + README.md | 67 ++ app/.htaccess | 6 + app/Cells/BoardCell.php | 26 + app/Cells/ProductCell.php | 15 + app/Common.php | 15 + app/Config/App.php | 450 +++++++++++ app/Config/Autoload.php | 97 +++ app/Config/Boot/development.php | 32 + app/Config/Boot/production.php | 21 + app/Config/Boot/testing.php | 32 + app/Config/CURLRequest.php | 20 + app/Config/Cache.php | 169 +++++ app/Config/Constants.php | 303 ++++++++ app/Config/ContentSecurityPolicy.php | 176 +++++ app/Config/Cookie.php | 105 +++ app/Config/Database.php | 84 +++ app/Config/DocTypes.php | 43 ++ app/Config/Email.php | 117 +++ app/Config/Encryption.php | 83 +++ app/Config/Events.php | 48 ++ app/Config/Exceptions.php | 77 ++ app/Config/Feature.php | 30 + app/Config/Filters.php | 66 ++ app/Config/ForeignCharacters.php | 9 + app/Config/Format.php | 77 ++ app/Config/Generators.php | 40 + app/Config/Honeypot.php | 42 ++ app/Config/Images.php | 31 + app/Config/Kint.php | 51 ++ app/Config/Logger.php | 150 ++++ app/Config/Migrations.php | 52 ++ app/Config/Mimes.php | 530 +++++++++++++ app/Config/Modules.php | 76 ++ app/Config/Pager.php | 39 + app/Config/Paths.php | 75 ++ app/Config/Publisher.php | 28 + app/Config/Routes.php | 203 +++++ app/Config/Routes_Shoppinmall.php | 201 +++++ app/Config/Routing.php | 113 +++ app/Config/Security.php | 101 +++ app/Config/Services.php | 32 + app/Config/Session.php | 102 +++ app/Config/Toolbar.php | 91 +++ app/Config/UserAgents.php | 252 +++++++ app/Config/Validation.php | 44 ++ app/Config/View.php | 56 ++ app/Controllers/Admin/AdminController.php | 19 + app/Controllers/Admin/BillingController.php | 91 +++ app/Controllers/Admin/BoardController.php | 121 +++ app/Controllers/Admin/CategoryController.php | 126 ++++ app/Controllers/Admin/Home.php | 35 + app/Controllers/Admin/OrderController.php | 60 ++ app/Controllers/Admin/ProductController.php | 93 +++ app/Controllers/Admin/SitepageController.php | 47 ++ app/Controllers/Admin/UserController.php | 51 ++ app/Controllers/Admin/UserSNSController.php | 46 ++ app/Controllers/BaseController.php | 696 ++++++++++++++++++ .../Front/Billing/BillingController.php | 220 ++++++ .../Front/Billing/CardController.php | 148 ++++ .../Front/Billing/DepositController.php | 64 ++ app/Controllers/Front/BoardController.php | 160 ++++ app/Controllers/Front/FrontController.php | 80 ++ app/Controllers/Front/Home.php | 34 + .../Front/Order/CartController.php | 171 +++++ .../Front/Order/OrderController.php | 89 +++ app/Controllers/Front/ProductController.php | 77 ++ app/Controllers/Front/SitepageController.php | 61 ++ app/Controllers/Front/UserController.php | 138 ++++ app/Controllers/Trait/CartTrait.php | 66 ++ app/Controllers/Trait/UpDownloadTrait.php | 95 +++ app/Database/Migrations/.gitkeep | 0 app/Database/Seeds/.gitkeep | 0 app/Database/Seeds/UserSeeder.php | 41 ++ app/Database/base.sql | 113 +++ app/Database/shoppingmall-20240423.sql | 361 +++++++++ app/Database/shoppingmall-20240506.sql | 361 +++++++++ app/Entities/BaseEntity.php | 19 + app/Entities/BaseHierarchyEntity.php | 23 + app/Entities/BillingEntity.php | 19 + app/Entities/BoardEntity.php | 34 + app/Entities/CategoryEntity.php | 25 + app/Entities/OrderBillingEntity.php | 19 + app/Entities/OrderEntity.php | 27 + app/Entities/ProductEntity.php | 31 + app/Entities/SitepageEntity.php | 17 + app/Entities/UserEntity.php | 21 + app/Entities/UserSNSEntity.php | 17 + app/Filters/.gitkeep | 0 app/Filters/AuthFilter.php | 65 ++ app/Helpers/.gitkeep | 0 app/Helpers/Billing_helper.php | 209 ++++++ app/Helpers/Board_helper.php | 206 ++++++ app/Helpers/Card_helper.php | 100 +++ app/Helpers/Category_helper.php | 164 +++++ app/Helpers/Common_helper.php | 223 ++++++ app/Helpers/Deposit_helper.php | 77 ++ app/Helpers/Order_helper.php | 183 +++++ app/Helpers/Product_helper.php | 186 +++++ app/Helpers/Sitepage_helper.php | 161 ++++ app/Helpers/UserSNS_helper.php | 150 ++++ app/Helpers/User_helper.php | 162 ++++ app/Language/.gitkeep | 0 app/Language/ko/Billing.php | 25 + app/Language/ko/Board.php | 22 + app/Language/ko/Card.php | 16 + app/Language/ko/Cart.php | 9 + app/Language/ko/Category.php | 34 + app/Language/ko/Deposit.php | 8 + app/Language/ko/Order.php | 28 + app/Language/ko/Product.php | 30 + app/Language/ko/Sitepage.php | 15 + app/Language/ko/User.php | 25 + app/Language/ko/UserSNS.php | 22 + app/Language/ko/Validation.php | 4 + app/Libraries/.gitkeep | 0 app/Libraries/Adapter/API/API.php | 82 +++ app/Libraries/Adapter/API/CurlAPI.php | 209 ++++++ app/Libraries/Adapter/API/GuzzleAPI.php | 85 +++ app/Libraries/Adapter/API/LocalAdapter.php | 53 ++ app/Libraries/Adapter/Adapter.php | 15 + app/Libraries/Adapter/Auth/Auth.php | 82 +++ app/Libraries/Adapter/Auth/GoogleAuth.php | 131 ++++ app/Libraries/Adapter/Auth/LocalAuth.php | 32 + .../Adapter/Payment/CookiePayment.php | 66 ++ app/Libraries/Adapter/Payment/Payment.php | 29 + app/Models/.gitkeep | 0 app/Models/BaseHierarchyModel.php | 67 ++ app/Models/BaseModel.php | 288 ++++++++ app/Models/BillingModel.php | 86 +++ app/Models/BoardModel.php | 115 +++ app/Models/CategoryModel.php | 155 ++++ app/Models/OrderBillingModel.php | 50 ++ app/Models/OrderModel.php | 125 ++++ app/Models/ProductModel.php | 137 ++++ app/Models/SitepageModel.php | 90 +++ app/Models/UserModel.php | 101 +++ app/Models/UserSNSModel.php | 71 ++ app/ThirdParty/.gitkeep | 0 app/Views/admin/billing/index.php | 48 ++ app/Views/admin/billing/view.php | 40 + app/Views/admin/board/index.php | 48 ++ app/Views/admin/board/insert.php | 24 + app/Views/admin/board/reply.php | 24 + app/Views/admin/board/update.php | 24 + app/Views/admin/board/view.php | 19 + app/Views/admin/category/index.php | 48 ++ app/Views/admin/category/insert.php | 24 + .../admin/category/leftmenu_template.php | 14 + app/Views/admin/category/reply.php | 24 + app/Views/admin/category/update.php | 24 + app/Views/admin/category/view.php | 19 + app/Views/admin/order/index.php | 47 ++ app/Views/admin/order/update.php | 24 + app/Views/admin/order/view.php | 19 + app/Views/admin/product/index.php | 48 ++ app/Views/admin/product/insert.php | 24 + app/Views/admin/product/update.php | 24 + app/Views/admin/product/view.php | 19 + app/Views/admin/sitepage/index.php | 48 ++ app/Views/admin/sitepage/insert.php | 24 + app/Views/admin/sitepage/update.php | 24 + app/Views/admin/sitepage/view.php | 19 + app/Views/admin/user/index.php | 48 ++ app/Views/admin/user/insert.php | 24 + app/Views/admin/user/update.php | 24 + app/Views/admin/user/view.php | 19 + app/Views/admin/usersns/index.php | 48 ++ app/Views/admin/usersns/view.php | 19 + app/Views/admin/welcome_message.php | 5 + app/Views/errors/cli/error_404.php | 7 + app/Views/errors/cli/error_exception.php | 65 ++ app/Views/errors/cli/production.php | 5 + app/Views/errors/html/debug.css | 197 +++++ app/Views/errors/html/debug.js | 116 +++ app/Views/errors/html/error_404.php | 84 +++ app/Views/errors/html/error_exception.php | 397 ++++++++++ app/Views/errors/html/production.php | 25 + app/Views/front/billing/billing.php | 37 + app/Views/front/billing/card/update.php | 35 + app/Views/front/billing/deposit/update.php | 49 ++ app/Views/front/billing/index.php | 34 + app/Views/front/billing/view.php | 42 ++ app/Views/front/board/cell/information.php | 11 + app/Views/front/board/index.php | 52 ++ app/Views/front/board/insert.php | 24 + app/Views/front/board/reply.php | 24 + app/Views/front/board/update.php | 24 + app/Views/front/board/view.php | 21 + app/Views/front/order/index.php | 82 +++ app/Views/front/order/view.php | 21 + .../front/product/cell/virtual_calculator.php | 87 +++ app/Views/front/product/index.php | 39 + app/Views/front/product/view.php | 75 ++ app/Views/front/sitepage/index.php | 14 + app/Views/front/user/index.php | 41 ++ app/Views/front/user/insert.php | 24 + app/Views/front/user/login.php | 41 ++ app/Views/front/user/login_v1.php | 37 + app/Views/front/user/update.php | 24 + app/Views/front/welcome_message.php | 246 +++++++ app/Views/layouts/admin.php | 49 ++ app/Views/layouts/admin/left_menu.php | 10 + app/Views/layouts/admin/left_menu/base.php | 9 + app/Views/layouts/admin/left_menu/board.php | 16 + .../layouts/admin/left_menu/shoppingmall.php | 16 + app/Views/layouts/admin/make_password.php | 4 + app/Views/layouts/admin/top_navigator.php | 20 + .../admin/top_navigator/make_password.php | 5 + .../admin/top_navigator/member_link.php | 14 + .../layouts/admin/top_navigator/search.php | 4 + app/Views/layouts/common/copyright.php | 29 + app/Views/layouts/empty.php | 34 + app/Views/layouts/front.php | 60 ++ app/Views/layouts/front/left_menu.php | 16 + app/Views/layouts/front/top_menu.php | 37 + app/Views/layouts/front/top_navigator.php | 21 + .../front/top_navigator/member_link.php | 14 + .../layouts/front/top_navigator/search.php | 4 + .../front/top_navigator/top_center.php | 5 + app/Views/layouts/main.php | 71 ++ app/Views/layouts/main/board.php | 3 + app/Views/layouts/main/top_menu.php | 40 + app/Views/layouts/main/top_navigator.php | 21 + app/Views/templates/Pagers/bootstrap_full.php | 34 + .../templates/Pagers/bootstrap_simple.php | 17 + app/Views/templates/admin/footer.php | 36 + app/Views/templates/admin/header.php | 9 + app/Views/templates/admin/index_head.php | 19 + app/Views/templates/empty/footer.php | 2 + app/Views/templates/empty/header.php | 1 + app/Views/templates/front/footer.php | 35 + app/Views/templates/front/header.php | 11 + app/Views/templates/front/index_head.php | 14 + .../templates/front/index_head_product.php | 17 + app/index.html | 11 + builds | 125 ++++ cfmgr_dataflow.png | Bin 0 -> 127030 bytes cfmgr_dataflow.xml | 1 + composer.json | 43 ++ phpunit.xml.dist | 57 ++ preload.php | 113 +++ public/.htaccess | 49 ++ public/css/admin.css | 53 ++ public/css/admin/content.css | 95 +++ public/css/admin/left_menu.css | 20 + public/css/admin/member_link.css | 17 + public/css/common/copyright.css | 29 + public/css/common/left_menu.css | 57 ++ public/css/common/login.css | 46 ++ public/css/common/login_v1.css | 50 ++ public/css/common/top_menu.css | 70 ++ public/css/common/top_navigator.css | 24 + public/css/empty.css | 14 + public/css/front.css | 54 ++ public/css/front/billing.css | 18 + public/css/front/content.css | 96 +++ public/css/front/order.css | 50 ++ public/css/front/sitepage.css | 69 ++ public/css/main.css | 209 ++++++ public/css/main/content.css | 96 +++ public/css/style.css | 33 + public/favicon.ico | Bin 0 -> 5430 bytes public/images/auth/google_login_button.png | Bin 0 -> 2280 bytes public/images/banner/sub_visual1.jpg | Bin 0 -> 156725 bytes public/images/banner/sub_visual2.jpg | Bin 0 -> 65350 bytes public/images/banner/sub_visual3.jpg | Bin 0 -> 181277 bytes public/images/banner/sub_visual4.jpg | Bin 0 -> 103135 bytes public/images/common/adminbg.png | Bin 0 -> 147749 bytes public/images/common/btn_login.png | Bin 0 -> 23014 bytes public/images/common/excel.png | Bin 0 -> 881 bytes public/images/common/menu_on.gif | Bin 0 -> 2290 bytes public/images/common/top.png | Bin 0 -> 2565 bytes public/images/common/top_skype.png | Bin 0 -> 2166 bytes public/images/main/bg_bnr.jpg | Bin 0 -> 290719 bytes public/images/main/bg_notice.gif | Bin 0 -> 52245 bytes public/images/main/icon1.png | Bin 0 -> 3304 bytes public/images/main/icon2.png | Bin 0 -> 4430 bytes public/images/main/icon3.png | Bin 0 -> 3754 bytes public/images/main/visual1.jpg | Bin 0 -> 382312 bytes public/images/main/visual2.jpg | Bin 0 -> 430511 bytes public/images/main/visual3.jpg | Bin 0 -> 236665 bytes public/images/sub/com_icon1.png | Bin 0 -> 2532 bytes public/images/sub/com_icon2.png | Bin 0 -> 4746 bytes public/images/sub/com_icon3.png | Bin 0 -> 5005 bytes public/images/sub/product_img1.jpg | Bin 0 -> 29965 bytes public/images/sub/product_img2.jpg | Bin 0 -> 27995 bytes public/images/sub/product_img3.jpg | Bin 0 -> 31325 bytes public/images/sub/sub1_1.jpg | Bin 0 -> 148056 bytes public/images/sub/sub2_1.jpg | Bin 0 -> 40912 bytes public/images/sub/sub2_1_icon.gif | Bin 0 -> 3293 bytes public/images/sub/sub2_1_skype.gif | Bin 0 -> 1574 bytes public/images/sub/sub2_2_tit.png | Bin 0 -> 7001 bytes public/images/sub/sub3_1.jpg | Bin 0 -> 79848 bytes public/images/sub/sub_visual1.jpg | Bin 0 -> 156725 bytes public/images/sub/sub_visual2.jpg | Bin 0 -> 65350 bytes public/images/sub/sub_visual3.jpg | Bin 0 -> 181277 bytes public/images/sub/sub_visual4.jpg | Bin 0 -> 103135 bytes public/index.php | 56 ++ public/js/admin.js | 104 +++ public/js/admin/side_menu.js | 14 + public/js/empty.js | 6 + public/js/front.js | 93 +++ public/js/main.js | 93 +++ public/js/popup.js | 54 ++ public/robots.txt | 2 + spark | 84 +++ tests/OOPExampleTest.php | 31 + tests/README.md | 122 +++ .../2020-02-22-222222_example_migration.php | 37 + .../_support/Database/Seeds/ExampleSeeder.php | 41 ++ tests/_support/Libraries/ConfigReader.php | 17 + tests/_support/Models/ExampleModel.php | 24 + tests/database/ExampleDatabaseTest.php | 46 ++ tests/session/ExampleSessionTest.php | 18 + tests/unit/HealthTest.php | 50 ++ writable/.htaccess | 6 + 318 files changed, 18589 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 app/.htaccess create mode 100644 app/Cells/BoardCell.php create mode 100644 app/Cells/ProductCell.php create mode 100644 app/Common.php create mode 100644 app/Config/App.php create mode 100644 app/Config/Autoload.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/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/Routes_Shoppinmall.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/Admin/AdminController.php create mode 100644 app/Controllers/Admin/BillingController.php create mode 100644 app/Controllers/Admin/BoardController.php create mode 100644 app/Controllers/Admin/CategoryController.php create mode 100644 app/Controllers/Admin/Home.php create mode 100644 app/Controllers/Admin/OrderController.php create mode 100644 app/Controllers/Admin/ProductController.php create mode 100644 app/Controllers/Admin/SitepageController.php create mode 100644 app/Controllers/Admin/UserController.php create mode 100644 app/Controllers/Admin/UserSNSController.php create mode 100644 app/Controllers/BaseController.php create mode 100644 app/Controllers/Front/Billing/BillingController.php create mode 100644 app/Controllers/Front/Billing/CardController.php create mode 100644 app/Controllers/Front/Billing/DepositController.php create mode 100644 app/Controllers/Front/BoardController.php create mode 100644 app/Controllers/Front/FrontController.php create mode 100644 app/Controllers/Front/Home.php create mode 100644 app/Controllers/Front/Order/CartController.php create mode 100644 app/Controllers/Front/Order/OrderController.php create mode 100644 app/Controllers/Front/ProductController.php create mode 100644 app/Controllers/Front/SitepageController.php create mode 100644 app/Controllers/Front/UserController.php create mode 100644 app/Controllers/Trait/CartTrait.php create mode 100644 app/Controllers/Trait/UpDownloadTrait.php create mode 100644 app/Database/Migrations/.gitkeep create mode 100644 app/Database/Seeds/.gitkeep create mode 100644 app/Database/Seeds/UserSeeder.php create mode 100644 app/Database/base.sql create mode 100644 app/Database/shoppingmall-20240423.sql create mode 100644 app/Database/shoppingmall-20240506.sql create mode 100644 app/Entities/BaseEntity.php create mode 100644 app/Entities/BaseHierarchyEntity.php create mode 100644 app/Entities/BillingEntity.php create mode 100644 app/Entities/BoardEntity.php create mode 100644 app/Entities/CategoryEntity.php create mode 100644 app/Entities/OrderBillingEntity.php create mode 100644 app/Entities/OrderEntity.php create mode 100644 app/Entities/ProductEntity.php create mode 100644 app/Entities/SitepageEntity.php create mode 100644 app/Entities/UserEntity.php create mode 100644 app/Entities/UserSNSEntity.php create mode 100644 app/Filters/.gitkeep create mode 100644 app/Filters/AuthFilter.php create mode 100644 app/Helpers/.gitkeep create mode 100644 app/Helpers/Billing_helper.php create mode 100644 app/Helpers/Board_helper.php create mode 100644 app/Helpers/Card_helper.php create mode 100644 app/Helpers/Category_helper.php create mode 100644 app/Helpers/Common_helper.php create mode 100644 app/Helpers/Deposit_helper.php create mode 100644 app/Helpers/Order_helper.php create mode 100644 app/Helpers/Product_helper.php create mode 100644 app/Helpers/Sitepage_helper.php create mode 100644 app/Helpers/UserSNS_helper.php create mode 100644 app/Helpers/User_helper.php create mode 100644 app/Language/.gitkeep create mode 100644 app/Language/ko/Billing.php create mode 100644 app/Language/ko/Board.php create mode 100644 app/Language/ko/Card.php create mode 100644 app/Language/ko/Cart.php create mode 100644 app/Language/ko/Category.php create mode 100644 app/Language/ko/Deposit.php create mode 100644 app/Language/ko/Order.php create mode 100644 app/Language/ko/Product.php create mode 100644 app/Language/ko/Sitepage.php create mode 100644 app/Language/ko/User.php create mode 100644 app/Language/ko/UserSNS.php create mode 100644 app/Language/ko/Validation.php create mode 100644 app/Libraries/.gitkeep create mode 100644 app/Libraries/Adapter/API/API.php create mode 100644 app/Libraries/Adapter/API/CurlAPI.php create mode 100644 app/Libraries/Adapter/API/GuzzleAPI.php create mode 100644 app/Libraries/Adapter/API/LocalAdapter.php create mode 100644 app/Libraries/Adapter/Adapter.php create mode 100644 app/Libraries/Adapter/Auth/Auth.php create mode 100644 app/Libraries/Adapter/Auth/GoogleAuth.php create mode 100644 app/Libraries/Adapter/Auth/LocalAuth.php create mode 100644 app/Libraries/Adapter/Payment/CookiePayment.php create mode 100644 app/Libraries/Adapter/Payment/Payment.php create mode 100644 app/Models/.gitkeep create mode 100644 app/Models/BaseHierarchyModel.php create mode 100644 app/Models/BaseModel.php create mode 100644 app/Models/BillingModel.php create mode 100644 app/Models/BoardModel.php create mode 100644 app/Models/CategoryModel.php create mode 100644 app/Models/OrderBillingModel.php create mode 100644 app/Models/OrderModel.php create mode 100644 app/Models/ProductModel.php create mode 100644 app/Models/SitepageModel.php create mode 100644 app/Models/UserModel.php create mode 100644 app/Models/UserSNSModel.php create mode 100644 app/ThirdParty/.gitkeep create mode 100644 app/Views/admin/billing/index.php create mode 100644 app/Views/admin/billing/view.php create mode 100644 app/Views/admin/board/index.php create mode 100644 app/Views/admin/board/insert.php create mode 100644 app/Views/admin/board/reply.php create mode 100644 app/Views/admin/board/update.php create mode 100644 app/Views/admin/board/view.php create mode 100644 app/Views/admin/category/index.php create mode 100644 app/Views/admin/category/insert.php create mode 100644 app/Views/admin/category/leftmenu_template.php create mode 100644 app/Views/admin/category/reply.php create mode 100644 app/Views/admin/category/update.php create mode 100644 app/Views/admin/category/view.php create mode 100644 app/Views/admin/order/index.php create mode 100644 app/Views/admin/order/update.php create mode 100644 app/Views/admin/order/view.php create mode 100644 app/Views/admin/product/index.php create mode 100644 app/Views/admin/product/insert.php create mode 100644 app/Views/admin/product/update.php create mode 100644 app/Views/admin/product/view.php create mode 100644 app/Views/admin/sitepage/index.php create mode 100644 app/Views/admin/sitepage/insert.php create mode 100644 app/Views/admin/sitepage/update.php create mode 100644 app/Views/admin/sitepage/view.php create mode 100644 app/Views/admin/user/index.php create mode 100644 app/Views/admin/user/insert.php create mode 100644 app/Views/admin/user/update.php create mode 100644 app/Views/admin/user/view.php create mode 100644 app/Views/admin/usersns/index.php create mode 100644 app/Views/admin/usersns/view.php create mode 100644 app/Views/admin/welcome_message.php create mode 100644 app/Views/errors/cli/error_404.php create mode 100644 app/Views/errors/cli/error_exception.php 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_404.php create mode 100644 app/Views/errors/html/error_exception.php create mode 100644 app/Views/errors/html/production.php create mode 100644 app/Views/front/billing/billing.php create mode 100644 app/Views/front/billing/card/update.php create mode 100644 app/Views/front/billing/deposit/update.php create mode 100644 app/Views/front/billing/index.php create mode 100644 app/Views/front/billing/view.php create mode 100644 app/Views/front/board/cell/information.php create mode 100644 app/Views/front/board/index.php create mode 100644 app/Views/front/board/insert.php create mode 100644 app/Views/front/board/reply.php create mode 100644 app/Views/front/board/update.php create mode 100644 app/Views/front/board/view.php create mode 100644 app/Views/front/order/index.php create mode 100644 app/Views/front/order/view.php create mode 100644 app/Views/front/product/cell/virtual_calculator.php create mode 100644 app/Views/front/product/index.php create mode 100644 app/Views/front/product/view.php create mode 100644 app/Views/front/sitepage/index.php create mode 100644 app/Views/front/user/index.php create mode 100644 app/Views/front/user/insert.php create mode 100644 app/Views/front/user/login.php create mode 100644 app/Views/front/user/login_v1.php create mode 100644 app/Views/front/user/update.php create mode 100644 app/Views/front/welcome_message.php create mode 100644 app/Views/layouts/admin.php create mode 100644 app/Views/layouts/admin/left_menu.php create mode 100644 app/Views/layouts/admin/left_menu/base.php create mode 100644 app/Views/layouts/admin/left_menu/board.php create mode 100644 app/Views/layouts/admin/left_menu/shoppingmall.php create mode 100644 app/Views/layouts/admin/make_password.php create mode 100644 app/Views/layouts/admin/top_navigator.php create mode 100644 app/Views/layouts/admin/top_navigator/make_password.php create mode 100644 app/Views/layouts/admin/top_navigator/member_link.php create mode 100644 app/Views/layouts/admin/top_navigator/search.php create mode 100644 app/Views/layouts/common/copyright.php create mode 100644 app/Views/layouts/empty.php create mode 100644 app/Views/layouts/front.php create mode 100644 app/Views/layouts/front/left_menu.php create mode 100644 app/Views/layouts/front/top_menu.php create mode 100644 app/Views/layouts/front/top_navigator.php create mode 100644 app/Views/layouts/front/top_navigator/member_link.php create mode 100644 app/Views/layouts/front/top_navigator/search.php create mode 100644 app/Views/layouts/front/top_navigator/top_center.php create mode 100644 app/Views/layouts/main.php create mode 100644 app/Views/layouts/main/board.php create mode 100644 app/Views/layouts/main/top_menu.php create mode 100644 app/Views/layouts/main/top_navigator.php create mode 100644 app/Views/templates/Pagers/bootstrap_full.php create mode 100644 app/Views/templates/Pagers/bootstrap_simple.php create mode 100644 app/Views/templates/admin/footer.php create mode 100644 app/Views/templates/admin/header.php create mode 100644 app/Views/templates/admin/index_head.php create mode 100644 app/Views/templates/empty/footer.php create mode 100644 app/Views/templates/empty/header.php create mode 100644 app/Views/templates/front/footer.php create mode 100644 app/Views/templates/front/header.php create mode 100644 app/Views/templates/front/index_head.php create mode 100644 app/Views/templates/front/index_head_product.php create mode 100644 app/index.html create mode 100644 builds create mode 100644 cfmgr_dataflow.png create mode 100644 cfmgr_dataflow.xml create mode 100644 composer.json create mode 100644 phpunit.xml.dist create mode 100644 preload.php create mode 100644 public/.htaccess create mode 100644 public/css/admin.css create mode 100644 public/css/admin/content.css create mode 100644 public/css/admin/left_menu.css create mode 100644 public/css/admin/member_link.css create mode 100644 public/css/common/copyright.css create mode 100644 public/css/common/left_menu.css create mode 100644 public/css/common/login.css create mode 100644 public/css/common/login_v1.css create mode 100644 public/css/common/top_menu.css create mode 100644 public/css/common/top_navigator.css create mode 100644 public/css/empty.css create mode 100644 public/css/front.css create mode 100644 public/css/front/billing.css create mode 100644 public/css/front/content.css create mode 100644 public/css/front/order.css create mode 100644 public/css/front/sitepage.css create mode 100644 public/css/main.css create mode 100644 public/css/main/content.css create mode 100644 public/css/style.css create mode 100644 public/favicon.ico create mode 100644 public/images/auth/google_login_button.png create mode 100644 public/images/banner/sub_visual1.jpg create mode 100644 public/images/banner/sub_visual2.jpg create mode 100644 public/images/banner/sub_visual3.jpg create mode 100644 public/images/banner/sub_visual4.jpg create mode 100644 public/images/common/adminbg.png create mode 100644 public/images/common/btn_login.png create mode 100644 public/images/common/excel.png create mode 100644 public/images/common/menu_on.gif create mode 100644 public/images/common/top.png create mode 100644 public/images/common/top_skype.png create mode 100644 public/images/main/bg_bnr.jpg create mode 100644 public/images/main/bg_notice.gif create mode 100644 public/images/main/icon1.png create mode 100644 public/images/main/icon2.png create mode 100644 public/images/main/icon3.png create mode 100644 public/images/main/visual1.jpg create mode 100644 public/images/main/visual2.jpg create mode 100644 public/images/main/visual3.jpg create mode 100644 public/images/sub/com_icon1.png create mode 100644 public/images/sub/com_icon2.png create mode 100644 public/images/sub/com_icon3.png create mode 100644 public/images/sub/product_img1.jpg create mode 100644 public/images/sub/product_img2.jpg create mode 100644 public/images/sub/product_img3.jpg create mode 100644 public/images/sub/sub1_1.jpg create mode 100644 public/images/sub/sub2_1.jpg create mode 100644 public/images/sub/sub2_1_icon.gif create mode 100644 public/images/sub/sub2_1_skype.gif create mode 100644 public/images/sub/sub2_2_tit.png create mode 100644 public/images/sub/sub3_1.jpg create mode 100644 public/images/sub/sub_visual1.jpg create mode 100644 public/images/sub/sub_visual2.jpg create mode 100644 public/images/sub/sub_visual3.jpg create mode 100644 public/images/sub/sub_visual4.jpg create mode 100644 public/index.php create mode 100644 public/js/admin.js create mode 100644 public/js/admin/side_menu.js create mode 100644 public/js/empty.js create mode 100644 public/js/front.js create mode 100644 public/js/main.js create mode 100644 public/js/popup.js create mode 100644 public/robots.txt create mode 100644 spark create mode 100644 tests/OOPExampleTest.php create mode 100644 tests/README.md create mode 100644 tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php create mode 100644 tests/_support/Database/Seeds/ExampleSeeder.php create mode 100644 tests/_support/Libraries/ConfigReader.php create mode 100644 tests/_support/Models/ExampleModel.php create mode 100644 tests/database/ExampleDatabaseTest.php create mode 100644 tests/session/ExampleSessionTest.php create mode 100644 tests/unit/HealthTest.php create mode 100644 writable/.htaccess diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0188b3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +#codeigniter 4 +!.htaccess +!.writable/api/index.html +!.writable/cache/index.html +!.writable/download/index.html +!.writable/excel/index.html +!.writable/uploads/index.html +!.writable/.htaccess +.env +writable/api/ +writable/cache/ +writable/debugbar/ +writable/download/ +writable/excel/ +writable/logs/ +writable/session/ +writable/uploads/ +vendor/ +vendors/ +composer.lock diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0119e5f --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014-2019 British Columbia Institute of Technology +Copyright (c) 2019-2023 CodeIgniter Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ccbcf47 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +#Tips +#참고 : https://github.com/bundanining/Shopping-Cart-Solution-CodeIgniter +vscode와 Git의 대소문자 구분시키기 +git config core.ignorecase false + +# 1. CodeIgniter 4 Application Starter + +`composer create-project codeigniter4/appstarter 프로젝트명` + +## 2. Setup + +php.ini에 extension=intl 필요 +apache의 DocumentRoot "패키지명/public" 수정 후 restart 필요 +Copy `env` to `.env` and tailor for your app, specifically the baseURL and any database settings. +.env 수정 +CI_ENVIRONMENT = development + +# 3. 필요한 추가 패키지 + +composer require saleh7/proxmox-ve_php_api + +## 4. Running Development Server + +php spark serve + +## 5. Web접속 + +개발용 -> localhost:8080 +실서버 -> https://proxmox.idcjp.jp + +## 6. new Controller추가시 Config\Routes.php에 Routing설정 필요 + +$routes->get('/ProxmoxAPI', 'ProxmoxAPI::index'); + +## 7. composer.json의 "psr-4" 수정시 reload + +"psr-4": { +"Tests\\Support\\": "tests/\_support" +"APP\\": "app" +} +composer dump-autoload + +## 8. php spark 사용법 (https://onlinewebtutorblog.com/how-to-work-with-codeigniter-4-model-and-entity-tutorial/) + +- User Table 관련 + php spark migrate:create create_user_table --> table 생성 + php spark migrate --> table 적용 + php spark make:migration update_and_addfield_to_users_table --> 기존 table 내용변경없이 column변경시 + php spark migrate:refresh --> table 수정후 재생성 + php spark migrate:rollback + php spark migrate:status --> 상태보기 + +- 초기 데이터 넣기 + php spark make:seeder user --suffix + php spark db:seed UsersSeeder + +- mvc 생성 --suffix 추가필요 + php spark make:model user --suffix + php spark make:controller user --suffix + php spark make:entity user --suffix + +- auth용 + php spark make:filter AuthGuard + +## 9. Login관련 참조 + +https://www.jurisic.org/post/2022/11/28/How-to-make-simple-Authentication-with-CodeIgniter-4 diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 0000000..f24db0a --- /dev/null +++ b/app/.htaccess @@ -0,0 +1,6 @@ + + Require all denied + + + Deny from all + diff --git a/app/Cells/BoardCell.php b/app/Cells/BoardCell.php new file mode 100644 index 0000000..aaaebfd --- /dev/null +++ b/app/Cells/BoardCell.php @@ -0,0 +1,26 @@ +_boardModel = $this->_boardModel ?: new BoardModel(); + } + public function information(array $viewDatas): string + { + helper('Board'); + $viewDatas['cellDatas'] = array(); + $viewDatas['cellDatas']['entitys'] = $this->getBoardModel()->getEntitys([ + 'category_uid' => __FUNCTION__ + ]); + return view( + 'Views/front/board/cell/' . __FUNCTION__, + ['viewDatas' => $viewDatas] + ); + } +} diff --git a/app/Cells/ProductCell.php b/app/Cells/ProductCell.php new file mode 100644 index 0000000..1d3428f --- /dev/null +++ b/app/Cells/ProductCell.php @@ -0,0 +1,15 @@ +$viewDatas] + ); + } +} diff --git a/app/Common.php b/app/Common.php new file mode 100644 index 0000000..23e3e61 --- /dev/null +++ b/app/Common.php @@ -0,0 +1,15 @@ + + */ + public array $allowedHostnames = []; + + /** + * -------------------------------------------------------------------------- + * Index File + * -------------------------------------------------------------------------- + * + * Typically this will be your index.php file, unless you've renamed it to + * something else. If you are using mod_rewrite to remove the page set this + * variable so that it is blank. + */ + //public string $indexPage = 'index.php'; + public string $indexPage = ''; + /** + * -------------------------------------------------------------------------- + * URI PROTOCOL + * -------------------------------------------------------------------------- + * + * This item determines which server global should be used to retrieve the + * URI string. The default setting of 'REQUEST_URI' works for most servers. + * If your links do not seem to work, try one of the other delicious flavors: + * + * 'REQUEST_URI' Uses $_SERVER['REQUEST_URI'] + * 'QUERY_STRING' Uses $_SERVER['QUERY_STRING'] + * 'PATH_INFO' Uses $_SERVER['PATH_INFO'] + * + * WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded! + */ + public string $uriProtocol = 'REQUEST_URI'; + + /** + * -------------------------------------------------------------------------- + * Default Locale + * -------------------------------------------------------------------------- + * + * The Locale roughly represents the language and location that your visitor + * is viewing the site from. It affects the language strings and other + * strings (like currency markers, numbers, etc), that your program + * should run under for this request. + */ + public string $defaultLocale = 'en'; + + /** + * -------------------------------------------------------------------------- + * Negotiate Locale + * -------------------------------------------------------------------------- + * + * If true, the current Request object will automatically determine the + * language to use based on the value of the Accept-Language header. + * + * If false, no automatic detection will be performed. + */ + public bool $negotiateLocale = false; + + /** + * -------------------------------------------------------------------------- + * Supported Locales + * -------------------------------------------------------------------------- + * + * If $negotiateLocale is true, this array lists the locales supported + * by the application in descending order of priority. If no match is + * found, the first locale will be used. + * + * @var string[] + */ + public array $supportedLocales = ['en']; + + /** + * -------------------------------------------------------------------------- + * Application Timezone + * -------------------------------------------------------------------------- + * + * The default timezone that will be used in your application to display + * dates with the date helper, and can be retrieved through app_timezone() + */ + public string $appTimezone = 'UTC'; + + /** + * -------------------------------------------------------------------------- + * Default Character Set + * -------------------------------------------------------------------------- + * + * This determines which character set is used by default in various methods + * that require a character set to be provided. + * + * @see http://php.net/htmlspecialchars for a list of supported charsets. + */ + public string $charset = 'UTF-8'; + + /** + * -------------------------------------------------------------------------- + * URI PROTOCOL + * -------------------------------------------------------------------------- + * + * If true, this will force every request made to this application to be + * made via a secure connection (HTTPS). If the incoming request is not + * secure, the user will be redirected to a secure version of the page + * and the HTTP Strict Transport Security header will be set. + */ + public bool $forceGlobalSecureRequests = false; + + /** + * -------------------------------------------------------------------------- + * Session Driver + * -------------------------------------------------------------------------- + * + * The session storage driver to use: + * - `CodeIgniter\Session\Handlers\FileHandler` + * - `CodeIgniter\Session\Handlers\DatabaseHandler` + * - `CodeIgniter\Session\Handlers\MemcachedHandler` + * - `CodeIgniter\Session\Handlers\RedisHandler` + * + * @deprecated use Config\Session::$driver instead. + */ + public string $sessionDriver = FileHandler::class; + + /** + * -------------------------------------------------------------------------- + * Session Cookie Name + * -------------------------------------------------------------------------- + * + * The session cookie name, must contain only [0-9a-z_-] characters + * + * @deprecated use Config\Session::$cookieName instead. + */ + public string $sessionCookieName = 'ci_session'; + + /** + * -------------------------------------------------------------------------- + * Session Expiration + * -------------------------------------------------------------------------- + * + * The number of SECONDS you want the session to last. + * Setting to 0 (zero) means expire when the browser is closed. + * + * @deprecated use Config\Session::$expiration instead. + */ + public int $sessionExpiration = 7200; + + /** + * -------------------------------------------------------------------------- + * Session Save Path + * -------------------------------------------------------------------------- + * + * The location to save sessions to and is driver dependent. + * + * For the 'files' driver, it's a path to a writable directory. + * WARNING: Only absolute paths are supported! + * + * For the 'database' driver, it's a table name. + * Please read up the manual for the format with other session drivers. + * + * IMPORTANT: You are REQUIRED to set a valid save path! + * + * @deprecated use Config\Session::$savePath instead. + */ + public string $sessionSavePath = WRITEPATH . 'session'; + + /** + * -------------------------------------------------------------------------- + * Session Match IP + * -------------------------------------------------------------------------- + * + * Whether to match the user's IP address when reading the session data. + * + * WARNING: If you're using the database driver, don't forget to update + * your session table's PRIMARY KEY when changing this setting. + * + * @deprecated use Config\Session::$matchIP instead. + */ + public bool $sessionMatchIP = false; + + /** + * -------------------------------------------------------------------------- + * Session Time to Update + * -------------------------------------------------------------------------- + * + * How many seconds between CI regenerating the session ID. + * + * @deprecated use Config\Session::$timeToUpdate instead. + */ + public int $sessionTimeToUpdate = 300; + + /** + * -------------------------------------------------------------------------- + * Session Regenerate Destroy + * -------------------------------------------------------------------------- + * + * Whether to destroy session data associated with the old session ID + * when auto-regenerating the session ID. When set to FALSE, the data + * will be later deleted by the garbage collector. + * + * @deprecated use Config\Session::$regenerateDestroy instead. + */ + public bool $sessionRegenerateDestroy = false; + + /** + * -------------------------------------------------------------------------- + * Session Database Group + * -------------------------------------------------------------------------- + * + * DB Group for the database session. + * + * @deprecated use Config\Session::$DBGroup instead. + */ + public ?string $sessionDBGroup = null; + + /** + * -------------------------------------------------------------------------- + * Cookie Prefix + * -------------------------------------------------------------------------- + * + * Set a cookie name prefix if you need to avoid collisions. + * + * @deprecated use Config\Cookie::$prefix property instead. + */ + public string $cookiePrefix = ''; + + /** + * -------------------------------------------------------------------------- + * Cookie Domain + * -------------------------------------------------------------------------- + * + * Set to `.your-domain.com` for site-wide cookies. + * + * @deprecated use Config\Cookie::$domain property instead. + */ + public string $cookieDomain = ''; + + /** + * -------------------------------------------------------------------------- + * Cookie Path + * -------------------------------------------------------------------------- + * + * Typically will be a forward slash. + * + * @deprecated use Config\Cookie::$path property instead. + */ + public string $cookiePath = '/'; + + /** + * -------------------------------------------------------------------------- + * Cookie Secure + * -------------------------------------------------------------------------- + * + * Cookie will only be set if a secure HTTPS connection exists. + * + * @deprecated use Config\Cookie::$secure property instead. + */ + public bool $cookieSecure = false; + + /** + * -------------------------------------------------------------------------- + * Cookie HttpOnly + * -------------------------------------------------------------------------- + * + * Cookie will only be accessible via HTTP(S) (no JavaScript). + * + * @deprecated use Config\Cookie::$httponly property instead. + */ + public bool $cookieHTTPOnly = true; + + /** + * -------------------------------------------------------------------------- + * Cookie SameSite + * -------------------------------------------------------------------------- + * + * Configure cookie SameSite setting. Allowed values are: + * - None + * - Lax + * - Strict + * - '' + * + * Alternatively, you can use the constant names: + * - `Cookie::SAMESITE_NONE` + * - `Cookie::SAMESITE_LAX` + * - `Cookie::SAMESITE_STRICT` + * + * Defaults to `Lax` for compatibility with modern browsers. Setting `''` + * (empty string) means default SameSite attribute set by browsers (`Lax`) + * will be set on cookies. If set to `None`, `$cookieSecure` must also be set. + * + * @deprecated use Config\Cookie::$samesite property instead. + */ + public ?string $cookieSameSite = 'Lax'; + + /** + * -------------------------------------------------------------------------- + * Reverse Proxy IPs + * -------------------------------------------------------------------------- + * + * If your server is behind a reverse proxy, you must whitelist the proxy + * IP addresses from which CodeIgniter should trust headers such as + * X-Forwarded-For or Client-IP in order to properly identify + * the visitor's IP address. + * + * You need to set a proxy IP address or IP address with subnets and + * the HTTP header for the client IP address. + * + * Here are some examples: + * [ + * '10.0.1.200' => 'X-Forwarded-For', + * '192.168.5.0/24' => 'X-Real-IP', + * ] + * + * @var array + */ + public array $proxyIPs = []; + + /** + * -------------------------------------------------------------------------- + * CSRF Token Name + * -------------------------------------------------------------------------- + * + * The token name. + * + * @deprecated Use `Config\Security` $tokenName property instead of using this property. + */ + public string $CSRFTokenName = 'csrf_test_name'; + + /** + * -------------------------------------------------------------------------- + * CSRF Header Name + * -------------------------------------------------------------------------- + * + * The header name. + * + * @deprecated Use `Config\Security` $headerName property instead of using this property. + */ + public string $CSRFHeaderName = 'X-CSRF-TOKEN'; + + /** + * -------------------------------------------------------------------------- + * CSRF Cookie Name + * -------------------------------------------------------------------------- + * + * The cookie name. + * + * @deprecated Use `Config\Security` $cookieName property instead of using this property. + */ + public string $CSRFCookieName = 'csrf_cookie_name'; + + /** + * -------------------------------------------------------------------------- + * CSRF Expire + * -------------------------------------------------------------------------- + * + * The number in seconds the token should expire. + * + * @deprecated Use `Config\Security` $expire property instead of using this property. + */ + public int $CSRFExpire = 7200; + + /** + * -------------------------------------------------------------------------- + * CSRF Regenerate + * -------------------------------------------------------------------------- + * + * Regenerate token on every submission? + * + * @deprecated Use `Config\Security` $regenerate property instead of using this property. + */ + public bool $CSRFRegenerate = true; + + /** + * -------------------------------------------------------------------------- + * CSRF Redirect + * -------------------------------------------------------------------------- + * + * Redirect to previous page with error on failure? + * + * @deprecated Use `Config\Security` $redirect property instead of using this property. + */ + public bool $CSRFRedirect = false; + + /** + * -------------------------------------------------------------------------- + * CSRF SameSite + * -------------------------------------------------------------------------- + * + * Setting for CSRF SameSite cookie token. Allowed values are: + * - None + * - Lax + * - Strict + * - '' + * + * Defaults to `Lax` as recommended in this link: + * + * @see https://portswigger.net/web-security/csrf/samesite-cookies + * + * @deprecated `Config\Cookie` $samesite property is used. + */ + public string $CSRFSameSite = 'Lax'; + + /** + * -------------------------------------------------------------------------- + * Content Security Policy + * -------------------------------------------------------------------------- + * + * Enables the Response's Content Secure Policy to restrict the sources that + * can be used for images, scripts, CSS files, audio, video, etc. If enabled, + * the Response object will populate default values for the policy from the + * `ContentSecurityPolicy.php` file. Controllers can always add to those + * restrictions at run time. + * + * For a better understanding of CSP, see these documents: + * + * @see http://www.html5rocks.com/en/tutorials/security/content-security-policy/ + * @see http://www.w3.org/TR/CSP/ + */ + public bool $CSPEnabled = false; +} diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php new file mode 100644 index 0000000..abd9df9 --- /dev/null +++ b/app/Config/Autoload.php @@ -0,0 +1,97 @@ + SYSTEMPATH, + * 'App' => APPPATH + * ]; + * + * @var array|string> + * @phpstan-var array> + */ + public $psr4 = [ + APP_NAMESPACE => APPPATH, // For custom app namespace + 'Config' => APPPATH . 'Config', + ]; + + /** + * ------------------------------------------------------------------- + * Class Map + * ------------------------------------------------------------------- + * The class map provides a map of class names and their exact + * location on the drive. Classes loaded in this manner will have + * slightly faster performance because they will not have to be + * searched for within one or more directories as they would if they + * were being autoloaded through a namespace. + * + * Prototype: + * $classmap = [ + * 'MyClass' => '/path/to/class/file.php' + * ]; + * + * @var array + */ + public $classmap = []; + + /** + * ------------------------------------------------------------------- + * Files + * ------------------------------------------------------------------- + * The files array provides a list of paths to __non-class__ files + * that will be autoloaded. This can be useful for bootstrap operations + * or for loading functions. + * + * Prototype: + * $files = [ + * '/path/to/my/file.php', + * ]; + * + * @var string[] + * @phpstan-var list + */ + public $files = []; + + /** + * ------------------------------------------------------------------- + * Helpers + * ------------------------------------------------------------------- + * Prototype: + * $helpers = [ + * 'form', + * ]; + * + * @var string[] + * @phpstan-var list + */ + public $helpers = []; +} diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php new file mode 100644 index 0000000..05a8612 --- /dev/null +++ b/app/Config/Boot/development.php @@ -0,0 +1,32 @@ + + */ + public array $file = [ + 'storePath' => 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 + */ + 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 + */ + 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, + ]; +} diff --git a/app/Config/Constants.php b/app/Config/Constants.php new file mode 100644 index 0000000..f9d6a3e --- /dev/null +++ b/app/Config/Constants.php @@ -0,0 +1,303 @@ + [ + 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty', + 'stylesheets' => [ + '', + '', + '', + ], + 'javascripts' => [ + '', + ] + ], + 'front' => [ + 'title' => '사용자화면', + 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front', + 'menus' => ['aboutus', 'hosting', 'service', 'support'], + 'stylesheets' => [ + '', + '', + '', + '', + '', + '', + '', + '', + ], + 'javascripts' => [ + '', + '', + '', + '', + '', + ], + ], + 'admin' => [ + 'title' => '관리자화면', + 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', + 'stylesheets' => [ + '', + '', + '', + '', + '', + '', + '', + '', + ], + 'javascripts' => [ + '', + '', + '', + '', + '', + ] + ], +]); + +//URL +define('URLS', [ + 'LOGIN' => '/front/user/login', + 'SIGNUP' => '/front/user/signup', + 'LOGOUT' => '/front/user/logout', + 'Order' => '/front/order', + 'addCart' => '/front/order/addCart', + 'cancelCart' => '/front/order/cancelCart', + 'Billing' => '/front/billing', + 'card' => '/front/billing/card', + 'deposit' => '/front/billing/deposit', +]); +//SESSION 관련 +define('SESSION_NAMES', [ + 'RETURN_URL' => "return_url", + 'ISLOGIN' => "islogined", + 'AUTH' => 'auth', + 'CART' => 'cart' +]); +define('AUTH_FIELDS', ['ID' => 'id', 'TITLE' => 'title', 'ROLE' => 'role']); +//월이용권 상품의 Category번호 +define('RENTAL_PRODUCT_CATEGORYS', [5, 8]); +//인증 관련 +define('AUTH_ADAPTERS', [ + 'Local' => [ + 'DEBUG' => getenv("auth.loca.debug") ?: false, + ], + 'Google' => [ + 'DEBUG' => getenv("auth.google.debug") ?: false, + 'ICON' => getenv("auth.google.icon") ?: '', + 'CLIENT_ID' => getenv("auth.google.client.id"), + 'CLIENT_KEY' => getenv("auth.google.client.key"), + 'CALLBACK_URL' => getenv("auth.google.client.callback_url"), + 'TOKEN_NAME' => getenv('auth.google.client.token_name') ?: "access_token", + ], +]); + +define("MALLS", [ + "support" => getenv("mall.support") ?: "support@idcjp.jp", + "master" => getenv("mall.master") ?: "master@idcjp.jp", + "title" => getenv("mall.title") ?: "Mall Master", + 'card' => getenv("mall.card") ?: "TEST", + 'payments' => [ + 'CookiePayment' => [ + 'token_url' => getenv("mall.payment.pay2pay.token_url") ?: "{TOKEN 발행 URL}", + 'token_id' => getenv("mall.payment.pay2pay.id") ?: 'cookiepayments에서 발급받은 ID', + 'token_key' => getenv("mall.payment.pay2pay.key") ?: 'cookiepayments에서 발급받은 연동키', + 'api_key' => getenv("mall.payment.pay2pay.apikey") ?: "COOKIEPAY에서 발급받은 연동키", + 'api_url' => getenv("mall.payment.pay2pay.url") ?: "{요청도메인}/keyin/payment", + ], + ], + "banks" => [ + 'BANK1' => [ + "name" => getenv("mall.bank.ibk.name") ?: "기업은행", + "account" => getenv("mall.bank.ibk.account") ?: "525-05694804-012", + "holder" => getenv("mall.bank.ibk.holder") ?: "주식회사 르호봇" + ], + 'BANK2' => [ + "name" => getenv("mall.bank.kookmin.name") ?: "우리은행", + "account" => getenv("mall.bank.kookmin.account") ?: "1005-503-404205", + "holder" => getenv("mall.bank.kookmin.holder") ?: "주식회사 르호봇" + ], + ], +]); + +//Upload , Download 관련 +define('PATHS', [ + 'EXCEL' => WRITEPATH . "excel/", + 'BILLING' => WRITEPATH . "billing/", + 'UPLOAD' => WRITEPATH . "uploads/", + 'UPLOAD_IMAGE' => FCPATH . 'upload_images/', + 'DOWNLOAD' => WRITEPATH . "download/", + 'API' => WRITEPATH . "api/", +]); +foreach (PATHS as $key => $path) { + if (!is_dir($path)) { + mkdir($path, 0755); + } +} + +//아이콘 및 Sound관련 +define('ICONS', [ + 'LOGIN' => '', + 'LOGOUT' => '', + 'LOCK' => '', + 'NEW' => '', + 'REPLY' => '', + 'DELETE' => '', + 'RELOAD' => '', + 'SETUP' => '', + 'FLAG' => '', + 'SEARCH' => '', + 'EXCEL' => '', + 'HOME' => '', + 'PLAY' => '', + 'CART' => '', + 'CARD' => '', + 'DEPOSIT' => '', + 'UP' => '', + 'DOWN' => '', + 'LEFT' => '', + 'RIGHT' => '', + 'IMAGE_FILE' => '', +]); +define('CLASS_ICONS', [ + 'USER' => '', + 'USERSNS' => '', + 'BOARD' => '', + 'SITEPAGE' => '', + 'CATEGORY' => '', + 'PRODUCT' => '', + 'ORDER' => '', + 'BILLING' => '', + 'CART' => '', + 'CARD' => '', + 'DEPOSIT' => '', +]); +define('CLASS_TOP_BANNER', [ + 'USER' => '', + 'USERSNS' => '', + 'ORDER' => '', + 'BILLING' => '', + 'CARD' => '', + 'DEPOSIT' => '', + 'PRODUCT' => '', + 'SITEPAGE' => '', + 'BOARD' => '', +]); +define('AUDIOS', [ + 'Alram_GetEmail' => '', +]); + +//Default값 정의 +define('DEFAULTS', [ + 'CATEGORY_USER' => getenv('default.category.user') ?: 22, + 'CATEGORY_ORDER' => getenv('default.category.order') ?: 11, + 'CATEGORY_BILLING' => getenv('default.category.billing') ?: 28, + 'ROLE' => getenv('default.role') ?: "guest", + 'STATUS' => getenv('default.status') ?: "use", + 'EMPTY' => getenv('default.empty') ?: "", + 'PERPAGE' => getenv('default.perpage') ?: 20, + 'DELIMITER_FILE' => getenv('default.delimiter.file') ?: "||", + 'DELIMITER_ROLE' => getenv('default.delimiter.role') ?: ",", +]); + +//API Adapter초기갑 정의 +define('API', [ + 'SSL_VERIFY' => getenv('api.ssl') == 'true' ? true : false, + 'COOKIE_FILE' => PATHS['API'] . getenv('api.cookie.file') ?: "api-cookie_" . date("Ymd") . ".log", + 'DEBUG_FILE' => PATHS['API'] . getenv('api.debug.file') ?: "api-debug_" . date("Ymd") . ".log", +]); diff --git a/app/Config/ContentSecurityPolicy.php b/app/Config/ContentSecurityPolicy.php new file mode 100644 index 0000000..18612e1 --- /dev/null +++ b/app/Config/ContentSecurityPolicy.php @@ -0,0 +1,176 @@ +` element. + * + * Will default to self if not overridden + * + * @var string|string[]|null + */ + public $baseURI; + + /** + * Lists the URLs for workers and embedded frame contents + * + * @var string|string[] + */ + public $childSrc = 'self'; + + /** + * Limits the origins that you can connect to (via XHR, + * WebSockets, and EventSource). + * + * @var string|string[] + */ + public $connectSrc = 'self'; + + /** + * Specifies the origins that can serve web fonts. + * + * @var string|string[] + */ + public $fontSrc; + + /** + * Lists valid endpoints for submission from `
` tags. + * + * @var string|string[] + */ + public $formAction = 'self'; + + /** + * Specifies the sources that can embed the current page. + * This directive applies to ``, `