shoppingmallv2 init...
This commit is contained in:
parent
39664b7ab4
commit
35585c9b8a
@ -203,9 +203,16 @@ define('AUTH_ADAPTERS', [
|
||||
],
|
||||
]);
|
||||
|
||||
define("MALLS", [
|
||||
"support" => "support@idcjp.jp",
|
||||
"master" => "master@idcjp.jp",
|
||||
"title" => "Mall Master"
|
||||
]);
|
||||
|
||||
//Upload , Download 관련
|
||||
define('PATHS', [
|
||||
'EXCEL' => WRITEPATH . "excel/",
|
||||
'BILLING' => WRITEPATH . "billing/",
|
||||
'UPLOAD' => WRITEPATH . "uploads/",
|
||||
'UPLOAD_IMAGE' => FCPATH . 'upload_images/',
|
||||
'DOWNLOAD' => WRITEPATH . "download/",
|
||||
@ -249,6 +256,7 @@ define('CLASS_ICONS', [
|
||||
'CATEGORY' => '<i class="bi bi-boxes"></i>',
|
||||
'PRODUCT' => '<i class="bi bi-box2"></i>',
|
||||
'ORDER' => '<i class="bi bi-clipboard-check"></i>',
|
||||
'BILLING' => '<i class="bi bi-clipboard-check"></i>',
|
||||
'CART' => '<i class="bi bi-cart4"></i>',
|
||||
'CARD' => '<i class="bi bi-credit-card"></i>',
|
||||
'DEPOSIT' => '<i class="bi bi-cash-coin"></i>',
|
||||
@ -257,6 +265,7 @@ define('CLASS_TOP_BANNER', [
|
||||
'USER' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'USERSNS' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'ORDER' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'BILLING' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'CARD' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'DEPOSIT' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'PRODUCT' => '<img src="/images/banner/sub_visual2.jpg"/>',
|
||||
@ -269,8 +278,7 @@ define('AUDIOS', [
|
||||
|
||||
//Default값 정의
|
||||
define('DEFAULTS', [
|
||||
'ORDER_CATEGORY' => getenv('default.order_category') ?: 11,
|
||||
'USER_CATEGORY' => getenv('default.user_category') ?: 22,
|
||||
'CATEGORY' => getenv('default.category') ?: 22,
|
||||
'ROLE' => getenv('default.role') ?: "guest",
|
||||
'STATUS' => getenv('default.status') ?: "use",
|
||||
'EMPTY' => getenv('default.empty') ?: "",
|
||||
|
||||
@ -123,6 +123,16 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->get('toggle/(:uuid)/(:hash)', 'OrderController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'OrderController::batchjob`');
|
||||
});
|
||||
$routes->group('billing', static function ($routes) {
|
||||
$routes->get('', 'BillingController::index');
|
||||
$routes->get('update/(:uuid)', 'BillingController::update_form/$1');
|
||||
$routes->post('update/(:uuid)', 'BillingController::update/$1');
|
||||
$routes->get('view/(:uuid)', 'BillingController::view/$1');
|
||||
$routes->get('delete/(:uuid)', 'BillingController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:uuid)/(:hash)', 'BillingController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'BillingController::batchjob`');
|
||||
$routes->get('download/(:any)/(:uuid)', 'BillingController::download/$1/$2');
|
||||
});
|
||||
});
|
||||
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
|
||||
$routes->group('user', static function ($routes) {
|
||||
@ -169,6 +179,9 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou
|
||||
$routes->post('deposit/(:uuid)', 'DepositController::update/$1');
|
||||
});
|
||||
});
|
||||
$routes->group('billing', static function ($routes) {
|
||||
$routes->get('', 'BillingController::index');
|
||||
});
|
||||
});
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
|
||||
49
app/Controllers/Admin/BillingController.php
Normal file
49
app/Controllers/Admin/BillingController.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin;
|
||||
|
||||
use App\Models\BillingModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class BillingController extends AdminController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->_model = new BillingModel();
|
||||
$this->_viewDatas['className'] = 'Billing';
|
||||
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
|
||||
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
|
||||
helper($this->_viewDatas['className']);
|
||||
}
|
||||
|
||||
final public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case 'update':
|
||||
return ["user_uid", 'order_uid', "title", "upload_file", "status"];
|
||||
break;
|
||||
case "index":
|
||||
case "excel":
|
||||
return ["user_uid", "order_uid", "title", "upload_file", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
case "view":
|
||||
return ["user_uid", 'order_uid', "title", "upload_file", "status", "updated_at", "created_at", 'response'];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
final public function getFieldFilters(): array
|
||||
{
|
||||
return ["user_uid", 'order_uid', "status"];
|
||||
}
|
||||
final public function getFieldBatchFilters(): array
|
||||
{
|
||||
return ["status"];
|
||||
}
|
||||
}
|
||||
@ -57,7 +57,6 @@ class CategoryController extends AdminController
|
||||
private function write_leftmenu($old_category, array $categorys)
|
||||
{
|
||||
//신규 대분류인경우 기존 카테고리 메뉴 만들기
|
||||
// $categorys = array_reverse($categorys); //중분류의 경우 나중에 넣은것이 먼저되므로 reverse해서 처리
|
||||
foreach ($categorys as $category) {
|
||||
$viewDatas = [
|
||||
'className' => $this->_viewDatas['className'],
|
||||
@ -103,6 +102,13 @@ class CategoryController extends AdminController
|
||||
$this->build_leftmenu();
|
||||
return $entity;
|
||||
}
|
||||
//Toggle관련
|
||||
protected function toggle_process($entity)
|
||||
{
|
||||
$entity = parent::toggle_process($entity);
|
||||
$this->build_leftmenu();
|
||||
return $entity;
|
||||
}
|
||||
//Reply관련
|
||||
protected function reply_process($entity)
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@ class OrderController extends AdminController
|
||||
return ["user_uid", "name", "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
case "view":
|
||||
return ["user_uid", 'product_uid', "name", "cost", "sale", "quantity", "price", "status", "updated_at", "created_at", 'response'];
|
||||
return ["user_uid", 'product_uid', "name", "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
|
||||
53
app/Controllers/Front/BillingController.php
Normal file
53
app/Controllers/Front/BillingController.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Front;
|
||||
|
||||
use App\Models\BillingModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class BillingController extends FrontController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->_model = new BillingModel();
|
||||
$this->_viewDatas['className'] = 'Billing';
|
||||
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
|
||||
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
|
||||
helper($this->_viewDatas['className']);
|
||||
|
||||
//Default 회원정보 Category
|
||||
$this->_category = DEFAULTS['CATEGORY'];
|
||||
$this->isRole('index');
|
||||
}
|
||||
|
||||
final public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case 'update':
|
||||
return ['order_uid', "title", "upload_file", "status"];
|
||||
break;
|
||||
case "index":
|
||||
case "excel":
|
||||
return ["order_uid", "title", "upload_file", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
case "view":
|
||||
return ['order_uid', "title", "upload_file", "status", "updated_at", "created_at", 'response'];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
final public function getFieldFilters(): array
|
||||
{
|
||||
return ["user_uid", 'order_uid', "status"];
|
||||
}
|
||||
final public function getFieldBatchFilters(): array
|
||||
{
|
||||
return ["status"];
|
||||
}
|
||||
}
|
||||
@ -26,7 +26,7 @@ class OrderController extends FrontController
|
||||
helper($this->_viewDatas['className']);
|
||||
|
||||
//Default 회원정보 Category
|
||||
$this->_category = DEFAULTS['ORDER_CATEGORY'];
|
||||
$this->_category = DEFAULTS['CATEGORY'];
|
||||
$this->isRole('index');
|
||||
}
|
||||
|
||||
|
||||
@ -83,27 +83,34 @@ class CardController extends PaymentController
|
||||
}
|
||||
|
||||
//카드결제처리
|
||||
private function pg_process(array $responses): array
|
||||
private function pg_process(): string
|
||||
{
|
||||
//PG사 결제후 정보저장
|
||||
$adapter = new PaymentAdapter();
|
||||
$adapter->setDatas($this->_viewDatas['fieldDatas']);
|
||||
$result = $adapter->execute();
|
||||
|
||||
$response = "";
|
||||
foreach ($result as $key => $value) {
|
||||
$responses['response'] .= "{$key}:{$value}\n";
|
||||
$response .= "{$key}:{$value}\n";
|
||||
}
|
||||
return $responses;
|
||||
return $response;
|
||||
}
|
||||
protected function update_process($entity)
|
||||
{
|
||||
//결과저장용
|
||||
$responses = array("status" => $this->_viewDatas['className'], "response" => "");
|
||||
foreach ($this->_viewDatas['fieldDatas'] as $key => $value) {
|
||||
$responses['response'] .= "{$key}:{$value}\n";
|
||||
}
|
||||
$this->_viewDatas['fieldDatas'] = $this->pg_process($responses);
|
||||
// echo var_export($this->_viewDatas['fieldDatas']);
|
||||
// exit;
|
||||
return parent::update_process($entity);
|
||||
//결제처리
|
||||
$this->_viewDatas['fieldDatas'] = array("status" => $this->_viewDatas['className']);
|
||||
$entity = parent::update_process($entity);
|
||||
//카드결제
|
||||
$response = $this->pg_process();
|
||||
//청구서 발행정보
|
||||
$subject = sprintf("%s %s 청구서입니다.", $entity->getTitle(), date("Y년 m월"));
|
||||
$html = view(
|
||||
$this->_viewPath . 'billing',
|
||||
['viewDatas' => $this->_viewDatas['fieldDatas']]
|
||||
);
|
||||
//청구서 발행
|
||||
$this->billing($entity, $subject, $html);
|
||||
return $entity;
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,14 +72,17 @@ class DepositController extends PaymentController
|
||||
//무통장입금결제처리
|
||||
protected function update_process($entity)
|
||||
{
|
||||
//결과저장용
|
||||
$responses = array("status" => $this->_viewDatas['className'], "response" => "");
|
||||
foreach ($this->_viewDatas['fieldDatas'] as $key => $value) {
|
||||
$responses['response'] .= "{$key}:{$value}\n";
|
||||
}
|
||||
$this->_viewDatas['fieldDatas'] = $responses;
|
||||
// echo var_export($this->_viewDatas['fieldDatas']);
|
||||
// exit;
|
||||
return parent::update_process($entity);
|
||||
//겔제처리
|
||||
$this->_viewDatas['fieldDatas'] = array("status" => $this->_viewDatas['className']);
|
||||
$entity = parent::update_process($entity);
|
||||
//청구서 발행정보
|
||||
$subject = sprintf("%s %s 청구서입니다.", $entity->getTitle(), date("Y년 m월"));
|
||||
$html = view(
|
||||
$this->_viewPath . 'billing',
|
||||
['viewDatas' => $this->_viewDatas['fieldDatas']]
|
||||
);
|
||||
//청구서 발행
|
||||
$this->billing($entity, $subject, $html);
|
||||
return $entity;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,8 +3,10 @@
|
||||
namespace App\Controllers\Front\Order\Payment;
|
||||
|
||||
use App\Controllers\Front\Order\OrderController;
|
||||
use App\Entities\OrderEntity;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Dompdf\Dompdf;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class PaymentController extends OrderController
|
||||
@ -56,4 +58,32 @@ class PaymentController extends OrderController
|
||||
$this->_session->setFlashdata("return_message", $msg);
|
||||
}
|
||||
}
|
||||
|
||||
//청구서관련
|
||||
final protected function billing(OrderEntity $entity, string $subject, string $html)
|
||||
{
|
||||
//Email 발송
|
||||
$email = \Config\Services::email();
|
||||
$email->setFrom(MALLS['support'], MALLS['title'], MALLS['master']);
|
||||
$email->setTo($entity->email);
|
||||
$email->setCC(MALLS['master']);
|
||||
$email->setSubject($subject);
|
||||
$email->setMessage($html);
|
||||
$email->send();
|
||||
|
||||
//PDF저장
|
||||
$dompdf = new Dompdf();
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->setPaper('A4', 'landscape');
|
||||
$dompdf->render();
|
||||
//Output the generated PDF to Browser
|
||||
// $dompdf->stream();
|
||||
$filename = sprintf(
|
||||
"%s/%s_%s.pdf",
|
||||
PATHS['BILLING'],
|
||||
$entity->getPrimaryKey(),
|
||||
date("Y-m")
|
||||
);
|
||||
file_put_contents($filename, $dompdf->output());
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ class UserController extends FrontController
|
||||
|
||||
$this->initAdapters();
|
||||
//Default 회원정보 Category
|
||||
$this->_category = DEFAULTS['USER_CATEGORY'];
|
||||
$this->_category = DEFAULTS['CATEGORY'];
|
||||
$this->isRole('index');
|
||||
}
|
||||
|
||||
|
||||
@ -144,7 +144,6 @@ CREATE TABLE shoppingmall.tw_order (
|
||||
cost int(10) UNSIGNED NOT NULL COMMENT '구매원가',
|
||||
sale int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '할인가',
|
||||
price int(10) UNSIGNED NOT NULL COMMENT '결제액',
|
||||
response text NULL COMMENT '결제처리결과',
|
||||
quantity varchar(255) NOT NULL COMMENT '수량',
|
||||
paymentday int(2) UNSIGNED NULL COMMENT '결제일',
|
||||
status varchar(10) NOT NULL DEFAULT 'use' COMMENT 'use: 결제하기, unuse: 주문취소, deposit:무통장입금, paid:결제완료 등등',
|
||||
@ -154,4 +153,21 @@ CREATE TABLE shoppingmall.tw_order (
|
||||
PRIMARY KEY (uid),
|
||||
CONSTRAINT FOREIGN KEY (product_uid) REFERENCES tw_product (uid),
|
||||
CONSTRAINT FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='Order 정보';
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='Order 정보';
|
||||
|
||||
DROP TABLE IF EXISTS shoppingmall.tw_billing;
|
||||
CREATE TABLE shoppingmall.tw_billing (
|
||||
uid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
order_uid varchar(36) NULL COMMENT '주문 정보',
|
||||
user_uid varchar(36) NULL COMMENT '사용자 정보',
|
||||
title varchar(255) NOT NULL COMMENT '청구서제목',
|
||||
upload_file varchar(255) NULL COMMENT 'PDF 파일명',
|
||||
response text NULL COMMENT '결제처리결과',
|
||||
status varchar(10) NOT NULL DEFAULT 'use' COMMENT 'use: 사용, unuse: 사용않함 등등',
|
||||
updated_at timestamp NULL DEFAULT NULL,
|
||||
created_at timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
deleted_at timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (uid),
|
||||
CONSTRAINT FOREIGN KEY (order_uid) REFERENCES tw_order (uid),
|
||||
CONSTRAINT FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='청구서 정보';
|
||||
30
app/Entities/BillingEntity.php
Normal file
30
app/Entities/BillingEntity.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities;
|
||||
|
||||
class BillingEntity extends BaseEntity
|
||||
{
|
||||
|
||||
protected $datamap = [];
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $casts = [];
|
||||
|
||||
//기본기능
|
||||
final public function getTitle(): string
|
||||
{
|
||||
return $this->attributes['name'];
|
||||
}
|
||||
//추가기능
|
||||
//파일관련 Field전용
|
||||
final public function getFileDownload($url, $field = "upload_file")
|
||||
{
|
||||
if (is_null($this->attributes[$field])) {
|
||||
return "";
|
||||
}
|
||||
return anchor(
|
||||
$url,
|
||||
ICONS['IMAGE_FILE'] . $this->attributes[$field],
|
||||
["target" => "_self"]
|
||||
);
|
||||
}
|
||||
}
|
||||
188
app/Helpers/Billing_helper.php
Normal file
188
app/Helpers/Billing_helper.php
Normal file
@ -0,0 +1,188 @@
|
||||
<?php
|
||||
function getFieldLabel_BillingHelper($field, array $viewDatas): string
|
||||
{
|
||||
$attributes = [];
|
||||
switch ($field) {
|
||||
default:
|
||||
if (strpos($viewDatas['fieldRules'][$field], 'required') !== false) {
|
||||
$attributes = ['style="color:red";'];
|
||||
}
|
||||
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("{$viewDatas['className']}.label.{$field}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
//header.php에서 getFieldForm_Helper사용
|
||||
function getFieldForm_BillingHelper($field, $value, array $viewDatas, array $attributes = array())
|
||||
{
|
||||
$value = $value ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'order_uid':
|
||||
case 'user_uid':
|
||||
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, [...$attributes, 'class' => "select-field"]);
|
||||
// // return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
||||
// foreach ($viewDatas['fieldFormOptions'][$field] as $key => $label) {
|
||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||
// }
|
||||
// return implode(" ", $checkboxs);
|
||||
break;
|
||||
case 'title':
|
||||
case 'name':
|
||||
return form_input($field, $value, ["placeholder" => "예)", "style" => "width:60%; ::placeholder{ color:silver; opacity: 1; }"]);
|
||||
break;
|
||||
case 'passwd':
|
||||
return sprintf(
|
||||
"%s %s %s",
|
||||
form_password($field, DEFAULTS['EMPTY']),
|
||||
lang("{$viewDatas['className']}.label.confirmpassword"),
|
||||
form_password('confirmpassword', DEFAULTS['EMPTY']),
|
||||
);
|
||||
break;
|
||||
case 'content':
|
||||
case 'head':
|
||||
case 'tail':
|
||||
return form_textarea($field, html_entity_decode($value), ['class' => 'editor', 'rows' => '20', 'cols' => '100']);
|
||||
break;
|
||||
case 'upload_file':
|
||||
case 'board_file':
|
||||
return form_upload($field);
|
||||
break;
|
||||
case 'view_cnt':
|
||||
return form_input($field, $value, ['type' => 'number']);
|
||||
break;
|
||||
case "status":
|
||||
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return form_input($field, $value, ['class' => 'calender']);
|
||||
break;
|
||||
default:
|
||||
return form_input($field, $value);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldView_BillingHelper($field, $entity, array $viewDatas)
|
||||
{
|
||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'cost':
|
||||
case 'sale':
|
||||
return number_format(!$value ? 0 : $value) . "원";
|
||||
break;
|
||||
case 'price':
|
||||
$price = number_format(!$value ? 0 : $value) . "원";
|
||||
$paymentday = $entity->paymentday;
|
||||
return sprintf(
|
||||
"%s:%s<BR>%s",
|
||||
lang("{$viewDatas['className']}.label.paymentday"),
|
||||
$paymentday,
|
||||
$price
|
||||
);
|
||||
break;
|
||||
case 'stock':
|
||||
case 'view_cnt':
|
||||
return number_format(!$value ? 0 : $value);
|
||||
break;
|
||||
case 'response':
|
||||
return nl2br($value);
|
||||
break;
|
||||
case 'content':
|
||||
return html_entity_decode($value);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return $value ? str_split($value, 10)[0] : "";
|
||||
break;
|
||||
default:
|
||||
return in_array($field, $viewDatas['fieldFilters']) && $value ? $viewDatas['fieldFormOptions'][$field][$value] : $value;
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
function getFieldFilter_BillingHelper($field, $value, array $viewDatas)
|
||||
{
|
||||
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, ['class' => "select-field"]);
|
||||
} //
|
||||
|
||||
function getFieldIndex_Column_BillingHelper($field, array $viewDatas)
|
||||
{
|
||||
$label = lang("{$viewDatas['className']}.label.{$field}");
|
||||
if ($field == $viewDatas['order_field']) {
|
||||
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS['UP'] : ICONS['DOWN'];
|
||||
}
|
||||
$value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
|
||||
$viewDatas['uri']->addQuery('order_field', $field);
|
||||
$viewDatas['uri']->addQuery('order_value', $value);
|
||||
$columnData = anchor($viewDatas['uri'], $label);
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
case 'name':
|
||||
return sprintf("<th class='col-4'>%s</th>", $columnData);
|
||||
break;
|
||||
default:
|
||||
return sprintf("<th>%s</th>", $columnData);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
|
||||
//Front용
|
||||
function getFieldIndex_Row_BillingHelper($field, $entity, array $viewDatas): string
|
||||
{
|
||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
case 'name':
|
||||
$uid = lang("{$viewDatas['className']}.label.uid") . ' : ' . str_split($entity->getPrimaryKey(), 4)[0] . '-xx-' . str_split($entity->getPrimaryKey(), 4)[1];
|
||||
$title = anchor(
|
||||
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category']->getPrimaryKey(),
|
||||
$value,
|
||||
["target" => "_self"]
|
||||
);
|
||||
return sprintf("%s<BR>%s", $uid, $title);
|
||||
break;
|
||||
case 'board_file':
|
||||
case 'upload_file':
|
||||
return $entity->getFileDownload(base_url() . $viewDatas['control'] . '/billing', $field);
|
||||
break;
|
||||
default:
|
||||
return getFieldView_BillingHelper($field, $entity, $viewDatas);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
//Admin용
|
||||
function getFieldIndex_Row_BillingHelper_Admin($field, $entity, array $viewDatas): string
|
||||
{
|
||||
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'title':
|
||||
case 'name':
|
||||
$uid = lang("{$viewDatas['className']}.label.uid") . ' : ' . str_split($entity->getPrimaryKey(), 4)[0] . '-xx-' . str_split($entity->getPrimaryKey(), 4)[1];
|
||||
$title = anchor(
|
||||
current_url() . '/view/' . $entity->getPrimaryKey(),
|
||||
$value,
|
||||
["target" => "_self"]
|
||||
);
|
||||
return sprintf("%s<BR>%s", $uid, $title);
|
||||
break;
|
||||
case 'user_uid':
|
||||
return getFieldView_BillingHelper($field, $entity, $viewDatas);
|
||||
break;
|
||||
default:
|
||||
if (in_array($field, $viewDatas['fieldFilters'])) {
|
||||
$attributes["onChange"] = sprintf(
|
||||
'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',
|
||||
current_url(),
|
||||
$entity->getPrimaryKey(),
|
||||
$field,
|
||||
$field
|
||||
);
|
||||
return getFieldForm_BillingHelper($field, $entity->$field, $viewDatas, $attributes);
|
||||
}
|
||||
return getFieldIndex_Row_BillingHelper($field, $entity, $viewDatas);
|
||||
break;
|
||||
}
|
||||
} //
|
||||
@ -86,9 +86,6 @@ function getFieldView_OrderHelper($field, $entity, array $viewDatas)
|
||||
case 'view_cnt':
|
||||
return number_format(!$value ? 0 : $value);
|
||||
break;
|
||||
case 'response':
|
||||
return nl2br($value);
|
||||
break;
|
||||
case 'content':
|
||||
return html_entity_decode($value);
|
||||
break;
|
||||
|
||||
18
app/Language/ko/Billing.php
Normal file
18
app/Language/ko/Billing.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "청구서 정보",
|
||||
'label' => [
|
||||
'uid' => "청구서번호",
|
||||
'order_uid' => "주문정보",
|
||||
'user_uid' => "사용자정보",
|
||||
'title' => "청구서명",
|
||||
'response' => "결제처리결과",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
'created_at' => "작성일"
|
||||
],
|
||||
"STATUS" => [
|
||||
"use" => "사용",
|
||||
"unuse" => "사용않함",
|
||||
],
|
||||
];
|
||||
@ -11,7 +11,6 @@ return [
|
||||
'sale' => "할인",
|
||||
'quantity' => "수량",
|
||||
'price' => "결제금액",
|
||||
'response' => "결제처리결과",
|
||||
"paymentday" => "월결제일",
|
||||
'status' => "상태",
|
||||
'updated_at' => "수정일",
|
||||
|
||||
@ -37,39 +37,31 @@ abstract class BaseHierarchyModel extends BaseModel
|
||||
return $rules;
|
||||
}
|
||||
|
||||
private function getMax($field, $coditions = null)
|
||||
{
|
||||
//생성시는 해당Field의 max값을 구해서 넣는다.
|
||||
$query = is_null($coditions) ? $this->selectMax($field) : $this->selectMax($field)->where($coditions);
|
||||
$max = $query->get()->getResult()[0]->$field + 1;
|
||||
if (!$max) {
|
||||
throw new \Exception("{$field}는 {$max}의 값을 가질수 없습니다.");
|
||||
}
|
||||
return $max;
|
||||
}
|
||||
final protected function create_process($entity, array $formDatas)
|
||||
{
|
||||
//생성시는 grpno의 max값을 구해서 넣는다.
|
||||
$entity->grpno = $this->selectMax("grpno")->get()->getResult()[0]->grpno + 1;
|
||||
if (!$entity->grpno) {
|
||||
throw new \Exception("grpno는 {$entity->grpno}의 값을 가질수 없습니다.");
|
||||
}
|
||||
$formDatas['grpno'] = $this->getMax('grpno');
|
||||
return parent::create_process($entity, $formDatas);
|
||||
}
|
||||
|
||||
final protected function reply_process($parent_entity, $entity, array $formDatas)
|
||||
{
|
||||
//부모의 그룹과 grpno가 같고, 부모의 grporder보다 1 큰것을 grporder+1을 해서 update
|
||||
//escape -> false옵션 반드시 있어야함
|
||||
$this->set("grporder", "grporder+1", false);
|
||||
$this->where([
|
||||
"grpno" => $parent_entity->grpno,
|
||||
"grporder >" => $parent_entity->grporder
|
||||
]);
|
||||
$this->update();
|
||||
//reply용 설정
|
||||
$entity->parent_uid = $parent_entity->getPrimaryKey();
|
||||
$entity->grpno = $parent_entity->grpno;
|
||||
$entity->grporder = $parent_entity->grporder + 1;
|
||||
//Reply시는 grpno가 부모와 같고 grporder의 max값을 구해서 넣는다.
|
||||
$entity->grporder = $this->getMax('grporder', ['grpno' => $parent_entity->grpno]);
|
||||
$entity->grpdepth = $parent_entity->grpdepth + 1;
|
||||
return parent::create_process($entity, $formDatas);
|
||||
}
|
||||
|
||||
public function setIndexOrderBy(?string $field, ?string $order)
|
||||
{
|
||||
//계단식의 경우는 먼저 다른것보다 먼저 orderBy가 수행되어야 하므로
|
||||
$this->orderBy("grpno", "DESC");
|
||||
$this->orderBy("grporder", "ASC");
|
||||
parent::setIndexOrderBy($field, $order);
|
||||
}
|
||||
}
|
||||
|
||||
116
app/Models/BillingModel.php
Normal file
116
app/Models/BillingModel.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Entities\BillingEntity;
|
||||
use App\Entities\ProductEntity;
|
||||
|
||||
class BillingModel extends BaseModel
|
||||
{
|
||||
private $_product_options = null;
|
||||
protected $table = "tw_order";
|
||||
protected $useAutoIncrement = false;
|
||||
protected $returnType = BillingEntity::class;
|
||||
protected $useSoftDeletes = true;
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('Billing');
|
||||
$this->allowedFields = [
|
||||
...$this->allowedFields, 'order_uid', "user_uid",
|
||||
"title", "upload_file", "response", "status"
|
||||
];
|
||||
$this->validationRules = [...$this->validationRules, ...$this->getFieldRules($this->allowedFields),];
|
||||
}
|
||||
final public function getTitleField(): string
|
||||
{
|
||||
return 'title';
|
||||
}
|
||||
public function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'order_uid':
|
||||
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";
|
||||
break;
|
||||
case $this->getTitleField():
|
||||
$rules[$field] = "required|trim|string";
|
||||
break;
|
||||
case "upload_file": //uploaded[{$field}] == requried와 같은의미
|
||||
$rules[$field] = "if_exist|string";
|
||||
break;
|
||||
case "response":
|
||||
$rules[$field] = "required|string";
|
||||
break;
|
||||
default:
|
||||
$rules = parent::getFieldRule($field, $rules, $action);
|
||||
break;
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
//Field별 Form Option용
|
||||
public function getFieldFormOption(string $field): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'product_uid':
|
||||
if (is_null($this->_product_options)) {
|
||||
$productModel = new ProductModel();
|
||||
$this->_product_options = $productModel->getOptions();
|
||||
}
|
||||
$options = $this->_product_options;
|
||||
break;
|
||||
default:
|
||||
return parent::getFieldFormOption($field);
|
||||
break;
|
||||
}
|
||||
if (!is_array($options)) {
|
||||
throw new \Exception(__FUNCTION__ . "에서 {$this->getClassName()}의 Field:{$field}의 FormOptionData가 array가 아닙니다.\n" . var_export($options, true));
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
public function getEntity($conditions): BillingEntity
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
}
|
||||
public function create(array $formDatas): BillingEntity
|
||||
{
|
||||
return $this->create_process(new BillingEntity(), $formDatas);
|
||||
}
|
||||
public function modify(BillingEntity $entity, array $formDatas): BillingEntity
|
||||
{
|
||||
return $this->modify_process($entity, $formDatas);
|
||||
}
|
||||
//Index관련
|
||||
public function setIndexWordFilter(string $word)
|
||||
{
|
||||
if ($word !== DEFAULTS['EMPTY']) {
|
||||
parent::setIndexWordFilter($word);
|
||||
$this->orLike($this->getTitleField(), $word, "both");
|
||||
}
|
||||
}
|
||||
|
||||
//장바구니에 넣기()
|
||||
final public function addCart(ProductEntity $entity, int $quantity, $paymentDay = null): BillingEntity
|
||||
{
|
||||
$formDatas = [];
|
||||
$formDatas['product_uid'] = $entity->getPrimaryKey();
|
||||
//상품명을 복사해서 구매한 상품명에 넣기
|
||||
$formDatas[$this->getTitleField()] = $entity->getTitle();
|
||||
$formDatas['cost'] = $entity->price;
|
||||
$formDatas['sale'] = 0;
|
||||
$formDatas['quantity'] = $quantity;
|
||||
$formDatas['price'] = $formDatas['cost'] * $formDatas['quantity'];
|
||||
if (!is_null($paymentDay)) {
|
||||
$formDatas['paymentday'] = $paymentDay;
|
||||
}
|
||||
return $this->create($formDatas);
|
||||
}
|
||||
//장바구니에 빼기
|
||||
public function cancelCart(BillingEntity $entity)
|
||||
{
|
||||
$formDatas = array();
|
||||
//장바구니인경우에만
|
||||
if ($entity->status == DEFAULTS['STATUS']) {
|
||||
$formDatas['status'] = 'unuse';
|
||||
}
|
||||
return $this->modify($entity, $formDatas);
|
||||
}
|
||||
}
|
||||
@ -98,6 +98,14 @@ class BoardModel extends BaseHierarchyModel
|
||||
}
|
||||
}
|
||||
|
||||
public function setIndexOrderBy(?string $field, ?string $order)
|
||||
{
|
||||
//계단식의 경우는 먼저 다른것보다 먼저 orderBy가 수행되어야 하므로
|
||||
$this->orderBy("grpno", "DESC");
|
||||
$this->orderBy("grporder", "DESC");
|
||||
parent::setIndexOrderBy($field, $order);
|
||||
}
|
||||
|
||||
//조회수 올리기
|
||||
final public function addViewCount(BoardEntity $entity, int $view_cnt = 1): BoardEntity
|
||||
{
|
||||
|
||||
@ -102,7 +102,10 @@ class CategoryModel extends BaseHierarchyModel
|
||||
}
|
||||
public function getEntitys(array $conditions = array()): array
|
||||
{
|
||||
return $this->where($conditions)->orderby("grpno DESC, grporder ASC")->findAll();
|
||||
$this->where($conditions);
|
||||
$this->orderBy("grpno", "DESC");
|
||||
$this->orderBy("grporder", "ASC");
|
||||
return $this->findAll();
|
||||
}
|
||||
public function create(array $formDatas): CategoryEntity
|
||||
{
|
||||
@ -125,4 +128,11 @@ class CategoryModel extends BaseHierarchyModel
|
||||
$this->orLike("head", $word, "both"); //befor , after , both
|
||||
$this->orLike("tail", $word, "both"); //befor , after , both
|
||||
}
|
||||
public function setIndexOrderBy(?string $field, ?string $order)
|
||||
{
|
||||
//계단식의 경우는 먼저 다른것보다 먼저 orderBy가 수행되어야 하므로
|
||||
$this->orderBy("grpno", "DESC");
|
||||
$this->orderBy("grporder", "ASC");
|
||||
parent::setIndexOrderBy($field, $order);
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ class OrderModel extends BaseModel
|
||||
parent::__construct('Order');
|
||||
$this->allowedFields = [
|
||||
...$this->allowedFields, 'product_uid', "user_uid",
|
||||
"name", "cost", "sale", "quantity", "price", "response",
|
||||
"name", "cost", "sale", "quantity", "price",
|
||||
"paymentday", "status"
|
||||
];
|
||||
$this->validationRules = [...$this->validationRules, ...$this->getFieldRules($this->allowedFields),];
|
||||
|
||||
48
app/Views/admin/billing/index.php
Normal file
48
app/Views/admin/billing/index.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?= $this->extend('layouts/admin') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_BillingHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?><?= getFieldIndex_Column_BillingHelper($field, $viewDatas) ?><?php endforeach ?>
|
||||
<th>@</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $cnt = 0 ?>
|
||||
<?php foreach ($viewDatas['entitys'] as $entity) : ?>
|
||||
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
|
||||
<td nowrap>
|
||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
|
||||
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?>
|
||||
</td>
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||
<td><?= getFieldIndex_Row_BillingHelper_Admin($field, $entity, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
|
||||
</tr>
|
||||
<?php $cnt++ ?>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="bottom">
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
||||
<?php foreach ($viewDatas['batchjobFilters'] as $field) : ?><?= getFieldFilter_BillingHelper($field, DEFAULTS['EMPTY'], $viewDatas) ?><?php endforeach ?>
|
||||
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")) ?></li>
|
||||
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
|
||||
</ul>
|
||||
<?= $viewDatas['pagination'] ?>
|
||||
</div>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
37
app/Views/front/billing/index.php
Normal file
37
app/Views/front/billing/index.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?= $this->extend('layouts/front') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div><?= html_entity_decode($viewDatas['category']->head) ?></div>
|
||||
<div class="top"><?= $this->include('templates/front/index_head') ?></div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?><?= getFieldIndex_Column_BillingHelper($field, $viewDatas) ?><?php endforeach ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $cnt = 0 ?>
|
||||
<?php foreach ($viewDatas['entitys'] as $entity) : ?>
|
||||
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
|
||||
<td nowrap>
|
||||
<!-- 사용자가 자신의 작성한것인지 확인되면 update 가능-->
|
||||
<?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
|
||||
</td>
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||
<td><?= getFieldIndex_Row_BillingHelper($field, $entity, $viewDatas) ?></td>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
<?php $cnt++ ?>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="bottom">
|
||||
<?= $viewDatas['pagination'] ?>
|
||||
</div>
|
||||
<?= form_close() ?>
|
||||
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
23
app/Views/front/order/deposit/billing.php
Normal file
23
app/Views/front/order/deposit/billing.php
Normal file
@ -0,0 +1,23 @@
|
||||
<link href="/css/front/billing.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<table id="billing">
|
||||
<tr>
|
||||
<td class="label">상품명</td>
|
||||
<td class="column"><?= $viewDatas['entity']->getTitle() ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">결제금액</td>
|
||||
<td class="column"><?= number_format($viewDatas['entity']->price) ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">은행명</td>
|
||||
<td class="column"><?= $viewDatas['bank']['name'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">계좌번호</td>
|
||||
<td class="column"><?= $viewDatas['bank']['account'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">예금주</td>
|
||||
<td class="column"><?= $viewDatas['bank']['holder'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1,13 +1,16 @@
|
||||
<!-- DEBUG-VIEW START 7 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">개인정보</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
<a href="http://localhost:8080/front/order?category=28" target="_self">청구서정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 7 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- DEBUG-VIEW START 5 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">AboutUS</div>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/sitepage?category=15" target="_self">회사소개</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 5 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- DEBUG-VIEW START 6 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">AboutUS</div>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/sitepage?category=15" target="_self">회사소개</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 6 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- DEBUG-VIEW START 3 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 6 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">Hosting</div>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/sitepage?category=18" target="_self">신청절차</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 3 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 6 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- DEBUG-VIEW START 4 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 7 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">Hosting</div>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/sitepage?category=18" target="_self">신청절차</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 4 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 7 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<!-- DEBUG-VIEW START 1 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 5 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">Service</div>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/sitepage?category=20" target="_self">기타서비스</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/sitepage?category=21" target="_self">회선서비스</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/sitepage?category=20" target="_self">기타서비스</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 1 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 5 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<!-- DEBUG-VIEW START 2 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 4 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">Service</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/sitepage?category=20" target="_self">기타서비스</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/sitepage?category=21" target="_self">회선서비스</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/sitepage?category=20" target="_self">기타서비스</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 2 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 4 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
<!-- DEBUG-VIEW START 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">개인정보</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/order?category=28" target="_self">청구서정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
16
app/Views/layouts/front/left_menu/leftmenu_24.php
Normal file
16
app/Views/layouts/front/left_menu/leftmenu_24.php
Normal file
@ -0,0 +1,16 @@
|
||||
<!-- DEBUG-VIEW START 1 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">컴퓨터주변기기 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/product?category=24" target="_self">CPU</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=25" target="_self">Memory</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=26" target="_self">HDD(SSD)</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 1 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
16
app/Views/layouts/front/left_menu/leftmenu_25.php
Normal file
16
app/Views/layouts/front/left_menu/leftmenu_25.php
Normal file
@ -0,0 +1,16 @@
|
||||
<!-- DEBUG-VIEW START 2 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">컴퓨터주변기기 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=24" target="_self">CPU</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/product?category=25" target="_self">Memory</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=26" target="_self">HDD(SSD)</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 2 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
16
app/Views/layouts/front/left_menu/leftmenu_26.php
Normal file
16
app/Views/layouts/front/left_menu/leftmenu_26.php
Normal file
@ -0,0 +1,16 @@
|
||||
<!-- DEBUG-VIEW START 3 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">컴퓨터주변기기 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=24" target="_self">CPU</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=25" target="_self">Memory</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/product?category=26" target="_self">HDD(SSD)</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 3 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
@ -1,16 +1,16 @@
|
||||
<!-- DEBUG-VIEW START 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">개인정보</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/payment?category=12" target="_self">결제정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
<a href="http://localhost:8080/front/order?category=28" target="_self">청구서정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- DEBUG-VIEW START 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 17 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">Support</div>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/board?category=4" target="_self">자료실</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 17 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<!-- DEBUG-VIEW START 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 18 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">Support</div>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/board?category=4" target="_self">자료실</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 18 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- DEBUG-VIEW START 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 15 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">네트워크</div>
|
||||
<div class="title">네트워크 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/product?category=5" target="_self">월이용권</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/product?category=6" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 15 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- DEBUG-VIEW START 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 16 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">네트워크</div>
|
||||
<div class="title">네트워크 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=5" target="_self">월이용권</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/product?category=6" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 16 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- DEBUG-VIEW START 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">서버</div>
|
||||
<div class="title">서버 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling active">
|
||||
<a href="http://localhost:8080/front/product?category=8" target="_self">월이용권</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/product?category=9" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- DEBUG-VIEW START 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW START 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title">서버</div>
|
||||
<div class="title">서버 구매대행</div>
|
||||
</div>
|
||||
<div class="sibling ">
|
||||
<a href="http://localhost:8080/front/product?category=8" target="_self">월이용권</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
@ -10,4 +10,4 @@
|
||||
<a href="http://localhost:8080/front/product?category=9" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- DEBUG-VIEW ENDED 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
<!-- DEBUG-VIEW ENDED 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
About US
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDarkDropdownMenuLink">
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 14 ? "active" : "" ?>" href=" /front/sitepage?category=14">인사말</a></li>
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 14 ? "active" : "" ?>" href="/front/sitepage?category=14">인사말</a></li>
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 15 ? "active" : "" ?>" href="/front/sitepage?category=15">회사소개</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
Hosting
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDarkDropdownMenuLink">
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 17 ? "active" : "" ?>" href=" /front/sitepage?category=17">제품안내</a></li>
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 17 ? "active" : "" ?>" href="/front/sitepage?category=17">제품안내</a></li>
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 18 ? "active" : "" ?>" href="/front/sitepage?category=18">신청절차</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
Service
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDarkDropdownMenuLink">
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 20 ? "active" : "" ?>" href="/front/sitepage?category=20">기타서비스</a></li>
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 21 ? "active" : "" ?>" href=" /front/sitepage?category=21">회선서비스</a></li>
|
||||
<li><a class="dropdown-item <?= $viewDatas['category']->getPrimaryKey() == 20 ? "active" : "" ?>" href="/front/sitepage?category=20">기타서비스</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
"twbs/bootstrap": "5.2.3",
|
||||
"guzzlehttp/guzzle": "^7.7",
|
||||
"google/apiclient": "2.12.1",
|
||||
"tinymce/tinymce": "^6.6"
|
||||
"tinymce/tinymce": "^6.6",
|
||||
"dompdf/dompdf": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9",
|
||||
|
||||
18
public/css/front/billing.css
Normal file
18
public/css/front/billing.css
Normal file
@ -0,0 +1,18 @@
|
||||
/* ------------------------------------------------------------
|
||||
* Name : admin.css
|
||||
* Desc : Admin StyleSheet
|
||||
* Created : 2016/9/11 Tri-aBility by Junheum,Choi
|
||||
* Updated :
|
||||
------------------------------------------------------------ */
|
||||
table#billing td {
|
||||
text-align: center;
|
||||
color:white;
|
||||
padding-right:5px;
|
||||
/* border: 1px solid blue; */
|
||||
}
|
||||
table#billing td {
|
||||
height: 27px;
|
||||
}
|
||||
table#billing td.label {
|
||||
width: 15%;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user