shoppingmallv2 init...
This commit is contained in:
parent
6a44623aa0
commit
e95cfa73fa
@ -39,9 +39,9 @@ $routes->get('/login', 'AuthController::login');
|
||||
$routes->post('/signup', 'AuthController::signup/local');
|
||||
$routes->get('/signup/(:alpha)', 'AuthController::signup/$1');
|
||||
$routes->get('/logout', 'AuthController::logout');
|
||||
$routes->group('cart', ['namespace' => 'App\Controllers'], static function ($routes) {
|
||||
$routes->post('addCart', 'CartController::addCart');
|
||||
$routes->get('cancelCart/(:uuid)', 'CartController::cancelCart/$1');
|
||||
$routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function ($routes) {
|
||||
$routes->post('addCart', 'EcommerceController::addCart');
|
||||
$routes->get('cancelCart/(:uuid)', 'EcommerceController::cancelCart/$1');
|
||||
});;
|
||||
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
|
||||
});
|
||||
@ -95,6 +95,39 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->post('batchjob', 'BoardController::batchjob');
|
||||
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
||||
});
|
||||
$routes->group('category', static function ($routes) {
|
||||
$routes->get('', 'CategoryController::index');
|
||||
$routes->get('excel', 'CategoryController::excel/$1');
|
||||
$routes->get('insert', 'CategoryController::insert_form');
|
||||
$routes->post('insert', 'CategoryController::insert');
|
||||
$routes->get('update/(:num)', 'CategoryController::update_form/$1');
|
||||
$routes->post('update/(:num)', 'CategoryController::update/$1');
|
||||
$routes->get('view/(:num)', 'CategoryController::view/$1');
|
||||
$routes->get('reply/(:num)', 'CategoryController::reply_form/$1');
|
||||
$routes->post('reply/(:num)', 'CategoryController::reply/$1');
|
||||
$routes->get('delete/(:num)', 'CategoryController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:num)/(:hash)', 'CategoryController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'CategoryController::batchjob');
|
||||
});
|
||||
$routes->group('product', static function ($routes) {
|
||||
$routes->get('', 'ProductController::index');
|
||||
$routes->get('excel', 'ProductController::excel/$1');
|
||||
$routes->get('insert', 'ProductController::insert_form');
|
||||
$routes->post('insert', 'ProductController::insert');
|
||||
$routes->get('update/(:uuid)', 'ProductController::update_form/$1');
|
||||
$routes->post('update/(:uuid)', 'ProductController::update/$1');
|
||||
$routes->get('view/(:uuid)', 'ProductController::view/$1');
|
||||
$routes->get('delete/(:uuid)', 'ProductController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:uuid)/(:hash)', 'ProductController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'ProductController::batchjob');
|
||||
});
|
||||
$routes->group('order', static function ($routes) {
|
||||
$routes->get('', 'OrderController::index');
|
||||
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
||||
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:uuid)/(:hash)', 'OrderController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'OrderController::batchjob`');
|
||||
});
|
||||
});
|
||||
$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) {
|
||||
@ -115,6 +148,15 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou
|
||||
$routes->get('delete/(:num)', 'BoardController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
||||
});
|
||||
$routes->group('product', static function ($routes) {
|
||||
$routes->get('', 'ProductController::index');
|
||||
$routes->get('excel', 'ProductController::excel/$1');
|
||||
$routes->get('view/(:uuid)', 'ProductController::view/$1');
|
||||
});
|
||||
$routes->group('order', static function ($routes) {
|
||||
$routes->get('', 'OrderController::index');
|
||||
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
||||
});;
|
||||
});
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
|
||||
@ -61,28 +61,4 @@ class UserController extends AdminController
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,12 +17,12 @@ function getFieldForm_UserHelper($field, $value, array $fieldFormOptions, array
|
||||
$value = $value ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'role':
|
||||
// $fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("User.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
||||
// return form_dropdown($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes, 'class' => "select-field"]);
|
||||
foreach ($fieldFormOptions[$field] as $key => $label) {
|
||||
$checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, is_array($value) ? [...$value] : [$value]), $attributes) . $label;
|
||||
}
|
||||
return implode(" ", $checkboxs);
|
||||
$fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("User.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
||||
return form_dropdown($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes, 'class' => "select-field"]);
|
||||
// foreach ($fieldFormOptions[$field] as $key => $label) {
|
||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, is_array($value) ? [...$value] : [$value]), $attributes) . $label;
|
||||
// }
|
||||
// return implode(" ", $checkboxs);
|
||||
// return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
||||
break;
|
||||
case "status":
|
||||
|
||||
@ -5,5 +5,6 @@
|
||||
<div class="accordion accordion-flush">
|
||||
<?= $this->include($layout['path'] . '/left_menu/base'); ?>
|
||||
<?= $this->include($layout['path'] . '/left_menu/board'); ?>
|
||||
<?= $this->include($layout['path'] . '/left_menu/shoppingmall'); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,10 +0,0 @@
|
||||
<!-- left menu start -->
|
||||
<link href="/css/admin/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/side_menu.js"></script>
|
||||
<div id="left_menu" class="shadow-lg rounded">
|
||||
<div class="accordion accordion-flush">
|
||||
<?= $this->include($layout['path'] . '/left_menu/base'); ?>
|
||||
<?= $this->include($layout['path'] . '/left_menu/board'); ?>
|
||||
<?= $this->include($layout['path'] . '/left_menu/shoppingmall'); ?>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user