Automation init...4
This commit is contained in:
parent
d35a2124b8
commit
29cbb53e04
@ -176,7 +176,6 @@ define('ICONS', [
|
|||||||
'FLAG' => '<i class="bi bi-send"></i>',
|
'FLAG' => '<i class="bi bi-send"></i>',
|
||||||
'SEARCH' => '<i class="bi bi-search"></i>',
|
'SEARCH' => '<i class="bi bi-search"></i>',
|
||||||
'EXCEL' => '<img src="/images/common/excel.png"/>',
|
'EXCEL' => '<img src="/images/common/excel.png"/>',
|
||||||
'HOME' => '<i class="bi bi-house-door-fill"></i>',
|
|
||||||
'PLAY' => '<i class="bi bi-play-fill"></i>',
|
'PLAY' => '<i class="bi bi-play-fill"></i>',
|
||||||
'CART' => '<i class="bi bi-cart4"></i>',
|
'CART' => '<i class="bi bi-cart4"></i>',
|
||||||
'CARD' => '<i class="bi bi-credit-card"></i>',
|
'CARD' => '<i class="bi bi-credit-card"></i>',
|
||||||
|
|||||||
@ -36,6 +36,7 @@ $routes->group('cloudflare', ['namespace' => 'App\Controllers\Cloudflare'], func
|
|||||||
$routes->group('account', function ($routes) {
|
$routes->group('account', function ($routes) {
|
||||||
$routes->get('/', 'AccountController::index');
|
$routes->get('/', 'AccountController::index');
|
||||||
$routes->get('create', 'AccountController::create_form');
|
$routes->get('create', 'AccountController::create_form');
|
||||||
|
$routes->post('create', 'AccountController::create');
|
||||||
});
|
});
|
||||||
$routes->group('zone', function ($routes) {
|
$routes->group('zone', function ($routes) {
|
||||||
$routes->get('/', 'ZoneController::index');
|
$routes->get('/', 'ZoneController::index');
|
||||||
|
|||||||
@ -26,8 +26,8 @@ abstract class MVController extends CommonController
|
|||||||
throw new \Exception(__FUNCTION__ . "에서 {$field}의 데이터가 array가 아닙니다.\n" . var_export($temps, true));
|
throw new \Exception(__FUNCTION__ . "에서 {$field}의 데이터가 array가 아닙니다.\n" . var_export($temps, true));
|
||||||
}
|
}
|
||||||
$options = [
|
$options = [
|
||||||
["" => lang($this->class_name . '.label.' . $field) . ' 선택'],
|
"" => lang($this->class_name . '.label.' . $field) . ' 선택',
|
||||||
lang($this->class_name . '.' . strtoupper($field)),
|
...lang($this->class_name . '.' . strtoupper($field)),
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ abstract class MVController extends CommonController
|
|||||||
protected function validateFormData(): void
|
protected function validateFormData(): void
|
||||||
{
|
{
|
||||||
//변경할 값 확인 : Upload된 파일 검증시 $this->request->getVar()보다 먼처 체크필요
|
//변경할 값 확인 : Upload된 파일 검증시 $this->request->getVar()보다 먼처 체크필요
|
||||||
$validation = \Config\Services::validation();
|
$validation = service('validation');
|
||||||
$validation->setRules($this->getModel()->getFieldRules($this->fields));
|
$validation->setRules($this->getModel()->getFieldRules($this->fields));
|
||||||
if (!$validation->withRequest($this->request)->run()) {
|
if (!$validation->withRequest($this->request)->run()) {
|
||||||
throw new \Exception("데이터 검증 오류발생\n" . implode("\n", $this->validator->getErrors()));
|
throw new \Exception("데이터 검증 오류발생\n" . implode("\n", $validation->getErrors()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//전송된 데이터
|
//전송된 데이터
|
||||||
|
|||||||
@ -37,16 +37,17 @@ class Account extends MyCloudflare
|
|||||||
// ]
|
// ]
|
||||||
protected function getArrayByResult($result): array
|
protected function getArrayByResult($result): array
|
||||||
{
|
{
|
||||||
$formDatas[$this->getMyStorage()->getPKField()] = $result->id;
|
$formDatas[$this->getMyStorage()->getPKField()] = $result->id;
|
||||||
$formDatas[$this->getMyStorage()->getTitleField()] = $result->name;
|
$formDatas[$this->getMyStorage()->getTitleField()] = $result->name;
|
||||||
$formDatas['type'] = $result->type;
|
$formDatas['type'] = $result->type;
|
||||||
$formDatas['status'] = 'use';
|
$formDatas['status'] = 'use';
|
||||||
$formDatas['updated_at'] = $result->created_on;
|
$formDatas['updated_at'] = $result->created_on;
|
||||||
$formDatas['created_at'] = $result->created_on;
|
$formDatas['created_at'] = $result->created_on;
|
||||||
return $formDatas;
|
return $formDatas;
|
||||||
}
|
}
|
||||||
public function create(array $formDatas): AccountEntity
|
public function create(array $formDatas): AccountEntity
|
||||||
{
|
{
|
||||||
|
throw new \Exception(var_dump($formDatas));
|
||||||
//Socket용
|
//Socket용
|
||||||
$cf = $this->getMySocket()->request($formDatas['apikey'])
|
$cf = $this->getMySocket()->request($formDatas['apikey'])
|
||||||
->post('accounts', [
|
->post('accounts', [
|
||||||
@ -59,7 +60,7 @@ class Account extends MyCloudflare
|
|||||||
}
|
}
|
||||||
//Storage용
|
//Storage용
|
||||||
$formDatas = $this->getArrayByResult($cf->result);
|
$formDatas = $this->getArrayByResult($cf->result);
|
||||||
$entity = $this->getMyStorage()->create($formDatas);
|
$entity = $this->getMyStorage()->create($formDatas);
|
||||||
log_message("notice", "Account::" . __FUNCTION__ . "=> 작업을 완료하였습니다.");
|
log_message("notice", "Account::" . __FUNCTION__ . "=> 작업을 완료하였습니다.");
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,25 +24,19 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<div class="row">
|
<div class="head">
|
||||||
<div class="head col-12">
|
<?= $this->include($viewDatas['layout']['path'] . '/head'); ?>
|
||||||
<?= $this->include($viewDatas['layout']['path'] . '/head'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="background-color:white;">
|
<div class="center">
|
||||||
<div class="left_menu col-1">
|
<div class="left_menu"><?= $this->include($viewDatas['layout']['path'] . '/left_menu'); ?></div>
|
||||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu'); ?>
|
<div class="content">
|
||||||
</div>
|
|
||||||
<div class="content col-11">
|
|
||||||
<div class="header"><?= $this->include('templates/admin/header'); ?></div>
|
<div class="header"><?= $this->include('templates/admin/header'); ?></div>
|
||||||
<div class="center"><?= $this->renderSection('content') ?></div>
|
<div class="center"><?= $this->renderSection('content') ?></div>
|
||||||
<div class="footer"><?= $this->include('templates/admin/footer'); ?></div>
|
<div class="footer"><?= $this->include('templates/admin/footer'); ?></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=" row">
|
<div class="tail">
|
||||||
<div class="tail col-12">
|
<?= $this->include($viewDatas['layout']['path'] . '/tail'); ?>
|
||||||
<?= $this->include($viewDatas['layout']['path'] . '/tail'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
<!-- left menu start -->
|
<!-- left menu start -->
|
||||||
<link href="/css/admin/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
<link href="/css/admin/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
||||||
<script type="text/javascript" src="/js/admin/side_menu.js"></script>
|
<script type="text/javascript" src="/js/admin/side_menu.js"></script>
|
||||||
<div id="menu" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
|
<div id="left_menu" class="shadow-lg rounded" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
|
||||||
<div id="menu_button"><?= ICONS['MENU'] ?>메뉴</div>
|
<div id="accordion" class="accordion accordion-flush">
|
||||||
<div id="left_menu" class="shadow-lg rounded">
|
<div class="accordion-item" style="background-color: #eaeaea;">
|
||||||
<div class="accordion accordion-flush">
|
<h2><a href=" /admin"><i class="fa fa-home"></i>Main</a></h2>
|
||||||
<div class="accordion-item" style="background-color: #eaeaea;">
|
|
||||||
<h2><a href=" /admin"><i class="fa fa-home"></i>Main</a></h2>
|
|
||||||
</div>
|
|
||||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/base'); ?>
|
|
||||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/site'); ?>
|
|
||||||
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/shoppingmall'); ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/base'); ?>
|
||||||
|
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/site'); ?>
|
||||||
|
<?= $this->include($viewDatas['layout']['path'] . '/left_menu/shoppingmall'); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="menu_button">메뉴열기</div>
|
||||||
</div>
|
</div>
|
||||||
@ -5,23 +5,22 @@
|
|||||||
* Updated :
|
* Updated :
|
||||||
------------------------------------------------------------ */
|
------------------------------------------------------------ */
|
||||||
* {
|
* {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
body {
|
||||||
div.layout {
|
|
||||||
height: 100vw; /* 화면 넓이의 100% */
|
height: 100vw; /* 화면 넓이의 100% */
|
||||||
height: 100vh; /* 화면 높이의 100% */
|
height: 100vh; /* 화면 높이의 100% */
|
||||||
border: 1px solid red;
|
|
||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
/* border:1px solid blue; */
|
/* border:1px solid blue; */
|
||||||
}
|
}
|
||||||
|
div.layout > div.head {
|
||||||
div.layout > div.row > div.head {
|
|
||||||
height: 51px;
|
height: 51px;
|
||||||
border: 1px solid blue;
|
border: 1px solid gray;
|
||||||
background-color: #e3f2fd;
|
background-color: #f8f9fa;
|
||||||
}
|
}
|
||||||
div.layout > div.row > div.tail {
|
div.layout > div.tail {
|
||||||
height: 51px;
|
height: 51px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -31,34 +30,37 @@ div.layout > div.row > div.tail {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
div.layout > div.row > div.left_menu {
|
div.layout > div.center > div.content {
|
||||||
padding-left: 10px;
|
margin-top: 20px;
|
||||||
border: 1px solid green;
|
margin-left: 25px;
|
||||||
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
div.layout > div.row > div.content > div.header {
|
div.layout > div.center > div.content > div.header {
|
||||||
/*content 헤더라인*/
|
/*content 헤더라인*/
|
||||||
height: 50px;
|
height: 50px;
|
||||||
background-color: #e7e7e7;
|
background-color: #e7e7e7;
|
||||||
}
|
}
|
||||||
div.layout > div.row > div.content > div.header > ul.nav {
|
div.layout > div.center > div.content > div.header > ul.nav {
|
||||||
/*nav-tabs 헤더라인*/
|
/*nav-tabs 헤더라인*/
|
||||||
border-top: 1px solid red;
|
border-top: 1px solid gray;
|
||||||
border-left: 1px solid red;
|
border-left: 1px solid gray;
|
||||||
border-right: 1px solid red;
|
border-right: 1px solid gray;
|
||||||
border-radius: 10px 10px 0px 0px;
|
border-radius: 15px 15px 0px 0px;
|
||||||
}
|
}
|
||||||
div.layout > div.row > div.content > div.center {
|
div.layout > div.center > div.content > div.center {
|
||||||
/*content 부분*/
|
/*content 부분*/
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 10px;
|
padding: 15px;
|
||||||
/* border: 1px solid red; */
|
/* border: 1px solid gray; */
|
||||||
border-left: 1px solid red;
|
border-left: 1px solid gray;
|
||||||
border-right: 1px solid red;
|
border-right: 1px solid gray;
|
||||||
background-color: sivler;
|
background-color: white;
|
||||||
}
|
}
|
||||||
div.layout > div.row > div.content div.footer {
|
div.layout > div.center > div.content div.footer {
|
||||||
/*content 하단라인*/
|
/*content 하단라인*/
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border-bottom: 1px solid red;
|
border-left: 1px solid gray;
|
||||||
border-radius: 0px 0px 10px 10px;
|
border-right: 1px solid gray;
|
||||||
|
border-bottom: 1px solid gray;
|
||||||
|
border-radius: 0px 0px 15px 15px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,38 +1,34 @@
|
|||||||
div#menu {
|
div#left_menu {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
width: 20px;
|
|
||||||
border: 1px solid #e7e7e7;
|
border: 1px solid #e7e7e7;
|
||||||
padding: 0px;
|
|
||||||
}
|
}
|
||||||
div#menu > div#menu_button {
|
div#left_menu > div#menu_button {
|
||||||
float: right;
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: -20px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
|
writing-mode: vertical-rl; /* 세로로 글자를 출력 */
|
||||||
|
text-orientation: upright; /* 글자가 직립되도록 설정 */
|
||||||
border-radius: 0px 5px 5px 0px;
|
border-radius: 0px 5px 5px 0px;
|
||||||
border: 1px solid silver;
|
border: 1px solid silver;
|
||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
padding: 0px;
|
|
||||||
}
|
}
|
||||||
|
div#left_menu > div.accordion {
|
||||||
div#menu > div#left_menu {
|
|
||||||
z-index: 100;
|
|
||||||
width: 160px;
|
|
||||||
border: 1px solid silver;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
div#menu > div#left_menu > div.accordion {
|
|
||||||
/* display:none; */
|
/* display:none; */
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
width: 20px;
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
div#menu > div#left_menu > div.accordion > div.accordion-item:hover {
|
div#left_menu > div.accordion > div.accordion-item:hover {
|
||||||
background-color: #e7e7e7;
|
background-color: #e7e7e7;
|
||||||
}
|
}
|
||||||
div#menu > div#left_menu > div.accordion > div.accordion-item > a {
|
div#left_menu > div.accordion > div.accordion-item > a {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
div#menu > div#left_menu > div.accordion > div.accordion-collapse > a {
|
div#left_menu > div.accordion > div.accordion-collapse > a {
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,13 @@
|
|||||||
function sideMenuToggle (menu_id){
|
function sideMenuToggle(left_menu) {
|
||||||
var accordion = $(".accordion")[0];
|
$accordion = $("#accordion")[0];
|
||||||
// alert(accordion.clientWidth);
|
|
||||||
if (accordion.clientWidth == 0){
|
if (accordion.clientWidth == 0){
|
||||||
accordion.style.display = "block";
|
accordion.style.display = "block";
|
||||||
$("#"+menu_id).css({ "width": '250px' })
|
$("#accordion").css({ "width": '160px' })
|
||||||
$("#button"+menu_id).html("메뉴닫기");
|
$("#menu_button").html("메뉴닫기");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
accordion.style.display = "none";
|
accordion.style.display = "none";
|
||||||
$("#"+menu_id).css({"width":'28px'})
|
$("#accordion").css({"width":'20px'})
|
||||||
$("#button"+menu_id).html("메뉴열기");
|
$("#menu_button").html("메뉴열기");
|
||||||
}
|
}
|
||||||
}//toggleMenu
|
}//toggleMenu
|
||||||
Loading…
Reference in New Issue
Block a user