diff --git a/app/Controllers/EcommerceController.php b/app/Controllers/EcommerceController.php index 99c1755..fe295dd 100644 --- a/app/Controllers/EcommerceController.php +++ b/app/Controllers/EcommerceController.php @@ -108,8 +108,8 @@ class EcommerceController extends Controller "%s\n 상품명:%s\n 상품갯수:%s개, 구매금액:%s원\n 장바구니에 담았습니다.", $this->_viewDatas['title'], $entity->getTitle(), - $entity->getQuantity(), - number_format($entity->getPrice()) + $entity->quantity, + number_format($entity->price) ); return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL'])); } catch (\Exception $e) { @@ -143,9 +143,9 @@ class EcommerceController extends Controller throw new \Exception(__FUNCTION__ . " 오류 발생.\n" . var_export($this->getOrderModel()->errors(), true)); } //상품정보 가져오기 - $product = $this->getProductModel()->getEntity([$this->getProductModel()->getPrimaryKey() => $entity->getProduct_uid()]); + $product = $this->getProductModel()->getEntity([$this->getProductModel()->getPrimaryKey() => $entity->product_uid]); //상품반환 - $this->getProductModel()->cancelCart($product, $entity->getQuantity()); + $this->getProductModel()->cancelCart($product, $entity->quantity); //주문정보 세션에서 빼기 $order_uids = $this->_session->get(SESSION_NAMES['CART']) ?: array(); $temps = array(); @@ -157,7 +157,7 @@ class EcommerceController extends Controller $this->_session->set(SESSION_NAMES['CART'], $temps); //Transaction Commit $this->getOrderModel()->transComplete(); - $msg = "{$this->_viewDatas['title']}에서 {$entity->getTitle()} {$entity->getQuantity()}개의 주문을 취소하였습니다."; + $msg = "{$this->_viewDatas['title']}에서 {$entity->getTitle()} {$entity->quantity}개의 주문을 취소하였습니다."; return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL'])); } catch (\Exception $e) { //Transaction Rollback diff --git a/app/Controllers/Front/BoardController.php b/app/Controllers/Front/BoardController.php index 63a5d76..d11fd08 100644 --- a/app/Controllers/Front/BoardController.php +++ b/app/Controllers/Front/BoardController.php @@ -60,7 +60,7 @@ class BoardController extends FrontController protected function update_form_process($entity) { //본인이 작성한글인지 최종확인용 정상접속이 아닌 위회해서 수정을 시도방지용 - if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->getUser_Uid() == $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) { + if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->user_uid == $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) { throw new \Exception("작성자 본인글인지 여부가 확인되지 않습니다."); } return parent::update_form_process($entity); @@ -68,7 +68,7 @@ class BoardController extends FrontController protected function update_process($entity) { //본인이 작성한글인지 최종확인용 정상접속이 아닌 위회해서 수정을 시도방지용 - if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->getUser_Uid() == $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) { + if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->user_uid == $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) { throw new \Exception("작성자 본인글인지 여부가 확인되지 않습니다."); } return parent::update_process($entity); @@ -84,7 +84,7 @@ class BoardController extends FrontController protected function delete_process($entity) { //본인이 작성한글인지 최종확인용 정상접속이 아닌 위회해서 삭제 시도 방지용 - if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->getUser_Uid() == $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) { + if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->user_uid == $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) { throw new \Exception("작성자 본인글인지 여부가 확인되지 않습니다."); } return parent::delete_process($entity); diff --git a/app/Helpers/Order_helper.php b/app/Helpers/Order_helper.php index 4aed9a3..424545c 100644 --- a/app/Helpers/Order_helper.php +++ b/app/Helpers/Order_helper.php @@ -76,13 +76,6 @@ function getFieldView_OrderHelper($field, $entity, array $viewDatas) ["target" => "_self"] ); break; - case 'board_file': - case 'upload_file': - return $value == DEFAULTS['EMPTY'] ? DEFAULTS['EMPTY'] : anchor(current_url() . "/download/{$field}/{$entity->getPrimaryKey()}", ICONS['IMAGE_FILE'] . explode(DEFAULTS['DELIMITER_FILE'], $value)[0], ["target" => "_self"]); - break; - case 'view_cnt': - return number_format(!$value ? 0 : $value); - break; case 'content': return html_entity_decode($value); break; diff --git a/app/Helpers/UserSNS_helper.php b/app/Helpers/UserSNS_helper.php index 9a45ba5..a2c17d5 100644 --- a/app/Helpers/UserSNS_helper.php +++ b/app/Helpers/UserSNS_helper.php @@ -79,13 +79,6 @@ function getFieldView_UserSNSHelper($field, $entity, array $viewDatas) ["target" => "_self"] ); break; - case 'board_file': - case 'upload_file': - return $value == DEFAULTS['EMPTY'] ? DEFAULTS['EMPTY'] : anchor(current_url() . "/download/{$field}/{$entity->getPrimaryKey()}", ICONS['IMAGE_FILE'] . explode(DEFAULTS['DELIMITER_FILE'], $value)[0], ["target" => "_self"]); - break; - case 'view_cnt': - return number_format(!$value ? 0 : $value); - break; case 'content': return html_entity_decode($value); break; diff --git a/app/Libraries/Adapter/Auth/Adapter.php b/app/Libraries/Adapter/Auth/Adapter.php index 1e18cd4..23e8080 100644 --- a/app/Libraries/Adapter/Auth/Adapter.php +++ b/app/Libraries/Adapter/Auth/Adapter.php @@ -59,7 +59,7 @@ abstract class Adapter $auths[$field] = $entity->getTitle(); break; case 'role': - $auths[$field] = $entity->getRole(); + $auths[$field] = $entity->$field; break; } } diff --git a/app/Models/ProductModel.php b/app/Models/ProductModel.php index 1717ac5..c5a70fd 100644 --- a/app/Models/ProductModel.php +++ b/app/Models/ProductModel.php @@ -112,7 +112,7 @@ class ProductModel extends BaseModel //장바구니에 넣기 final public function addCart(ProductEntity $entity, int $quantity): ProductEntity { - if ($entity->getStock() == $quantity) { + if ($entity->stock == $quantity) { $entity->status = self::STATUS_OUTOFSTOCK; } $entity->stock -= $quantity; @@ -121,7 +121,7 @@ class ProductModel extends BaseModel //장바구니에 빼기 public function cancelCart(ProductEntity $entity, int $quantity) { - if ($entity->getStatus() == self::STATUS_OUTOFSTOCK) { + if ($entity->status == self::STATUS_OUTOFSTOCK) { $entity->status = DEFAULTS['STATUS']; } $entity->stock += $quantity; diff --git a/app/Views/admin/board/index.php b/app/Views/admin/board/index.php index 71fa1cc..1407962 100644 --- a/app/Views/admin/board/index.php +++ b/app/Views/admin/board/index.php @@ -21,7 +21,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != 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(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> diff --git a/app/Views/admin/category/index.php b/app/Views/admin/category/index.php index 3e7174f..1275d04 100644 --- a/app/Views/admin/category/index.php +++ b/app/Views/admin/category/index.php @@ -21,7 +21,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != 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(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> diff --git a/app/Views/admin/order/index.php b/app/Views/admin/order/index.php index 3f97549..092f141 100644 --- a/app/Views/admin/order/index.php +++ b/app/Views/admin/order/index.php @@ -21,7 +21,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != 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(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> diff --git a/app/Views/admin/product/index.php b/app/Views/admin/product/index.php index 349774d..136193c 100644 --- a/app/Views/admin/product/index.php +++ b/app/Views/admin/product/index.php @@ -21,7 +21,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != 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(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> diff --git a/app/Views/admin/user/index.php b/app/Views/admin/user/index.php index 08f0d4a..53bb3a7 100644 --- a/app/Views/admin/user/index.php +++ b/app/Views/admin/user/index.php @@ -21,7 +21,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != 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(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> diff --git a/app/Views/admin/usersns/index.php b/app/Views/admin/usersns/index.php index e5b096e..b56c090 100644 --- a/app/Views/admin/usersns/index.php +++ b/app/Views/admin/usersns/index.php @@ -21,7 +21,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != 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(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> diff --git a/app/Views/front/board/index.php b/app/Views/front/board/index.php index 399aa3a..3cd7d73 100644 --- a/app/Views/front/board/index.php +++ b/app/Views/front/board/index.php @@ -16,10 +16,10 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> - getUser_Uid() == $viewDatas['auth'][AUTH_FIELDS['ID']]) : ?> + user_uid == $viewDatas['auth'][AUTH_FIELDS['ID']]) : ?> getPrimaryKey(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?> @@ -30,7 +30,7 @@ - getUser_Uid() == $viewDatas['auth'][AUTH_FIELDS['ID']]) : ?> + user_uid == $viewDatas['auth'][AUTH_FIELDS['ID']]) : ?> getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?> diff --git a/app/Views/front/order/index.php b/app/Views/front/order/index.php index a3f05d9..ece232a 100644 --- a/app/Views/front/order/index.php +++ b/app/Views/front/order/index.php @@ -27,7 +27,7 @@ - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> diff --git a/app/Views/front/product/index.php b/app/Views/front/product/index.php index e960278..d5f03da 100644 --- a/app/Views/front/product/index.php +++ b/app/Views/front/product/index.php @@ -23,7 +23,7 @@ - + - getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> + status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
getPhotoFileName('middle') ?>getFileImage('middle') ?> diff --git a/app/Views/front/product/index_list.php b/app/Views/front/product/index_list.php index 04a0fde..60601d0 100644 --- a/app/Views/front/product/index_list.php +++ b/app/Views/front/product/index_list.php @@ -28,7 +28,7 @@