diff --git a/app/Controllers/Admin/BoardController.php b/app/Controllers/Admin/BoardController.php index 86d5791..961c629 100644 --- a/app/Controllers/Admin/BoardController.php +++ b/app/Controllers/Admin/BoardController.php @@ -51,7 +51,10 @@ class BoardController extends AdminController $this->_viewDatas['fieldDatas']['confirmpassword'] = $this->request->getVar('confirmpassword'); break; case 'board_file': - $this->_viewDatas['fieldDatas'][$field] = $this->upload_file_procedure($field); + $file = $this->upload_file_procedure($field); + if (!is_null($file)) { + $this->_viewDatas['fieldDatas'][$field] = $file; + } break; default: return parent::getFieldFormData($field, $entity); diff --git a/app/Controllers/Admin/CategoryController.php b/app/Controllers/Admin/CategoryController.php index ebdad7e..33726d5 100644 --- a/app/Controllers/Admin/CategoryController.php +++ b/app/Controllers/Admin/CategoryController.php @@ -53,7 +53,10 @@ class CategoryController extends AdminController { switch ($field) { case 'photo': - $this->_viewDatas['fieldDatas'][$field] = $this->upload_image_procedure($field); + $file = $this->upload_image_procedure($field); + if (!is_null($file)) { + $this->_viewDatas['fieldDatas'][$field] = $file; + } break; default: return parent::getFieldFormData($field, $entity); diff --git a/app/Controllers/Admin/ProductController.php b/app/Controllers/Admin/ProductController.php index 1f0b5d7..afe2d16 100644 --- a/app/Controllers/Admin/ProductController.php +++ b/app/Controllers/Admin/ProductController.php @@ -47,7 +47,10 @@ class ProductController extends AdminController { switch ($field) { case 'photo': - $this->_viewDatas['fieldDatas'][$field] = $this->upload_image_procedure($field); + $file = $this->upload_image_procedure($field); + if (!is_null($file)) { + $this->_viewDatas['fieldDatas'][$field] = $file; + } break; default: return parent::getFieldFormData($field, $entity); diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index 198829e..ad861d1 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -206,13 +206,6 @@ abstract class BaseController extends Controller $this->_viewDatas['fieldDatas'] = array(); foreach ($this->_viewDatas['fields'] as $field) { $this->_viewDatas['fieldDatas'] = $this->getFieldFormData($field, $entity); - //보안문제,사용자정보의 update시 암호를 변경하지 않느경우를 위해 - if ($field != 'passwd') { - log_message( - "info", - "{$field} : {$entity->$field} => " . var_export($this->_viewDatas['fieldDatas'][$field]) - ); - } } } protected function update_process($entity) diff --git a/app/Controllers/Trait/UpDownloadTrait.php b/app/Controllers/Trait/UpDownloadTrait.php index 982265d..5f86958 100644 --- a/app/Controllers/Trait/UpDownloadTrait.php +++ b/app/Controllers/Trait/UpDownloadTrait.php @@ -7,7 +7,7 @@ use CodeIgniter\HTTP\Files\UploadedFile; trait UpDownloadTrait { //Upload FIle관련 - private function upDownload_file_process(UploadedFile $upfile): string + private function upDownload_file_process(UploadedFile $upfile): ?string { $filename = null; $uploaded_filename = null; @@ -17,10 +17,12 @@ trait UpDownloadTrait $upfile->move(PATHS['UPLOAD'], $uploaded_filename); //move시 중복된파일명이 있다면 파일명이 바뀌므로 여기서 한번더 파일명 확인 필요 $uploaded_filename = $upfile->getName(); + } else { + return null; } return $filename . DEFAULTS['DELIMITER_FILE'] . $uploaded_filename; } - public function upload_file_procedure(string $field): string + public function upload_file_procedure(string $field): ?string { return $this->upload_file_process($this->request->getFile($field)); } @@ -32,7 +34,10 @@ trait UpDownloadTrait if ($upfiles = $this->request->getFiles()) { foreach ($upfiles[$field] as $upfile) { if ($upfile->isValid() && !$upfile->hasMoved()) { - array_push($files, $this->upload_file_process($upfile)); + $file = $this->upload_file_process($upfile); + if (!is_null($file)) { + array_push($files, $file); + } } } } @@ -46,7 +51,7 @@ trait UpDownloadTrait ->resize($x, $y, true, 'height') ->save(PATHS['UPLOAD_IMAGE'] . $uploaded_filename); } - private function upload_image_process(UploadedFile $upfile): string + private function upload_image_process(UploadedFile $upfile): ?string { //참고:https://www.positronx.io/codeigniter-resize-image-with-image-manipulation-tutorial/ $filename = null; @@ -60,11 +65,13 @@ trait UpDownloadTrait $upfile->move(PATHS['UPLOAD_IMAGE'], $uploaded_filename); //move시 중복된파일명이 있다면 파일명이 바뀌므로 여기서 한번더 파일명 확인 필요 $uploaded_filename = $upfile->getName(); + } else { + return null; } return $filename . DEFAULTS['DELIMITER_FILE'] . $uploaded_filename; } - public function upload_image_procedure(string $field): string + public function upload_image_procedure(string $field): ?string { return $this->upload_image_process($this->request->getFile($field)); } @@ -76,7 +83,10 @@ trait UpDownloadTrait if ($upfiles = $this->request->getFiles()) { foreach ($upfiles[$field] as $upfile) { if ($upfile->isValid() && !$upfile->hasMoved()) { - array_push($files, $this->upload_image_process($upfile)); + $file = $this->upload_image_process($upfile); + if (!is_null($file)) { + array_push($files, $file); + } } } } diff --git a/app/Views/front/board/insert.php b/app/Views/front/board/insert.php index 682524b..90e6465 100644 --- a/app/Views/front/board/insert.php +++ b/app/Views/front/board/insert.php @@ -1,6 +1,7 @@ extend('layouts/front') ?> section('content') ?> -
+ +
getHead()) ?>
diff --git a/app/Views/front/board/reply.php b/app/Views/front/board/reply.php index 6edfa6d..8bf609f 100644 --- a/app/Views/front/board/reply.php +++ b/app/Views/front/board/reply.php @@ -1,6 +1,7 @@ extend('layouts/front') ?> section('content') ?> -
+ +
getHead()) ?>
diff --git a/app/Views/front/board/update.php b/app/Views/front/board/update.php index 6edfa6d..f759071 100644 --- a/app/Views/front/board/update.php +++ b/app/Views/front/board/update.php @@ -1,6 +1,7 @@ extend('layouts/front') ?> section('content') ?> -
+ +
>
getHead()) ?>
diff --git a/app/Views/front/board/view.php b/app/Views/front/board/view.php index 2359541..4818a91 100644 --- a/app/Views/front/board/view.php +++ b/app/Views/front/board/view.php @@ -1,17 +1,20 @@ extend('layouts/front') ?> section('content') ?> -
+ +
getHead()) ?>
-
- - +
+ + + - - + + +
getTail()) ?>
diff --git a/app/Views/front/order/index.php b/app/Views/front/order/index.php index 5b12855..a3f05d9 100644 --- a/app/Views/front/order/index.php +++ b/app/Views/front/order/index.php @@ -1,21 +1,27 @@ extend('layouts/front') ?> section('content') ?> -
+ +
- "get")) ?> - - + include('templates/front/index_head') ?> +
- - +
- @@ -28,17 +34,11 @@ -
번호 작업
- getStatus() == DEFAULTS['STATUS'] ? anchor('ecommerce/cancelCart/' . $entity->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/order/view.php b/app/Views/front/order/view.php index 2063aec..907ba07 100644 --- a/app/Views/front/order/view.php +++ b/app/Views/front/order/view.php @@ -1,16 +1,19 @@ extend('layouts/front') ?> section('content') ?> -
- - - + +
+
+ + + - - + + +
endSection() ?> \ No newline at end of file diff --git a/app/Views/front/product/index.php b/app/Views/front/product/index.php index 48dc85c..e960278 100644 --- a/app/Views/front/product/index.php +++ b/app/Views/front/product/index.php @@ -8,8 +8,8 @@
- @@ -48,7 +47,6 @@
-
getTail()) ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/front/product/index_list.php b/app/Views/front/product/index_list.php index 62e034d..04a0fde 100644 --- a/app/Views/front/product/index_list.php +++ b/app/Views/front/product/index_list.php @@ -8,8 +8,8 @@ -
@@ -31,8 +30,6 @@ getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> @@ -44,7 +41,6 @@
- -
-
getTail()) ?>
endSection() ?> \ No newline at end of file diff --git a/app/Views/front/product/view.php b/app/Views/front/product/view.php index 00d4d03..c283d6e 100644 --- a/app/Views/front/product/view.php +++ b/app/Views/front/product/view.php @@ -1,17 +1,20 @@ extend('layouts/front') ?> section('content') ?> -
+ +
getHead()) ?>
- - - +
+ + + - - + + +
getStatus() == DEFAULTS['STATUS']) : ?> diff --git a/app/Views/front/user/index.php b/app/Views/front/user/index.php deleted file mode 100644 index cf8a735..0000000 --- a/app/Views/front/user/index.php +++ /dev/null @@ -1,51 +0,0 @@ -extend('layouts/front') ?> -section('content') ?> -
-
- "get")) ?> - - -
- - - - - - - - - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> - - - - - - - - -
번호
- - viewDatas[SESSION_NAMES['ISLOGIN']] && $entity->getUser_Uid() == $this->viewDatas['auth'][AUTH_FIELDS['ID']]) : ?> - getPrimaryKey(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> - - - - viewDatas[SESSION_NAMES['ISLOGIN']] && $entity->getUser_Uid() == $this->viewDatas['auth'][AUTH_FIELDS['ID']]) : ?> - 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 index 0878132..84abebe 100644 --- a/app/Views/front/user/update.php +++ b/app/Views/front/user/update.php @@ -1,6 +1,7 @@ extend('layouts/front') ?> section('content') ?> -
+ +
diff --git a/app/Views/front/user/view.php b/app/Views/front/user/view.php deleted file mode 100644 index 0ce7ff0..0000000 --- a/app/Views/front/user/view.php +++ /dev/null @@ -1,16 +0,0 @@ -extend('layouts/front') ?> -section('content') ?> -
-
- - - - - - -
- - -
-
-endSection() ?> \ No newline at end of file diff --git a/public/css/admin/left_menu.css b/public/css/admin/left_menu.css index 3b75ace..19a01d9 100644 --- a/public/css/admin/left_menu.css +++ b/public/css/admin/left_menu.css @@ -1,6 +1,6 @@ div#left_menu{ - position:fixed; - z-index:100; + /* position:fixed; + z-index:100; */ width:160px; border:1px solid silver; }