From f2457ea0e84ec425557fc30bc75c436b1d2ad2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Wed, 15 May 2024 16:30:58 +0900 Subject: [PATCH] vhost init...3 --- app/Cells/BoardCell.php | 2 +- app/Config/Constants.php | 1 + app/Config/Routes.php | 12 ++ app/Controllers/Admin/BoardController.php | 18 +- app/Controllers/Admin/DeviceController.php | 47 +++++ app/Controllers/Admin/SitepageController.php | 8 +- app/Database/base.sql | 15 +- app/Database/vhost-20240515.sql | Bin 0 -> 76484 bytes app/Entities/DeviceEntity.php | 17 ++ app/Helpers/Board_helper.php | 1 + app/Helpers/Device_helper.php | 163 ++++++++++++++++++ app/Helpers/Sitepage_helper.php | 1 + app/Language/ko/Board.php | 6 +- app/Language/ko/Device.php | 36 ++++ app/Language/ko/Product.php | 3 +- app/Language/ko/Sitepage.php | 9 +- app/Models/BoardModel.php | 4 +- app/Models/DeviceModel.php | 82 +++++++++ app/Models/ProductModel.php | 1 + app/Models/SitepageModel.php | 4 +- app/Views/admin/device/index.php | 48 ++++++ app/Views/admin/device/insert.php | 24 +++ app/Views/admin/device/update.php | 24 +++ app/Views/admin/device/view.php | 19 ++ .../layouts/admin/left_menu/shoppingmall.php | 3 + 25 files changed, 518 insertions(+), 30 deletions(-) create mode 100644 app/Controllers/Admin/DeviceController.php create mode 100644 app/Database/vhost-20240515.sql create mode 100644 app/Entities/DeviceEntity.php create mode 100644 app/Helpers/Device_helper.php create mode 100644 app/Language/ko/Device.php create mode 100644 app/Models/DeviceModel.php create mode 100644 app/Views/admin/device/index.php create mode 100644 app/Views/admin/device/insert.php create mode 100644 app/Views/admin/device/update.php create mode 100644 app/Views/admin/device/view.php diff --git a/app/Cells/BoardCell.php b/app/Cells/BoardCell.php index 7bba4ee..e20ec0a 100644 --- a/app/Cells/BoardCell.php +++ b/app/Cells/BoardCell.php @@ -18,7 +18,7 @@ class BoardCell extends BaseCell $viewDatas['currentCategory'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => __FUNCTION__]); $viewDatas['cellDatas'] = array(); $viewDatas['cellDatas']['entitys'] = $this->getBoardModel()->getEntitys([ - 'category_uid' => __FUNCTION__ + 'category' => __FUNCTION__ ]); return view( 'Views/front/board/cell/' . __FUNCTION__, diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 97b7787..18c2b5f 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -238,6 +238,7 @@ define('CLASS_ICONS', [ 'SITEPAGE' => '', 'CATEGORY' => '', 'PRODUCT' => '', + 'DEVICE' => '', 'ORDER' => '', 'BILLING' => '', 'CART' => '', diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 4bc1331..c8c4912 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -103,6 +103,18 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->get('toggle/(:num)/(:hash)', 'SitepageController::toggle/$1/$2'); $routes->post('batchjob', 'SitepageController::batchjob'); }); + $routes->group('device', static function ($routes) { + $routes->get('', 'DeviceController::index'); + $routes->get('excel', 'DeviceController::excel'); + $routes->get('insert', 'DeviceController::insert_form'); + $routes->post('insert', 'DeviceController::insert'); + $routes->get('update/(:uuid)', 'DeviceController::update_form/$1'); + $routes->post('update/(:uuid)', 'DeviceController::update/$1'); + $routes->get('view/(:uuid)', 'DeviceController::view/$1'); + $routes->get('delete/(:uuid)', 'DeviceController::delete/$1', ['filter' => 'authFilter:master']); + $routes->get('toggle/(:uuid)/(:hash)', 'DeviceController::toggle/$1/$2'); + $routes->post('batchjob', 'DeviceController::batchjob'); + }); $routes->group('product', static function ($routes) { $routes->get('', 'ProductController::index'); $routes->get('excel', 'ProductController::excel'); diff --git a/app/Controllers/Admin/BoardController.php b/app/Controllers/Admin/BoardController.php index dfe7d1d..758bccf 100644 --- a/app/Controllers/Admin/BoardController.php +++ b/app/Controllers/Admin/BoardController.php @@ -25,14 +25,14 @@ class BoardController extends AdminController public function getFields(string $action = ""): array { - $fields = ["category_uid", 'title', "board_file", "passwd", "status", "content"]; + $fields = ["category", 'title', "board_file", "passwd", "status", "content"]; switch ($action) { case "index": case "excel": - return ["category_uid", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at"]; + return ["category", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at"]; break; case "view": - return ["category_uid", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at", "content"]; + return ["category", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at", "content"]; break; default: return $fields; @@ -41,7 +41,7 @@ class BoardController extends AdminController } public function getFieldFilters(): array { - return ["category_uid", "user_uid", "status"]; + return ["category", "user_uid", "status"]; } public function getFieldBatchFilters(): array { @@ -66,7 +66,7 @@ class BoardController extends AdminController private function build_notice() { - $entitys = $this->_model->getEntitys(['category_uid' => $this->_category_notice, 'status' => DEFAULTS['STATUS']]); + $entitys = $this->_model->getEntitys(['category' => $this->_category_notice, 'status' => DEFAULTS['STATUS']]); $temps = array("