dbmsv4 init...1

This commit is contained in:
최준흠 2025-11-24 14:23:08 +09:00
parent d71a88c584
commit aeff69ca44
33 changed files with 180 additions and 288 deletions

View File

@ -280,7 +280,9 @@ define('KEYWORD', '일본IDC 일본서버 일본 서버 일본호스팅 서버
define('LAYOUTS', [ define('LAYOUTS', [
'empty' => [ 'empty' => [
'title' => KEYWORD, 'title' => KEYWORD,
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty', 'path' => 'empty',
'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'empty',
'template' => 'templates' . DIRECTORY_SEPARATOR . 'empty',
'metas' => [ 'metas' => [
'<meta charset="UTF-8">', '<meta charset="UTF-8">',
'<meta name="viewport" content="width=device-width, initial-scale=1.0">', '<meta name="viewport" content="width=device-width, initial-scale=1.0">',
@ -303,7 +305,9 @@ define('LAYOUTS', [
], ],
'front' => [ 'front' => [
'title' => KEYWORD, 'title' => KEYWORD,
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front', 'path' => 'front',
'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'front',
'template' => 'templates' . DIRECTORY_SEPARATOR . 'front',
'topmenus' => ['aboutus', 'hosting', 'service', 'support'], 'topmenus' => ['aboutus', 'hosting', 'service', 'support'],
'metas' => [ 'metas' => [
'<meta charset="UTF-8">', '<meta charset="UTF-8">',
@ -332,7 +336,9 @@ define('LAYOUTS', [
], ],
'admin' => [ 'admin' => [
'title' => '관리자화면', 'title' => '관리자화면',
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', 'path' => 'admin',
'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'admin',
'template' => 'templates' . DIRECTORY_SEPARATOR . 'admin',
'metas' => [ 'metas' => [
'<meta charset="UTF-8">', '<meta charset="UTF-8">',
'<meta name="viewport" content="width=device-width, initial-scale=1.0">', '<meta name="viewport" content="width=device-width, initial-scale=1.0">',
@ -351,7 +357,7 @@ define('LAYOUTS', [
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">', '<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">',
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">', '<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />', '<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
'<link rel="stylesheet" href="/venvor/tagify/dist/tagify.css">', '<link rel="stylesheet" href="/assets/tagify/dist/tagify.css">',
'<link rel="stylesheet" href="/css/common/style.css" />', '<link rel="stylesheet" href="/css/common/style.css" />',
], ],
'javascripts' => [ 'javascripts' => [
@ -359,8 +365,8 @@ define('LAYOUTS', [
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>', '<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>', '<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>',
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>', '<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
'<script src="/vendor/tinymce/tinymce.min.js" referrerpolicy="origin"></script>', '<script src="/assets/tinymce/tinymce.min.js" referrerpolicy="origin"></script>',
'<script src="/vendor/tagify/dist/tagify.js"></script>' '<script src="/assets/tagify/dist/tagify.js"></script>'
], ],
], ],
]); ]);

View File

@ -113,16 +113,19 @@ abstract class AbstractWebController extends Controller
protected function action_render_process(string $view_file, array $viewDatas, ?string $template_path = null): string protected function action_render_process(string $view_file, array $viewDatas, ?string $template_path = null): string
{ {
// dd($viewDatas); // dd($viewDatas);
$view_path = $viewDatas['layout']; $view_path = $viewDatas['layout']['path'];
if ($template_path) { if ($template_path) {
$view_path .= DIRECTORY_SEPARATOR . $template_path; $view_path .= '/' . $template_path;
} }
$view_datas = [ $full_path = $view_path . '/' . $view_file;
// echo $full_path;
// exit;
helper(['form', __FUNCTION__]);
return view($full_path, [
'viewDatas' => [
...$viewDatas, ...$viewDatas,
'forms' => ['attributes' => ['method' => "post",], 'hiddens' => []], 'forms' => ['attributes' => ['method' => "post",], 'hiddens' => []],
]; ]
]);
helper(['form', __FUNCTION__]);
return view($view_path . DIRECTORY_SEPARATOR . $view_file, ['viewDatas' => $view_datas]);
} }
} }

View File

@ -9,20 +9,19 @@ use Psr\Log\LoggerInterface;
abstract class AdminController extends CommonController abstract class AdminController extends CommonController
{ {
private $_layout = 'admin';
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{ {
parent::initController($request, $response, $logger); parent::initController($request, $response, $logger);
$this->addActionPaths('admin'); $this->addActionPaths($this->_layout);
}
final protected function getLayout(): string
{
return 'admin';
} }
protected function action_init_process(string $action, ?object $entity = null): void protected function action_init_process(string $action, ?object $entity = null): void
{ {
$this->service->action_init_process($action, $entity); $this->service->action_init_process($action, $entity);
parent::action_init_process($action, $entity); parent::action_init_process($action, $entity);
$this->addViewDatas('layout', $this->getLayout()); $layouts = LAYOUTS[$this->_layout];
array_push($layouts['javascripts'], '<script src="/js/admin/clipboard.js"></script>');
$this->addViewDatas('layout', $layouts);
$this->addViewDatas('title', $this->getTitle()); $this->addViewDatas('title', $this->getTitle());
$this->addViewDatas('helper', $this->service->getHelper()); $this->addViewDatas('helper', $this->service->getHelper());
$this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields());

View File

@ -0,0 +1,48 @@
<?php
namespace App\Controllers\Admin;
use App\Entities\Customer\ServiceEntity;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
class SearchController extends AdminController
{
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
if ($this->service === null) {
$this->service = service('customer_serviceservice');
}
$this->addActionPaths('service');
}
//Action작업관련
protected function getEntityClass(): string
{
return ServiceEntity::class;
}
//기본 함수 작업
//Custom 추가 함수
protected function index_entities_process(array $entities = []): array
{
$keyword = $this->request->getGet('keyword'); // 검색어
if (!$keyword) {
throw new \Exception("[{$keyword}] 검색어가 지정되지 않았습니다. ");
}
//검색어에 따른 서버정보를 검색 후 해당하는 서비스리스트를 가져온다.
$rows = service('equipment_serverservice')->getSearchServices($keyword);
$uids = [];
foreach ($rows as $row) {
$uids[] = "'{$row->serviceinfo_uid}'";
}
//서비스별 서버리스트
// $childServers = [];
foreach ($this->service->getEntities([sprintf("uid IN (%s)", implode(",", $uids)) => null]) as $entity) {
$entities[] = $entity;
// $childServers[$entity->getPK()] = $this->getService()->getServerService()->getEntities(['serviceinfo_uid' => $entity->getPK()]);
}
// $this->childServers = $childServers;
return $entities;
}
}

View File

@ -19,7 +19,7 @@ class ServerEntity extends EquipmentEntity
//기본기능용 //기본기능용
public function getCustomTitle(mixed $title = null): string public function getCustomTitle(mixed $title = null): string
{ {
return sprintf("[%s]%s", $this->getCode(), $title ? $title : $this->getIP()); return sprintf("[%s]%s / %s / %s", $this->getCode(), $title ? $title : $this->getIP(), $this->getSwitch(), $this->getOS());
} }
final public function getCode(): string final public function getCode(): string
{ {

View File

@ -49,7 +49,7 @@ class BoardForm extends CommonForm
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) { switch ($field) {
case 'worker_uid': case 'worker_uid':
foreach (service('userservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) { foreach ($this->getFormOption_process(service('userservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }

View File

@ -191,8 +191,7 @@ abstract class CommonForm
$entities = $service->getEntities(['status' => STATUS['AVAILABLE']]); $entities = $service->getEntities(['status' => STATUS['AVAILABLE']]);
break; break;
case 'modify_form': case 'modify_form':
$where = sprintf("status = '%s' OR uid=%s", STATUS['AVAILABLE'], $entity->$field); $where = sprintf("status = '%s' OR %s=%s", STATUS['AVAILABLE'], $this->getAttribute('pk_field'), $entity->$field);
echo $where;
$entities = $service->getEntities([$where => null]); $entities = $service->getEntities([$where => null]);
break; break;
default: default:

View File

@ -52,7 +52,7 @@ class ServiceForm extends CustomerForm
switch ($field) { switch ($field) {
case 'serverinfo_uid': case 'serverinfo_uid':
foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) { foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getCustomTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }
$options['options'] = $tempOptions; $options['options'] = $tempOptions;

View File

@ -50,9 +50,7 @@ class ServerForm extends EquipmentForm
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) { switch ($field) {
case 'serviceinfo_uid': case 'serviceinfo_uid':
foreach ( foreach ($this->getFormOption_process(service('customer_serviceservice'), $action, $field, $entity) as $entity) {
service('customer_serviceservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity
) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }

View File

@ -58,18 +58,14 @@ class ServerPartForm extends EquipmentForm
$options['options'] = $tempOptions; $options['options'] = $tempOptions;
break; break;
case 'serverinfo_uid': case 'serverinfo_uid':
foreach ( foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) {
service('equipment_serverservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity
) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }
$options['options'] = $tempOptions; $options['options'] = $tempOptions;
break; break;
case 'serviceinfo_uid': case 'serviceinfo_uid':
foreach ( foreach ($this->getFormOption_process(service('customer_clientservice'), $action, $field, $entity) as $entity) {
service('customer_serviceservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity
) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }

View File

@ -32,14 +32,14 @@ class IPForm extends PartForm
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) { switch ($field) {
case 'lineinfo_uid': case 'lineinfo_uid':
foreach (service('equipment_lineservice')->getEntities() as $entity) { foreach ($this->getFormOption_process(service('equipment_lineservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }
$options['options'] = $tempOptions; $options['options'] = $tempOptions;
break; break;
case 'old_clientinfo_uid': case 'old_clientinfo_uid':
foreach (service('customer_clientservice')->getEntities() as $entity) { foreach ($this->getFormOption_process(service('customer_clientservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }

View File

@ -40,14 +40,14 @@ abstract class PartForm extends CommonForm
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) { switch ($field) {
case 'serviceinfo_uid': case 'serviceinfo_uid':
foreach (service('customer_serviceservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) { foreach ($this->getFormOption_process(service('customer_serviceservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }
$options['options'] = $tempOptions; $options['options'] = $tempOptions;
break; break;
case 'serverinfo_uid': case 'serverinfo_uid':
foreach (service('equipment_serverservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) { foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }

View File

@ -46,7 +46,7 @@ class PaymentForm extends CommonForm
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"]; $tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) { switch ($field) {
case 'serviceinfo_uid': case 'serviceinfo_uid':
foreach (service('customer_serviceservice')->getEntities() as $entity) { foreach ($this->getFormOption_process(service('customer_serviceservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle(); $tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())]; // $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
} }

View File

@ -184,6 +184,7 @@ abstract class CommonHelper
if (in_array($field, $viewDatas['formFilters'])) { if (in_array($field, $viewDatas['formFilters'])) {
if ($value) { if ($value) {
if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) { if (!array_key_exists($value, $viewDatas['formOptions'][$field]['options'])) {
// dd($viewDatas['formOptions'][$field]['options']);
throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다."); throw new \Exception(__METHOD__ . "에서 오류발생: {$field}에서 {$value}에 해당하는 값이 존재하지 않습니다.");
} }
$value = !$value ? "" : $viewDatas['formOptions'][$field]['options'][$value]; $value = !$value ? "" : $viewDatas['formOptions'][$field]['options'][$value];

View File

@ -32,6 +32,10 @@ class ServiceHelper extends CustomerHelper
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
{ {
switch ($field) { switch ($field) {
case 'serverinfo_uid':
$value = $viewDatas['formOptions'][$field]['options'][$value];
$value = "<span class=\"serverparts\" style=\"cursor:pointer;\" onClick=\"copyServerPartToClipboard('{$value}?>')\" text-data=\"{$value}\">📋</span>{$value}";
break;
case 'amount': case 'amount':
case 'sale': case 'sale':
$value = number_format($value) . ""; $value = number_format($value) . "";
@ -54,7 +58,19 @@ class ServiceHelper extends CustomerHelper
} }
return $value; return $value;
} }
public function getListLabel(string $field, string $label, array $viewDatas, array $extras = []): string
{
switch ($field) {
case 'serverinfo_uid':
$label = parent::getListLabel($field, $label, $viewDatas, $extras);
$label .= "<span class=\"float-start rounded border border-primary\" style=\"cursor:pointer;\" onclick=\"copyServerPartsToClipboard()\">ALL 📋</span>";
break;
default:
$label = parent::getListLabel($field, $label, $viewDatas, $extras);
break;
}
return $label;
}
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) {

View File

@ -1,148 +0,0 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
<?php
// 레이아웃 및 템플릿 경로 설정
$layouts = LAYOUTS[$viewDatas['layout']]['path'];
$template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
// 데이터 API 엔드포인트 설정 (웹 뷰가 데이터를 요청할 주소)
// RequestTemplate=api 파라미터를 사용하여 해당 컨트롤러가 JSON을 반환하도록 유도합니다.
$dataApiEndpoint = current_url() . '?RequestTemplate=api';
$columnCount = count($viewDatas['formFields']) + 2; // 번호와 작업 컬럼 포함
?>
<?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div class="layout_top"><?= $this->include("{$layouts}/top"); ?></div>
<table class="layout_middle">
<tr>
<td class="layout_left"><?= $this->include("{$layouts}/left_menu"); ?></td>
<td class="layout_right">
<div class="layout_header"><?= $this->include("{$template}/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("{$template}/index_content_filter"); ?>
<?= 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="text-center bg-light">번호</th>
<?php foreach ($viewDatas['formFields'] as $field => $label): ?>
<th class="text-center bg-light"><?= $viewDatas['helper']->getListLabel($field, $label, $viewDatas) ?></th>
<?php endforeach ?>
<th class="text-center bg-light">작업</th>
</tr>
</thead>
<!-- API 호출로 데이터를 채울 영역 -->
<tbody id="data_list_tbody">
<tr>
<td colspan="<?= $columnCount ?>" class="text-center text-secondary p-5">목록 데이터를 로드 중입니다...</td>
</tr>
</tbody>
</table>
<!-- 페이지네이션 영역 (데이터 로드 JS로 업데이트) -->
<div id="pagination_area">
<?= $this->include("{$template}/index_content_bottom"); ?>
</div>
<?= form_close() ?>
</div>
</div>
<div class="layout_footer"><?= $this->include("{$template}/index_footer"); ?></div>
</td>
</tr>
</table>
<div class="layout_bottom"><?= $this->include("{$layouts}/bottom"); ?></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const tbody = document.getElementById('data_list_tbody');
const apiEndpoint = '<?= $dataApiEndpoint ?>';
const columnCount = <?= $columnCount ?>;
const formFields = <?= json_encode(array_keys($viewDatas['formFields'])) ?>;
const actionButtons = <?= json_encode($viewDatas['index_actionButtons']) ?>;
// 페이지 로드 시 또는 필터링/페이지네이션 시 호출될 메인 함수
window.fetchData = async function(page = 1, filters = {}) {
// 로딩 상태 표시
tbody.innerHTML = `<tr><td colspan="${columnCount}" class="text-center text-info p-5">데이터 로드 중...</td></tr>`;
// 쿼리 파라미터 구성 (페이지, 필터 등을 포함)
const url = new URL(apiEndpoint);
url.searchParams.set('page', page);
Object.keys(filters).forEach(key => url.searchParams.set(key, filters[key]));
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`API 호출 실패: ${response.statusText}`);
}
const result = await response.json();
if (result.status === 'success' && Array.isArray(result.data)) {
renderTable(result.data, result.pagination);
} else {
throw new Error(result.message || '데이터 구조 오류');
}
} catch (error) {
console.error("데이터 로드 오류:", error);
tbody.innerHTML = `<tr><td colspan="${columnCount}" class="text-center text-danger p-5">목록을 불러오는 데 실패했습니다. (${error.message})</td></tr>`;
}
}
// 테이블 렌더링 함수
function renderTable(entities, pagination) {
if (entities.length === 0) {
tbody.innerHTML = `<tr><td colspan="${columnCount}" class="text-center text-muted p-5">조회된 데이터가 없습니다.</td></tr>`;
return;
}
let html = '';
// 총 건수와 현재 페이지 정보로 시작 번호를 계산해야 하지만, 여기서는 단순화합니다.
let totalCount = pagination ? parseInt(pagination.totalCount) : entities.length;
let perPage = pagination ? parseInt(pagination.perPage) : 10;
let page = pagination ? parseInt(pagination.page) : 1;
let startNum = totalCount - ((page - 1) * perPage);
entities.forEach((entity, index) => {
html += '<tr>';
// 1. 번호
let currentNum = startNum - index;
// $viewDatas['helper']->getListButton('modify', $num, $viewDatas) 역할을 하는 단순 링크
const modifyLink = `/modify/${entity.id || ''}`;
html += `<td nowrap><a href="${modifyLink}">${currentNum}</a></td>`;
// 2. 데이터 필드
formFields.forEach(field => {
const fieldValue = entity[field] !== undefined ? entity[field] : '';
// 이 부분에서 기존 PHP 헬퍼($viewDatas['helper']->getFieldView)의 복잡한 로직을 JS로 재구현해야 함
html += `<td>${fieldValue}</td>`;
});
// 3. 작업 버튼
html += '<td nowrap>';
Object.keys(actionButtons).forEach(action => {
const label = actionButtons[action];
// 작업 버튼 링크 생성
const actionLink = `/${action}/${entity.id || ''}`;
html += `<a href="${actionLink}" class="btn btn-sm btn-outline-secondary me-1">${label}</a>`;
});
html += '</td>';
html += '</tr>';
});
tbody.innerHTML = html;
// pagination 영역 업데이트 로직 추가 필요
// document.getElementById('pagination_area').innerHTML = generatePaginationHtml(pagination);
}
// 초기 데이터 로드
fetchData();
});
</script>
<?= $this->endSection() ?>

View File

@ -1,6 +1,6 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/<?= $viewDatas['layout']['path'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<style> <style>
textarea.note-box { textarea.note-box {
width: 100%; width: 100%;
@ -12,18 +12,18 @@
} }
</style> </style>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div> <div class="layout_top"><?= $this->include($viewDatas['layout']['layout'] . '/top'); ?></div>
<!-- Layout Middle Start --> <!-- Layout Middle Start -->
<table class="layout_middle"> <table class="layout_middle">
<tr> <tr>
<td class="layout_left"> <td class="layout_left">
<!-- Layout Left Start --> <!-- Layout Left Start -->
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu'); ?>
<!-- Layout Left End --> <!-- Layout Left End -->
</td> </td>
<td class="layout_right"> <td class="layout_right">
<!-- Layout Right Start --> <!-- Layout Right Start -->
<div class="layout_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div> <div class="layout_header"><?= $this->include("{$viewDatas['layout']['template']}/index_header"); ?></div>
<div id="container" class="layout_content"> <div id="container" class="layout_content">
<div class="index_body p-4"> <div class="index_body p-4">
<!-- index_body --> <!-- index_body -->
@ -127,11 +127,11 @@
</div> </div>
<!-- index_body --> <!-- index_body -->
</div> </div>
<div class="layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div> <div class="layout_footer"><?= $this->include("{$viewDatas['layout']['template']}/index_footer"); ?></div>
<!-- Layout Right End --> <!-- Layout Right End -->
</td> </td>
</tr> </tr>
</table> </table>
<!-- Layout Middle End --> <!-- Layout Middle End -->
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div> <div class="layout_bottom"><?= $this->include($viewDatas['layout']['layout'] . '/bottom'); ?></div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,8 +1,8 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div id="container" class="content"> <div id="container" class="content">
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div> <div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-bordered"> <table class="table table-bordered">
<?php foreach ($viewDatas['formFields'] as $field => $label): ?> <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
@ -17,6 +17,6 @@
</table> </table>
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div> <div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
<?= form_close(); ?> <?= form_close(); ?>
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div> <div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,20 +1,16 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?php
$layouts = LAYOUTS[$viewDatas['layout']];
$template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div class="layout_top"><?= $this->include("{$layouts['path']}/top"); ?></div> <div class="layout_top"><?= $this->include("{$viewDatas['layout']['layout']}/top"); ?></div>
<table class="layout_middle"> <table class="layout_middle">
<tr> <tr>
<td class="layout_left"><?= $this->include("{$layouts['path']}/left_menu"); ?></td> <td class="layout_left"><?= $this->include("{$viewDatas['layout']['layout']}/left_menu"); ?></td>
<td class="layout_right"> <td class="layout_right">
<div class="layout_header"><?= $this->include("{$template}/index_header"); ?></div> <div class="layout_header"><?= $this->include("{$viewDatas['layout']['template']}/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']['path'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body"> <div class="index_body">
<?= $this->include("{$template}/index_content_filter"); ?> <?= $this->include("{$viewDatas['layout']['template']}/index_content_filter"); ?>
<?= 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>
@ -46,13 +42,13 @@ $template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?= $this->include("{$template}/index_content_bottom"); ?> <?= $this->include("{$viewDatas['layout']['template']}/index_content_bottom"); ?>
<?= form_close() ?> <?= form_close() ?>
</div> </div>
</div> </div>
<div class="layout_footer"><?= $this->include("{$template}/index_footer"); ?></div> <div class="layout_footer"><?= $this->include("{$viewDatas['layout']['template']}/index_footer"); ?></div>
</td> </td>
</tr> </tr>
</table> </table>
<div class="layout_bottom"><?= $this->include("{$layouts['path']}/bottom"); ?></div> <div class="layout_bottom"><?= $this->include("{$viewDatas['layout']['layout']}/bottom"); ?></div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,8 +1,8 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div id="container" class="content"> <div id="container" class="content">
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div> <div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-bordered"> <table class="table table-bordered">
<?php foreach ($viewDatas['formFields'] as $field => $label): ?> <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
@ -17,6 +17,6 @@
</table> </table>
<div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div> <div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div>
<?= form_close(); ?> <?= form_close(); ?>
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div> <div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,8 +1,8 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div id="container" class="content"> <div id="container" class="content">
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div> <div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-bordered"> <table class="table table-bordered">
<?php foreach ($viewDatas['formFields'] as $field => $label): ?> <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
@ -17,6 +17,6 @@
</table> </table>
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div> <div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
<?= form_close(); ?> <?= form_close(); ?>
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div> <div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,18 +1,14 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?php
$layouts = LAYOUTS[$viewDatas['layout']];
$template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<table class="layout_middle"> <table class="layout_middle">
<tr> <tr>
<td class="layout_right"> <td class="layout_right">
<div class="layout_header"><?= $this->include("{$template}/popup/index_header"); ?></div> <div class="layout_header"><?= $this->include("{$viewDatas['layout']['template']}/popup/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']['path'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
<div class="index_body"> <div class="index_body">
<?= $this->include("{$template}/popup/index_content_filter"); ?> <?= $this->include("{$viewDatas['layout']['template']}/popup/index_content_filter"); ?>
<?= 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>
@ -44,11 +40,11 @@ $template = "templates" . DIRECTORY_SEPARATOR . "{$viewDatas['layout']}";
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?= $this->include("{$template}/index_content_bottom"); ?> <?= $this->include("{$viewDatas['layout']['template']}/index_content_bottom"); ?>
<?= form_close() ?> <?= form_close() ?>
</div> </div>
</div> </div>
<div class="layout_footer"><?= $this->include("{$template}/index_footer"); ?></div> <div class="layout_footer"><?= $this->include("{$viewDatas['layout']['template']}/index_footer"); ?></div>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,8 +1,8 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div id="container" class="content"> <div id="container" class="content">
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div> <div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-bordered"> <table class="table table-bordered">
<?php foreach ($viewDatas['formFields'] as $field => $label): ?> <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
@ -17,6 +17,6 @@
</table> </table>
<div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div> <div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div>
<?= form_close(); ?> <?= form_close(); ?>
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div> <div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,8 +1,8 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div id="container" class="content"> <div id="container" class="content">
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div> <div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
<table class="table table-bordered"> <table class="table table-bordered">
<?php foreach ($viewDatas['formFields'] as $field => $label): ?> <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
<tr> <tr>
@ -12,6 +12,6 @@
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<?php if (session('message')): ?><div class="alert alert-danger text-start"><?= nl2br(session('message')) ?></div><?php endif; ?> <?php if (session('message')): ?><div class="alert alert-danger text-start"><?= nl2br(session('message')) ?></div><?php endif; ?>
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div> <div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,8 +1,8 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?> <?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
<div id="container" class="content"> <div id="container" class="content">
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div> <div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
<table class="table table-bordered"> <table class="table table-bordered">
<?php foreach ($viewDatas['formFields'] as $field => $label): ?> <?php foreach ($viewDatas['formFields'] as $field => $label): ?>
<tr> <tr>
@ -12,6 +12,6 @@
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<?php if (session('message')): ?><div class="alert alert-danger text-start"><?= nl2br(session('message')) ?></div><?php endif; ?> <?php if (session('message')): ?><div class="alert alert-danger text-start"><?= nl2br(session('message')) ?></div><?php endif; ?>
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div> <div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,13 +1,13 @@
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?> <?= $this->extend($viewDatas['layout']['layout']) ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<!-- Layout Middle Start --> <!-- Layout Middle Start -->
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div> <div class="layout_top"><?= $this->include($viewDatas['layout']['layout'] . '/top'); ?></div>
<!-- Layout Middle Start --> <!-- Layout Middle Start -->
<table class="layout_middle"> <table class="layout_middle">
<tr> <tr>
<td class="layout_left"> <td class="layout_left">
<!-- Layout Left Start --> <!-- Layout Left Start -->
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu'); ?>
<!-- Layout Left End --> <!-- Layout Left End -->
</td> </td>
<td class="layout_right"> <td class="layout_right">
@ -26,6 +26,6 @@
</tr> </tr>
</table> </table>
<!-- Layout Middle End --> <!-- Layout Middle End -->
<div class=" layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div> <div class=" layout_footer"><?= $this->include("{$viewDatas['layout']['template']}/index_footer"); ?></div>
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div> <div class="layout_bottom"><?= $this->include($viewDatas['layout']['layout'] . '/bottom'); ?></div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -2,18 +2,12 @@
<html lang="ko"> <html lang="ko">
<head> <head>
<title><?= LAYOUTS[$viewDatas['layout']]['title'] ?></title> <title><?= $viewDatas['layout']['title'] ?></title>
<?php foreach (LAYOUTS[$viewDatas['layout']]['metas'] as $meta): ?> <?php foreach ($viewDatas['layout']['metas'] as $meta): ?><?= $meta ?><?php endforeach; ?>
<?= $meta ?> <?php foreach ($viewDatas['layout']['stylesheets'] as $stylesheet): ?><?= $stylesheet ?><?php endforeach; ?>
<?php endforeach; ?> <?php foreach ($viewDatas['layout']['javascripts'] as $javascript): ?><?= $javascript ?><?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['stylesheets'] as $stylesheet): ?> <link href="/css/<?= $viewDatas['layout']['path'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<?= $stylesheet ?> <script type="text/javascript" src="/js/<?= $viewDatas['layout']['path'] ?>.js"></script>
<?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['javascripts'] as $javascript): ?>
<?= $javascript ?>
<?php endforeach; ?>
<link href="/css/<?= $viewDatas['layout'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn' t work if you view the page via file:// --> <!-- WARNING: Respond.js doesn' t work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[if lt IE 9]>

View File

@ -1,16 +1,16 @@
<!-- left menu start --> <!-- left menu start -->
<link href="/css/<?= $viewDatas['layout'] ?>/left_menu.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/<?= $viewDatas['layout']['path'] ?>/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/left_menu.js"></script> <script type="text/javascript" src="/js/<?= $viewDatas['layout']['path'] ?>/left_menu.js"></script>
<div id="left_menu" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);"> <div id="left_menu" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
<div id="accordion" class="accordion accordion-flush"> <div id="accordion" class="accordion accordion-flush">
<div class="main"> <div class="main">
<a href="/admin"><?= ICONS["HOME"] ?> Main</a> <a href="/admin"><?= ICONS["HOME"] ?> Main</a>
</div> </div>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/base'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu/base'); ?>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/board'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu/board'); ?>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/customer'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu/customer'); ?>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/equipment'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu/equipment'); ?>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/part'); ?> <?= $this->include($viewDatas['layout']['layout'] . '/left_menu/part'); ?>
</div> </div>
<div id="menu_button">메뉴열기</div> <div id="menu_button">메뉴열기</div>
</div> </div>

View File

@ -2,18 +2,12 @@
<html lang="ko"> <html lang="ko">
<head> <head>
<title><?= LAYOUTS[$viewDatas['layout']]['title'] ?></title> <title><?= $viewDatas['layout']['title'] ?></title>
<?php foreach (LAYOUTS[$viewDatas['layout']]['metas'] as $meta): ?> <?php foreach ($viewDatas['layout']['metas'] as $meta): ?><?= $meta ?><?php endforeach; ?>
<?= $meta ?> <?php foreach ($viewDatas['layout']['stylesheets'] as $stylesheet): ?><?= $stylesheet ?><?php endforeach; ?>
<?php endforeach; ?> <?php foreach ($viewDatas['layout']['javascripts'] as $javascript): ?><?= $javascript ?><?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['stylesheets'] as $stylesheet): ?> <link href="/css/<?= $viewDatas['layout']['path'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<?= $stylesheet ?> <script type="text/javascript" src="/js/<?= $viewDatas['layout']['path'] ?>.js"></script>
<?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['javascripts'] as $javascript): ?>
<?= $javascript ?>
<?php endforeach; ?>
<link href="/css/<?= $viewDatas['layout'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn' t work if you view the page via file:// --> <!-- WARNING: Respond.js doesn' t work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[if lt IE 9]>

View File

@ -2,18 +2,12 @@
<html lang="ko"> <html lang="ko">
<head> <head>
<title><?= LAYOUTS[$viewDatas['layout']]['title'] ?></title> <title><?= $viewDatas['layout']['title'] ?></title>
<?php foreach (LAYOUTS[$viewDatas['layout']]['metas'] as $meta): ?> <?php foreach ($viewDatas['layout']['metas'] as $meta): ?><?= $meta ?><?php endforeach; ?>
<?= $meta ?> <?php foreach ($viewDatas['layout']['stylesheets'] as $stylesheet): ?><?= $stylesheet ?><?php endforeach; ?>
<?php endforeach; ?> <?php foreach ($viewDatas['layout']['javascripts'] as $javascript): ?><?= $javascript ?><?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['stylesheets'] as $stylesheet): ?> <link href="/css/<?= $viewDatas['layout']['path'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<?= $stylesheet ?> <script type="text/javascript" src="/js/<?= $viewDatas['layout']['path'] ?>.js"></script>
<?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['javascripts'] as $javascript): ?>
<?= $javascript ?>
<?php endforeach; ?>
<link href="/css/<?= $viewDatas['layout'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn' t work if you view the page via file:// --> <!-- WARNING: Respond.js doesn' t work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[if lt IE 9]>

View File

@ -1,2 +1,2 @@
<link href="/css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/<?= $viewDatas['layout']['path'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/js/<?= $viewDatas['layout'] ?>/form.js" referrerpolicy="origin"></script> <script src="/js/<?= $viewDatas['layout']['path'] ?>/form.js" referrerpolicy="origin"></script>

View File

@ -6,7 +6,7 @@
<?= $viewDatas['helper']->getListFilter($field, $value, $viewDatas) ?>&nbsp; <?= $viewDatas['helper']->getListFilter($field, $value, $viewDatas) ?>&nbsp;
<?php endforeach ?> <?php endforeach ?>
</nav> </nav>
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?> <?= $this->include("{$viewDatas['layout']['template']}/index_content_top"); ?>
</div> </div>
</nav> </nav>
<?= form_close() ?> <?= form_close() ?>

View File

@ -1,3 +1,3 @@
<?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?> <?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?>
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script> <script type="text/javascript" src="/js/<?= $viewDatas['layout']['path'] ?>/index.js"></script>
<!-- Layout Right End --> <!-- Layout Right End -->