dbms_init...1

This commit is contained in:
choi.jh 2025-07-07 16:10:31 +09:00
parent 13017d648d
commit f246403a6a
14 changed files with 59 additions and 226 deletions

View File

@ -36,18 +36,6 @@ class ClientController extends CustomerController
} }
return $this->_helper; return $this->_helper;
} }
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
{
switch ($this->getAction()) {
case 'index':
$result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'client');
break;
default:
$result = parent::getResultSuccess($message, $actionTemplate);
break;
}
return $result;
}
//Index,FieldForm관련 //Index,FieldForm관련
protected function setValidation(Validation $validation, string $field, string $rule): Validation protected function setValidation(Validation $validation, string $field, string $rule): Validation
{ {

View File

@ -71,9 +71,6 @@ class ServicePaymentController extends CustomerController
} }
$result = view($view_file, ['viewDatas' => $this->getViewDatas()]); $result = view($view_file, ['viewDatas' => $this->getViewDatas()]);
break; break;
case 'index':
$result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'payment');
break;
default: default:
$result = parent::getResultSuccess($message, $actionTemplate); $result = parent::getResultSuccess($message, $actionTemplate);
break; break;

View File

@ -423,6 +423,9 @@ class CommonHelper
// "onclick" => "return submitBatchJobDelete()" // "onclick" => "return submitBatchJobDelete()"
]); ]);
break; break;
default:
$action = "";
break;
} }
return $action; return $action;
} }

View File

@ -73,6 +73,7 @@ class ClientHelper extends CustomerHelper
case 'modify': case 'modify':
$action = !$this->getMyAuth()->isAccessRole(['security']) ? $viewDatas['cnt'] : parent::getListButton($action, $label, $viewDatas, $extras); $action = !$this->getMyAuth()->isAccessRole(['security']) ? $viewDatas['cnt'] : parent::getListButton($action, $label, $viewDatas, $extras);
break; break;
case 'create':
case 'delete': case 'delete':
case 'batchjob': case 'batchjob':
case 'batchjob_delete': case 'batchjob_delete':

View File

