From d711bfc01af21f4a4f58d93b6a6525cb618cc7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Thu, 3 Aug 2023 18:49:41 +0900 Subject: [PATCH] shoppingmall init... --- app/Config/Routes.php | 12 +-- app/Config/Routes_Shoppinmall.php | 8 +- app/Controllers/Front/UserController.php | 84 +++++++++++++++++++++ app/Views/front/user/index.php | 45 +++++++++++ app/Views/front/user/update.php | 21 ++++++ app/Views/front/user/view.php | 16 ++++ app/Views/layouts/admin/left_menu.php | 1 - public/css/front/top_banner.css | 56 ++++++++++++++ public/css/front/welcome_left_banner.css | 25 ++++++ public/css/front/welcome_partner_banner.css | 41 ++++++++++ public/css/front/zeta-menu.css | 54 +++++++++++++ 11 files changed, 352 insertions(+), 11 deletions(-) create mode 100644 app/Controllers/Front/UserController.php create mode 100644 app/Views/front/user/index.php create mode 100644 app/Views/front/user/update.php create mode 100644 app/Views/front/user/view.php create mode 100644 public/css/front/top_banner.css create mode 100644 public/css/front/welcome_left_banner.css create mode 100644 public/css/front/welcome_partner_banner.css create mode 100644 public/css/front/zeta-menu.css diff --git a/app/Config/Routes.php b/app/Config/Routes.php index de3f432..a517beb 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -46,7 +46,7 @@ $routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function $routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) { }); // authGuard는 App\Config\Filters.php의 $aliases에 선언한 이름이어야 함 -$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], static function ($routes) { +$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:master,director,cloudflare,manager'], static function ($routes) { $routes->get('/', 'Home::index'); $routes->group('user', static function ($routes) { $routes->get('', 'UserController::index'); @@ -93,7 +93,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->get('delete/(:num)', 'BoardController::delete/$1', ['filter' => 'authFilter:master']); $routes->get('toggle/(:num)/(:hash)', 'BoardController::toggle/$1/$2'); $routes->post('batchjob', 'BoardController::batchjob'); - $routes->get('download/(:any)/(:uuid)', 'ProductController::download/$1/$2'); + $routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2'); }); $routes->group('category', static function ($routes) { $routes->get('', 'CategoryController::index'); @@ -132,9 +132,9 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au }); $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) { $routes->group('user', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) { - $routes->get('update', 'UserController::update_form'); - $routes->post('update', 'UserController::update'); - $routes->get('view', 'UserController::view'); + $routes->get('update/(:uuid)', 'UserController::update_form/$1'); + $routes->post('update/(:uuid)', 'UserController::update/R1'); + $routes->get('view/(:uuid)', 'UserController::view/$1'); }); $routes->group('board', static function ($routes) { $routes->get('', 'BoardController::index'); @@ -157,7 +157,7 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou $routes->group('order', static function ($routes) { $routes->get('', 'OrderController::index'); $routes->get('view/(:uuid)', 'OrderController::view/$1'); - });; + }); }); /* * -------------------------------------------------------------------- diff --git a/app/Config/Routes_Shoppinmall.php b/app/Config/Routes_Shoppinmall.php index d3994be..a517beb 100644 --- a/app/Config/Routes_Shoppinmall.php +++ b/app/Config/Routes_Shoppinmall.php @@ -132,9 +132,9 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au }); $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) { $routes->group('user', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) { - $routes->get('update', 'UserController::update_form'); - $routes->post('update', 'UserController::update'); - $routes->get('view', 'UserController::view'); + $routes->get('update/(:uuid)', 'UserController::update_form/$1'); + $routes->post('update/(:uuid)', 'UserController::update/R1'); + $routes->get('view/(:uuid)', 'UserController::view/$1'); }); $routes->group('board', static function ($routes) { $routes->get('', 'BoardController::index'); @@ -157,7 +157,7 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou $routes->group('order', static function ($routes) { $routes->get('', 'OrderController::index'); $routes->get('view/(:uuid)', 'OrderController::view/$1'); - });; + }); }); /* * -------------------------------------------------------------------- diff --git a/app/Controllers/Front/UserController.php b/app/Controllers/Front/UserController.php new file mode 100644 index 0000000..17f52fa --- /dev/null +++ b/app/Controllers/Front/UserController.php @@ -0,0 +1,84 @@ +_model = new UserModel(); + parent::initController($request, $response, $logger); + $this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title'); + $this->_viewPath .= strtolower($this->_model->getClassName()); + helper($this->_model->getClassName()); + } + + //Field별 Form Datas 처리용 + protected function getFieldFormData(string $field, $entity = null): array + { + switch ($field) { + case 'passwd': + $this->_viewDatas['fieldDatas'][$field] = $this->request->getVar($field); + $this->_viewDatas['fieldDatas']['confirmpassword'] = $this->request->getVar('confirmpassword'); + break; + default: + return parent::getFieldFormData($field, $entity); + break; + } + return $this->_viewDatas['fieldDatas']; + } + + public function getFields(string $action = ""): array + { + $fields = ["id", "passwd", 'name', "email", "role", "status"]; + switch ($action) { + case "index": + case "excel": + return ["id", 'name', "email", "role", "status", 'created_at']; + break; + case "view": + return ["id", 'name', "email", "role", "status", 'updated_at', 'created_at']; + break; + default: + return $fields; + break; + } + } + public function getFieldFilters(): array + { + return ["role", "status"]; + } + public function getFieldBatchFilters(): array + { + return parent::getFieldBatchFilters(); + } + + protected function insert_validate() + { + $rules = []; + foreach ($this->_viewDatas['fieldRules'] as $field => $rule) { + switch ($field) { + case 'role': + $rules[$field . '.*'] = $rule; + break; + default: + $rules[$field] = $rule; + break; + } + } + //fieldData Rule 검사 + if (!$this->validate($rules)) { + throw new \Exception("{$this->_viewDatas['title']}의 검증 오류발생\n" . implode("\n", $this->validator->getErrors())); + } + //fieldData 적용 + $this->_viewDatas['fieldDatas'] = array(); + foreach ($this->_viewDatas['fields'] as $field) { + $this->_viewDatas['fieldDatas'] = $this->getFieldFormData($field); + } + } +} diff --git a/app/Views/front/user/index.php b/app/Views/front/user/index.php new file mode 100644 index 0000000..57e6a6a --- /dev/null +++ b/app/Views/front/user/index.php @@ -0,0 +1,45 @@ +extend('layouts/admin') ?> +section('content') ?> +
+
+ "get")) ?> + + +
+ + + + + + + + + + getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);"> + + + + + + + + +
번호작업
+ "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?> + getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?> + getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
+
+ + +
+ +
+endSection() ?> \ No newline at end of file diff --git a/app/Views/front/user/update.php b/app/Views/front/user/update.php new file mode 100644 index 0000000..f83e3b3 --- /dev/null +++ b/app/Views/front/user/update.php @@ -0,0 +1,21 @@ +extend('layouts/admin') ?> +section('content') ?> +
+ + + + + + + + + + + +
+ $field), $fieldFormOptions) ?> + +
"btn btn-outline btn-primary")); ?>
+
+ +endSection() ?> \ No newline at end of file diff --git a/app/Views/front/user/view.php b/app/Views/front/user/view.php new file mode 100644 index 0000000..a812e5d --- /dev/null +++ b/app/Views/front/user/view.php @@ -0,0 +1,16 @@ +extend('layouts/admin') ?> +section('content') ?> +
+ + + + + + + +
+ + +
+
+endSection() ?> \ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu.php b/app/Views/layouts/admin/left_menu.php index 7ebd6ca..03a3677 100644 --- a/app/Views/layouts/admin/left_menu.php +++ b/app/Views/layouts/admin/left_menu.php @@ -5,6 +5,5 @@
include($layout['path'] . '/left_menu/base'); ?> include($layout['path'] . '/left_menu/board'); ?> - include($layout['path'] . '/left_menu/shoppingmall'); ?>
\ No newline at end of file diff --git a/public/css/front/top_banner.css b/public/css/front/top_banner.css new file mode 100644 index 0000000..6ee3e95 --- /dev/null +++ b/public/css/front/top_banner.css @@ -0,0 +1,56 @@ +@CHARSET "UTF-8"; + +/* jssor slider bullet navigator skin 05 css */ +/* +.jssorb05 div (normal) +.jssorb05 div:hover (normal mouseover) +.jssorb05 .av (active) +.jssorb05 .av:hover (active mouseover) +.jssorb05 .dn (mousedown) +*/ +.jssorb05 { + position: absolute; +} +.jssorb05 div, .jssorb05 div:hover, .jssorb05 .av { + position: absolute; + /* size of bullet elment */ + width: 16px; + height: 16px; + background: url('/js/slider/img/b05.png') no-repeat; + overflow: hidden; + cursor: pointer; +} +.jssorb05 div { background-position: -7px -7px; } +.jssorb05 div:hover, .jssorb05 .av:hover { background-position: -37px -7px; } +.jssorb05 .av { background-position: -67px -7px; } +.jssorb05 .dn, .jssorb05 .dn:hover { background-position: -97px -7px; } + +/* jssor slider arrow navigator skin 22 css */ +/* +.jssora22l (normal) +.jssora22r (normal) +.jssora22l:hover (normal mouseover) +.jssora22r:hover (normal mouseover) +.jssora22l.jssora22ldn (mousedown) +.jssora22r.jssora22rdn (mousedown) +.jssora22l.jssora22lds (disabled) +.jssora22r.jssora22rds (disabled) +*/ +.jssora22l, .jssora22r { + display: block; + position: absolute; + /* size of arrow element */ + width: 40px; + height: 58px; + cursor: pointer; + background: url('/js/slider/img/a22.png') center center no-repeat; + overflow: hidden; +} +.jssora22l { background-position: -10px -31px; } +.jssora22r { background-position: -70px -31px; } +.jssora22l:hover { background-position: -130px -31px; } +.jssora22r:hover { background-position: -190px -31px; } +.jssora22l.jssora22ldn { background-position: -250px -31px; } +.jssora22r.jssora22rdn { background-position: -310px -31px; } +.jssora22l.jssora22lds { background-position: -10px -31px; opacity: .3; pointer-events: none; } +.jssora22r.jssora22rds { background-position: -70px -31px; opacity: .3; pointer-events: none; } \ No newline at end of file diff --git a/public/css/front/welcome_left_banner.css b/public/css/front/welcome_left_banner.css new file mode 100644 index 0000000..f2819aa --- /dev/null +++ b/public/css/front/welcome_left_banner.css @@ -0,0 +1,25 @@ +@CHARSET "UTF-8"; +div#left_menu_slideshow { + position: relative; + width: 352px; + height: 296px; +} + +div#left_menu_slideshow > div { + top:9px; + left:53px; + position: absolute; +} + + +/*npy-scorecount.js용*/ +#event_alarm { position:relative; width:100%; max-width:1081px; } +#event_alarm .npy-scwrap { position:absolute !important; top:0; left:0; width:100%; height:100%; } +#event_alarm .npy-scdigit { position:absolute !important; top:24.95%; } +#event_alarm .npy-scdigit._0 { left:18.36%; } +#event_alarm .npy-scdigit._1 { left:28.12%; } +#event_alarm .npy-scdigit._2 { left:40.53%; } +#event_alarm .npy-scdigit._3 { left:50.35%; } +#event_alarm .npy-scdigit._4 { left:62.72%; } +#event_alarm .npy-scdigit._5 { left:72.53%; } +/*npy-scorecount.js용*/ \ No newline at end of file diff --git a/public/css/front/welcome_partner_banner.css b/public/css/front/welcome_partner_banner.css new file mode 100644 index 0000000..5591fc3 --- /dev/null +++ b/public/css/front/welcome_partner_banner.css @@ -0,0 +1,41 @@ +@CHARSET "UTF-8"; +.partner_banner{ + position:relative; + //border:1px solid red; + margin:0 auto; + width:1165px; +} +.partner_banner > .RollDiv{ + margin:0 auto; + width:1165px; + height:60px; + overflow:hidden; +} +.partner_banner > .RollDiv > div{ + overflow:hidden; + height:60px; + width:1200px} +.partner_banner > .RollDiv > div > a{ + float:left; + display:block; +} +.partner_banner > .RollDiv > div > a > img{ + width:180px; + height:60px; + margin-right:10px; +} +.partner_banner > .btn_left{ + position:absolute; + left:0; + top:0; + background:blue; + height:100%; + width:25px; +} +.partner_banner > .btn_right{ + position:absolute; + right:0;top:0; + background:blue; + height:100%; + width:25px; +} \ No newline at end of file diff --git a/public/css/front/zeta-menu.css b/public/css/front/zeta-menu.css new file mode 100644 index 0000000..8e1fdae --- /dev/null +++ b/public/css/front/zeta-menu.css @@ -0,0 +1,54 @@ +@CHARSET "UTF-8"; + +.zeta-menu-bar { + position:relative; + z-index:100; + background: #eee; + display: inline-block; + width: 100%; + + /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#efefef+7,c8c8c8+56,c3c3c3+58,c3c3c3+58,c8c8c8+72,c8c8c8+75,c8c8c8+75,dadada+100 */ + background: rgb(239,239,239); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(239,239,239,1) 7%, rgba(200,200,200,1) 56%, rgba(195,195,195,1) 58%, rgba(195,195,195,1) 58%, rgba(200,200,200,1) 72%, rgba(200,200,200,1) 75%, rgba(200,200,200,1) 75%, rgba(218,218,218,1) 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(top, rgba(239,239,239,1) 7%,rgba(200,200,200,1) 56%,rgba(195,195,195,1) 58%,rgba(195,195,195,1) 58%,rgba(200,200,200,1) 72%,rgba(200,200,200,1) 75%,rgba(200,200,200,1) 75%,rgba(218,218,218,1) 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to bottom, rgba(239,239,239,1) 7%,rgba(200,200,200,1) 56%,rgba(195,195,195,1) 58%,rgba(195,195,195,1) 58%,rgba(200,200,200,1) 72%,rgba(200,200,200,1) 75%,rgba(200,200,200,1) 75%,rgba(218,218,218,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#dadada',GradientType=0 ); +} +.zeta-menu { margin: 0px; padding: 0px; } +.zeta-menu li { + float: left; + list-style:none; + position: relative; +} +.zeta-menu li:hover { background: #ddd; } +.zeta-menu li:hover>a { color: black; } +.zeta-menu a { + color: black; + display: block; + padding: 10px 20px; + text-decoration: none; +} +.zeta-menu ul { + background: #eee; + border: 1px solid silver; + display: none; + padding: 0px; + position: absolute; + left: 0px; + top: 100%; + width: 180px; +} +.zeta-menu ul li { + float: none; + /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#efefef+7,c8c8c8+56,c3c3c3+58,c3c3c3+58,c8c8c8+72,c8c8c8+75,c8c8c8+75,dadada+100 */ + background: rgb(239,239,239); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(239,239,239,1) 7%, rgba(200,200,200,1) 56%, rgba(195,195,195,1) 58%, rgba(195,195,195,1) 58%, rgba(200,200,200,1) 72%, rgba(200,200,200,1) 75%, rgba(200,200,200,1) 75%, rgba(218,218,218,1) 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(top, rgba(239,239,239,1) 7%,rgba(200,200,200,1) 56%,rgba(195,195,195,1) 58%,rgba(195,195,195,1) 58%,rgba(200,200,200,1) 72%,rgba(200,200,200,1) 75%,rgba(200,200,200,1) 75%,rgba(218,218,218,1) 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to bottom, rgba(239,239,239,1) 7%,rgba(200,200,200,1) 56%,rgba(195,195,195,1) 58%,rgba(195,195,195,1) 58%,rgba(200,200,200,1) 72%,rgba(200,200,200,1) 75%,rgba(200,200,200,1) 75%,rgba(218,218,218,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#dadada',GradientType=0 ); +} +.zeta-menu ul li:hover { background: #ddd; } +.zeta-menu ul li:hover a { color: black; } +.zeta-menu ul a { color: black; } +.zeta-menu ul ul { left: 100%; top: 0; } +.zeta-menu ul ul li {float:left; margin-right:10px;} \ No newline at end of file