@ -38,20 +38,20 @@ class ServicePaymentHelper extends CustomerHelper
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
{ {
switch ($action) { switch ($action) {
case 'create':
case 'batchjob':
case 'batchjob_delete':
$action = "";
break;
case 'delete':
$action = $viewDatas['entity']->getStatus() !== DEFAULTS['STATUS'] ? "" : parent::getListButton($action, $label, $viewDatas, $extras);
break;
case 'invoice': case 'invoice':
$action = form_submit($action . "_submit", '청구서 발행', [ $action = form_submit($action . "_submit", '청구서 발행', [
"formaction" => current_url() . '/' . $action, "formaction" => current_url() . '/' . $action,
"class" => "btn btn-outline btn-primary", "class" => "btn btn-outline btn-primary",
// "onclick" => "return submitBatchJob()"
]); ]);
break; break;
case 'delete':
if ($viewDatas['entity']->getStatus() !== DEFAULTS['STATUS']) {
$action = "";
} else {
$action = parent::getListButton($action, $label, $viewDatas, $extras);
}
break;
default: default:
$action = parent::getListButton($action, $label, $viewDatas, $extras); $action = parent::getListButton($action, $label, $viewDatas, $extras);
break; break;

View File

@ -36,18 +36,12 @@ class MyLogHelper extends CommonHelper
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
{ {
switch ($action) { switch ($action) {
case 'create':
$action = "";
break;
case 'modify': case 'modify':
$action = $viewDatas['cnt']; $action = $viewDatas['cnt'];
break; break;
case 'create':
case 'delete': case 'delete':
$action = "";
break;
case 'batchjob': case 'batchjob':
$action = "";
break;
case 'batchjob_delete': case 'batchjob_delete':
$action = ""; $action = "";
break; break;

View File

@ -1,62 +0,0 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
<?= $this->section('content') ?>
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div>
<!-- Layout Middle Start -->
<table class="layout_middle">
<tr>
<td class="layout_left">
<!-- Layout Left Start -->
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
<!-- Layout Left End -->
</td>
<td class="layout_right">
<!-- Layout Right Start -->
<div class="index_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div>
<div id="container" class="layout_content">
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body">
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
<thead>
<tr>
<th class="index_head_short_column">번호</th>
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
<?php endforeach ?>
<th class="index_head_short_column">작업</th>
</tr>
</thead>
<tbody>
<?php $cnt = 0 ?>
<?php foreach ($viewDatas['entities'] as $entity): ?>
<?php $viewDatas['entity'] = $entity; ?>
<tr <?= $viewDatas['helper']->getListRowColor($entity) ?>>
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
<td><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
<?php endforeach ?>
<td nowrap>
<?= $viewDatas['helper']->getListButton('view', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('history', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('delete', '', $viewDatas) ?>
</td>
</tr>
<?php $cnt++ ?>
<?php endforeach ?>
</tbody>
</table>
<?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
<?= form_close() ?>
</div>
</div>
<div class="index_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
<!-- Layout Right End -->
</td>
</tr>
</table>
<!-- Layout Middle End -->
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div>
<?= $this->endSection() ?>

View File

@ -12,7 +12,7 @@
</td> </td>
<td class="layout_right"> <td class="layout_right">
<!-- Layout Right Start --> <!-- Layout Right Start -->
<div class="index_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div> <div class="layout_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div>
<div id="container" class="layout_content"> <div id="container" class="layout_content">
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body"> <div class="index_body">
@ -40,6 +40,7 @@
<?php endforeach ?> <?php endforeach ?>
<td nowrap> <td nowrap>
<?= $viewDatas['helper']->getListButton('view', '', $viewDatas) ?>&nbsp; <?= $viewDatas['helper']->getListButton('view', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('history', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('delete', '', $viewDatas) ?> <?= $viewDatas['helper']->getListButton('delete', '', $viewDatas) ?>
</td> </td>
</tr> </tr>
@ -51,7 +52,7 @@
<?= form_close() ?> <?= form_close() ?>
</div> </div>
</div> </div>
<div class="index_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div> <div class="layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
<!-- Layout Right End --> <!-- Layout Right End -->
</td> </td>
</tr> </tr>

View File

@ -1,61 +0,0 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
<?= $this->section('content') ?>
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div>
<!-- Layout Middle Start -->
<table class="layout_middle">
<tr>
<td class="layout_left">
<!-- Layout Left Start -->
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
<!-- Layout Left End -->
</td>
<td class="layout_right">
<!-- Layout Right Start -->
<div class="index_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div>
<div id="container" class="layout_content">
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body">
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
<thead>
<tr>
<th class="index_head_short_column">번호</th>
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
<?php endforeach ?>
<th class="index_head_short_column">작업</th>
</tr>
</thead>
<tbody>
<?php $cnt = 0 ?>
<?php foreach ($viewDatas['entities'] as $entity): ?>
<?php $viewDatas['entity'] = $entity; ?>
<tr <?= $viewDatas['helper']->getListRowColor($entity) ?>>
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
<td><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
<?php endforeach ?>
<td nowrap>
<?= $viewDatas['helper']->getListButton('view', '', $viewDatas) ?>&nbsp;
<?= $viewDatas['helper']->getListButton('delete', '', $viewDatas) ?>
</td>
</tr>
<?php $cnt++ ?>
<?php endforeach ?>
</tbody>
</table>
<?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
<?= form_close() ?>
</div>
</div>
<div class="index_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
<!-- Layout Right End -->
</td>
</tr>
</table>
<!-- Layout Middle End -->
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div>
<?= $this->endSection() ?>

View File

@ -5,24 +5,7 @@
<div id="container" class="layout_content"> <div id="container" class="layout_content">
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body"> <div class="index_body">
<?= form_open(current_url(), ["method" => "get"]) ?> <?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
<nav class="index_top navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="condition nav">
조건:
<?php foreach ($viewDatas['control']['filter_fields'] as $field): ?>
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ? $viewDatas[$field] : old($field), $viewDatas, ['index_content_top_filter' => 'true']) ?>&nbsp;
<?php endforeach ?>
<button class="btn btn-outline-primary" type="submit">검색</button>
</nav>
<nav class="pageinfo nav justify-content-end">
Page:<?= $viewDatas['page'] ?>/<?= $viewDatas['total_page'] ?>
<?= form_dropdown('per_page', $viewDatas['page_options'], $viewDatas['per_page'], ['onChange' => 'this.form.submit()']) ?>
/ :<?= $viewDatas['total_count'] ?>
</nav>
</div>
</nav>
<?= form_close() ?>
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?> <?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table"> <table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
<thead> <thead>
@ -53,9 +36,11 @@
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?= form_close() ?>
<?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?> <?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
<?= form_close() ?>
</div> </div>
</div> </div>
<!-- Layout Middle End --> <div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?></div>
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script>
<!-- Layout Right End -->
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -47,16 +47,8 @@
<tr> <tr>
<td colspan="<?= count($viewDatas['control']['index_fields']) + 2 ?>"> <td colspan="<?= count($viewDatas['control']['index_fields']) + 2 ?>">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<tr> <tr><?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?><th data-rtc-resizable="<?= $item_type ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($item_type, $label, $viewDatas) ?></th><?php endforeach ?></tr>
<?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?> <tr><?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?><td><?= $viewDatas['helper']->getFieldView($item_type, $entity->$item_type, $viewDatas) ?></td><?php endforeach ?></tr>
<th data-rtc-resizable="<?= $item_type ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($item_type, $label, $viewDatas) ?></th>
<?php endforeach ?>
</tr>
<tr>
<?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?>
<td><?= $viewDatas['helper']->getFieldView($item_type, $entity->$item_type, $viewDatas) ?></td>
<?php endforeach ?>
</tr>
</table> </table>
</td> </td>
</tr> </tr>
@ -67,8 +59,6 @@
<?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?> <?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
<?= form_close() ?> <?= form_close() ?>
</div> </div>
<div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?></div>
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script>
</div> </div>
<div class="layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div> <div class="layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
<!-- Layout Right End --> <!-- Layout Right End -->

View File

@ -1,32 +1,29 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?> <?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
<div id="container" class="content"> <div id="container" class="content action_form">
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" /> <link href=" /css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
<div class="action_form"> <div class=" row">
<table class="table table-bordered"> <div class="col-sm-4">
<?php $loop = false ?> <table class="table table-bordered">
<?php $rowspan = count($viewDatas['control']['view_fields']) ?> <?php foreach ($viewDatas['control']['view_fields'] as $field): ?>
<?php foreach ($viewDatas['control']['view_fields'] as $field): ?> <tr>
<tr> <th nowrap class="text-end" width="15%"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
<th nowrap class="text-end" width="15%"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th> <td nowrap class="text-start" width="15%"><?= $viewDatas['helper']->getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?></td>
<td nowrap class="text-start" width="15%"><?= $viewDatas['helper']->getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?></td> </tr>
<?php if (!$loop): ?> <?php endforeach; ?>
<td rowspan="<?= $rowspan ?>"> </table>
<table class="table table-bordered table-hover table-striped"> </div>
<?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?> <div class="col-sm-8">
<tr> <table class="table table-bordered table-hover table-striped">
<th nowrap class="text-end" width="15%" data-rtc-resizable="<?= $item_type ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($item_type, $label, $viewDatas) ?></th> <?php foreach (SERVICE_ITEM_TYPES as $item_type => $label): ?>
<td nowrap class="text-start"><?= $viewDatas['helper']->getFieldView($item_type, $viewDatas['entity']->$item_type, $viewDatas) ?></td> <tr>
</tr> <th nowrap class="text-end" width="15%" data-rtc-resizable="<?= $item_type ?>" nowrap><?= $viewDatas['helper']->getFieldLabel($item_type, $label, $viewDatas) ?></th>
<?php endforeach ?> <td nowrap class="text-start"><?= $viewDatas['helper']->getFieldView($item_type, $viewDatas['entity']->$item_type, $viewDatas) ?></td>
</table> </tr>
</td> <?php endforeach ?>
<?php $loop = true ?> </table>
<?php endif ?> </div>
</tr>
<?php endforeach; ?>
</table>
</div> </div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,2 +1,2 @@
<div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?></div> <div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?></div>
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script> <script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script>

View File

@ -1,11 +1,11 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="nav-item"> <li class="nav-item">
<span class="nav-item navbar-brand" aria-current="page"> <span class="nav-item navbar-brand" aria-current="page">
<h4>&nbsp;&nbsp;<?= ICONS['DESKTOP'] ?> <?= $viewDatas['content_title'] ?>&nbsp;&nbsp;</h4> <h4>&nbsp;&nbsp;<?= ICONS['DESKTOP'] ?> <?= $viewDatas['content_title'] ?>&nbsp;&nbsp;</h4>
</span> </span>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<span class="nav-link active" aria-current="page" data-bs-toggle="modal" data-bs-target="#index_header_dns" style="cursor:pointer;">Cloudflare DNS</span> <span class="nav-link active" aria-current="page" data-bs-toggle="modal" data-bs-target="#index_header_dns" style="cursor:pointer;">Cloudflare DNS</span>
</li> </li>
</ul> </ul>
<?= $this->include("templates/{$viewDatas['layout']}/index_header/dns"); ?> <?= $this->include("templates/{$viewDatas['layout']}/index_header/dns"); ?>