shoppingmallv2 init..

This commit is contained in:
최준흠git config git config --helpgit config --global user.name 최준흠 2023-08-07 21:12:10 +09:00
parent 7983294e2b
commit be3b33fbbe
18 changed files with 86 additions and 134 deletions

View File

@ -51,7 +51,10 @@ class BoardController extends AdminController
$this->_viewDatas['fieldDatas']['confirmpassword'] = $this->request->getVar('confirmpassword'); $this->_viewDatas['fieldDatas']['confirmpassword'] = $this->request->getVar('confirmpassword');
break; break;
case 'board_file': case 'board_file':
$this->_viewDatas['fieldDatas'][$field] = $this->upload_file_procedure($field); $file = $this->upload_file_procedure($field);
if (!is_null($file)) {
$this->_viewDatas['fieldDatas'][$field] = $file;
}
break; break;
default: default:
return parent::getFieldFormData($field, $entity); return parent::getFieldFormData($field, $entity);

View File

@ -53,7 +53,10 @@ class CategoryController extends AdminController
{ {
switch ($field) { switch ($field) {
case 'photo': case 'photo':
$this->_viewDatas['fieldDatas'][$field] = $this->upload_image_procedure($field); $file = $this->upload_image_procedure($field);
if (!is_null($file)) {
$this->_viewDatas['fieldDatas'][$field] = $file;
}
break; break;
default: default:
return parent::getFieldFormData($field, $entity); return parent::getFieldFormData($field, $entity);

View File

@ -47,7 +47,10 @@ class ProductController extends AdminController
{ {
switch ($field) { switch ($field) {
case 'photo': case 'photo':
$this->_viewDatas['fieldDatas'][$field] = $this->upload_image_procedure($field); $file = $this->upload_image_procedure($field);
if (!is_null($file)) {
$this->_viewDatas['fieldDatas'][$field] = $file;
}
break; break;
default: default:
return parent::getFieldFormData($field, $entity); return parent::getFieldFormData($field, $entity);

View File

@ -206,13 +206,6 @@ abstract class BaseController extends Controller
$this->_viewDatas['fieldDatas'] = array(); $this->_viewDatas['fieldDatas'] = array();
foreach ($this->_viewDatas['fields'] as $field) { foreach ($this->_viewDatas['fields'] as $field) {
$this->_viewDatas['fieldDatas'] = $this->getFieldFormData($field, $entity); $this->_viewDatas['fieldDatas'] = $this->getFieldFormData($field, $entity);
//보안문제,사용자정보의 update시 암호를 변경하지 않느경우를 위해
if ($field != 'passwd') {
log_message(
"info",
"{$field} : {$entity->$field} => " . var_export($this->_viewDatas['fieldDatas'][$field])
);
}
} }
} }
protected function update_process($entity) protected function update_process($entity)

View File

@ -7,7 +7,7 @@ use CodeIgniter\HTTP\Files\UploadedFile;
trait UpDownloadTrait trait UpDownloadTrait
{ {
//Upload FIle관련 //Upload FIle관련
private function upDownload_file_process(UploadedFile $upfile): string private function upDownload_file_process(UploadedFile $upfile): ?string
{ {
$filename = null; $filename = null;
$uploaded_filename = null; $uploaded_filename = null;
@ -17,10 +17,12 @@ trait UpDownloadTrait
$upfile->move(PATHS['UPLOAD'], $uploaded_filename); $upfile->move(PATHS['UPLOAD'], $uploaded_filename);
//move시 중복된파일명이 있다면 파일명이 바뀌므로 여기서 한번더 파일명 확인 필요 //move시 중복된파일명이 있다면 파일명이 바뀌므로 여기서 한번더 파일명 확인 필요
$uploaded_filename = $upfile->getName(); $uploaded_filename = $upfile->getName();
} else {
return null;
} }
return $filename . DEFAULTS['DELIMITER_FILE'] . $uploaded_filename; return $filename . DEFAULTS['DELIMITER_FILE'] . $uploaded_filename;
} }
public function upload_file_procedure(string $field): string public function upload_file_procedure(string $field): ?string
{ {
return $this->upload_file_process($this->request->getFile($field)); return $this->upload_file_process($this->request->getFile($field));
} }
@ -32,7 +34,10 @@ trait UpDownloadTrait
if ($upfiles = $this->request->getFiles()) { if ($upfiles = $this->request->getFiles()) {
foreach ($upfiles[$field] as $upfile) { foreach ($upfiles[$field] as $upfile) {
if ($upfile->isValid() && !$upfile->hasMoved()) { if ($upfile->isValid() && !$upfile->hasMoved()) {
array_push($files, $this->upload_file_process($upfile)); $file = $this->upload_file_process($upfile);
if (!is_null($file)) {
array_push($files, $file);
}
} }
} }
} }
@ -46,7 +51,7 @@ trait UpDownloadTrait
->resize($x, $y, true, 'height') ->resize($x, $y, true, 'height')
->save(PATHS['UPLOAD_IMAGE'] . $uploaded_filename); ->save(PATHS['UPLOAD_IMAGE'] . $uploaded_filename);
} }
private function upload_image_process(UploadedFile $upfile): string private function upload_image_process(UploadedFile $upfile): ?string
{ {
//참고:https://www.positronx.io/codeigniter-resize-image-with-image-manipulation-tutorial/ //참고:https://www.positronx.io/codeigniter-resize-image-with-image-manipulation-tutorial/
$filename = null; $filename = null;
@ -60,11 +65,13 @@ trait UpDownloadTrait
$upfile->move(PATHS['UPLOAD_IMAGE'], $uploaded_filename); $upfile->move(PATHS['UPLOAD_IMAGE'], $uploaded_filename);
//move시 중복된파일명이 있다면 파일명이 바뀌므로 여기서 한번더 파일명 확인 필요 //move시 중복된파일명이 있다면 파일명이 바뀌므로 여기서 한번더 파일명 확인 필요
$uploaded_filename = $upfile->getName(); $uploaded_filename = $upfile->getName();
} else {
return null;
} }
return $filename . DEFAULTS['DELIMITER_FILE'] . $uploaded_filename; return $filename . DEFAULTS['DELIMITER_FILE'] . $uploaded_filename;
} }
public function upload_image_procedure(string $field): string public function upload_image_procedure(string $field): ?string
{ {
return $this->upload_image_process($this->request->getFile($field)); return $this->upload_image_process($this->request->getFile($field));
} }
@ -76,7 +83,10 @@ trait UpDownloadTrait
if ($upfiles = $this->request->getFiles()) { if ($upfiles = $this->request->getFiles()) {
foreach ($upfiles[$field] as $upfile) { foreach ($upfiles[$field] as $upfile) {
if ($upfile->isValid() && !$upfile->hasMoved()) { if ($upfile->isValid() && !$upfile->hasMoved()) {
array_push($files, $this->upload_image_process($upfile)); $file = $this->upload_image_process($upfile);
if (!is_null($file)) {
array_push($files, $file);
}
} }
} }
} }

View File

@ -1,6 +1,7 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div>
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="form table table-bordered table-hover table-striped"> <table class="form table table-bordered table-hover table-striped">

View File

@ -1,6 +1,7 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div>
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="form table table-bordered table-hover table-striped"> <table class="form table table-bordered table-hover table-striped">

View File

@ -1,6 +1,7 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">>
<div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div>
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="form table table-bordered table-hover table-striped"> <table class="form table table-bordered table-hover table-striped">

View File

@ -1,17 +1,20 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div>
<table class="form table table-bordered table-hover table-striped"> <table class="form table table-bordered table-striped">
<?php foreach ($viewDatas['fields'] as $field) : ?> <tbody>
<tr> <?php foreach ($viewDatas['fields'] as $field) : ?>
<tr></tr>
<td class="label"><?= getFieldLabel_BoardHelper($field, $viewDatas) ?></td> <td class="label"><?= getFieldLabel_BoardHelper($field, $viewDatas) ?></td>
<td class="column"> <td class="column">
<?= getFieldView_BoardHelper($field, $viewDatas['entity'], $viewDatas) ?> <?= getFieldView_BoardHelper($field, $viewDatas['entity'], $viewDatas) ?>
<?= validation_show_error($field); ?> <?= validation_show_error($field); ?>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody>
</table> </table>
<div><?= html_entity_decode($viewDatas['category']->getTail()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getTail()) ?></div>
</div> </div>

View File

@ -1,21 +1,27 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div class="top"> <div class="top">
<?= form_open(current_url(), array("method" => "get")) ?> <?= $this->include('templates/front/index_head') ?>
<ul class="nav"> <nav class="navbar navbar-expand-lg">
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_OrderHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?> <div class="container-fluid">
<?= $this->include('templates/front/index_head') ?> <nav class="nav">
</ul> <?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . '&order_field=price&order_value=ASC', '판매가순', ["class" => "btn btn-sm btn-info btn-circle", "target" => "_self"]) ?>
<?= form_close() ?> <?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . '&order_field=view_cnt&order_value=DESC', '인기순', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?>
</nav>
<nav class="nav justify-content-center"></nav>
<nav class="nav justify-content-end">
<?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey(), 'Block', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?>
</nav>
</div>
</nav>
</div> </div>
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <table class="table table-hover">
<table class="table table-bordered table-hover table-striped">
<thead> <thead>
<tr> <tr>
<th>번호</th> <th>번호</th>
<?php foreach ($viewDatas['fields'] as $field) : ?><th><?= getFieldIndex_Column_OrderHelper($field, $viewDatas) ?></th><?php endforeach ?> <?php foreach ($viewDatas['fields'] as $field) : ?><th><?= getFieldIndex_Column_OrderHelper($field, $viewDatas) ?></th><?php endforeach ?>
<th>작업</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -28,17 +34,11 @@
<?php foreach ($viewDatas['fields'] as $field) : ?> <?php foreach ($viewDatas['fields'] as $field) : ?>
<td nowrap><?= getFieldIndex_Row_OrderHelper($field, $entity, $viewDatas) ?></td> <td nowrap><?= getFieldIndex_Row_OrderHelper($field, $entity, $viewDatas) ?></td>
<?php endforeach ?> <?php endforeach ?>
<td>
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('ecommerce/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
</td>
</tr> </tr>
<?php $cnt++ ?> <?php $cnt++ ?>
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<div class="bottom"> <div class="bottom"><?= $viewDatas['pagination'] ?></div>
<?= $viewDatas['pagination'] ?>
</div>
<?= form_close() ?>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,16 +1,19 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<table class="form table table-bordered table-hover table-striped"> <div id="content">
<?php foreach ($viewDatas['fields'] as $field) : ?> <table class="form table table-bordered table-striped">
<tr> <tbody>
<?php foreach ($viewDatas['fields'] as $field) : ?>
<tr></tr>
<td class="label"><?= getFieldLabel_OrderHelper($field, $viewDatas) ?></td> <td class="label"><?= getFieldLabel_OrderHelper($field, $viewDatas) ?></td>
<td class="column"> <td class="column">
<?= getFieldView_OrderHelper($field, $viewDatas['entity'], $viewDatas) ?> <?= getFieldView_OrderHelper($field, $viewDatas['entity'], $viewDatas) ?>
<?= validation_show_error($field); ?> <?= validation_show_error($field); ?>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody>
</table> </table>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -8,8 +8,8 @@
<nav class="navbar navbar-expand-lg"> <nav class="navbar navbar-expand-lg">
<div class="container-fluid"> <div class="container-fluid">
<nav class="nav"> <nav class="nav">
<?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . 'order_field=price,order_value=ASC', '판매가순', ["class" => "btn btn-sm btn-info btn-circle", "target" => "_self"]) ?> <?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . '&order_field=price&order_value=ASC', '판매가순', ["class" => "btn btn-sm btn-info btn-circle", "target" => "_self"]) ?>
<?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . 'order_field=view_cnt,order_value=DESC', '인기순', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?> <?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . '&order_field=view_cnt&order_value=DESC', '인기순', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?>
</nav> </nav>
<nav class="nav justify-content-center"></nav> <nav class="nav justify-content-center"></nav>
<nav class="nav justify-content-end"> <nav class="nav justify-content-end">
@ -18,7 +18,6 @@
</div> </div>
</nav> </nav>
</div> </div>
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<?php $cnt = 0 ?> <?php $cnt = 0 ?>
<?php foreach ($viewDatas['entitys'] as $entity) : ?> <?php foreach ($viewDatas['entitys'] as $entity) : ?>
<table id="block" class="table"> <table id="block" class="table">
@ -48,7 +47,6 @@
<?php $cnt++ ?> <?php $cnt++ ?>
<?php endforeach ?> <?php endforeach ?>
<div class="bottom"><?= $viewDatas['pagination'] ?></div> <div class="bottom"><?= $viewDatas['pagination'] ?></div>
<?= form_close() ?>
<div><?= html_entity_decode($viewDatas['category']->getTail()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getTail()) ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -8,8 +8,8 @@
<nav class="navbar navbar-expand-lg"> <nav class="navbar navbar-expand-lg">
<div class="container-fluid"> <div class="container-fluid">
<nav class="nav"> <nav class="nav">
<?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . 'order_field=price,order_value=ASC', '판매가순', ["class" => "btn btn-sm btn-info btn-circle", "target" => "_self"]) ?> <?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . '&order_field=price&order_value=ASC', '판매가순', ["class" => "btn btn-sm btn-info btn-circle", "target" => "_self"]) ?>
<?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . 'order_field=view_cnt,order_value=DESC', '인기순', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?> <?= anchor(current_url() . '?category=' . $viewDatas['category']->getPrimaryKey() . '&order_field=view_cnt&order_value=DESC', '인기순', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?>
</nav> </nav>
<nav class="nav justify-content-center"></nav> <nav class="nav justify-content-center"></nav>
<nav class="nav justify-content-end"> <nav class="nav justify-content-end">
@ -18,7 +18,6 @@
</div> </div>
</nav> </nav>
</div> </div>
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
@ -31,8 +30,6 @@
<?php foreach ($viewDatas['entitys'] as $entity) : ?> <?php foreach ($viewDatas['entitys'] as $entity) : ?>
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)"> <tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
<td> <td>
<!-- 사용자가 자신의 작성한것인지 확인되면 update 가능-->
<?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?> <?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
</td> </td>
<?php foreach ($viewDatas['fields'] as $field) : ?> <?php foreach ($viewDatas['fields'] as $field) : ?>
@ -44,7 +41,6 @@
</tbody> </tbody>
</table> </table>
<div class="bottom"><?= $viewDatas['pagination'] ?></div> <div class="bottom"><?= $viewDatas['pagination'] ?></div>
<?= form_close() ?>
<div><?= html_entity_decode($viewDatas['category']->getTail()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getTail()) ?></div>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,17 +1,20 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div> <div><?= html_entity_decode($viewDatas['category']->getHead()) ?></div>
<table class="form table table-bordered table-hover table-striped"> <table class="form table table-bordered table-striped">
<?php foreach ($viewDatas['fields'] as $field) : ?> <tbody>
<tr> <?php foreach ($viewDatas['fields'] as $field) : ?>
<tr></tr>
<td class="label"><?= getFieldLabel_ProductHelper($field, $viewDatas) ?></td> <td class="label"><?= getFieldLabel_ProductHelper($field, $viewDatas) ?></td>
<td class="column"> <td class="column">
<?= getFieldView_ProductHelper($field, $viewDatas['entity'], $viewDatas) ?> <?= getFieldView_ProductHelper($field, $viewDatas['entity'], $viewDatas) ?>
<?= validation_show_error($field); ?> <?= validation_show_error($field); ?>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody>
</table> </table>
<div style="text-align:center"> <div style="text-align:center">
<?php if ($viewDatas['entity']->getStatus() == DEFAULTS['STATUS']) : ?> <?php if ($viewDatas['entity']->getStatus() == DEFAULTS['STATUS']) : ?>

View File

@ -1,51 +0,0 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
<div class="top">
<?= form_open(current_url(), array("method" => "get")) ?>
<ul class="nav">
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_UserHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
<?= $this->include('templates/front/index_head') ?>
</ul>
<?= form_close() ?>
</div>
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
<?php foreach ($viewDatas['fields'] as $field) : ?><th><?= getFieldIndex_Column_UserHelper($field, $viewDatas) ?></th><?php endforeach ?>
</tr>
<?php $cnt = 0 ?>
<?php foreach ($viewDatas['entitys'] as $entity) : ?>
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
<td>
<!-- 사용자가 자신의 작성한것인지 확인되면 update 가능-->
<?php if ($this->viewDatas[SESSION_NAMES['ISLOGIN']] && $entity->getUser_Uid() == $this->viewDatas['auth'][AUTH_FIELDS['ID']]) : ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?>
<?php endif ?>
</td>
<?php foreach ($viewDatas['fields'] as $field) : ?>
<td nowrap><?= getFieldIndex_Row_UserHelper($field, $entity, $viewDatas) ?></td>
<?php endforeach ?>
<td>
<!-- 사용자가 자신의 작성한것인지 확인되면 delete 가능-->
<?php if ($this->viewDatas[SESSION_NAMES['ISLOGIN']] && $entity->getUser_Uid() == $this->viewDatas['auth'][AUTH_FIELDS['ID']]) : ?>
<?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
<?php endif ?>
</td>
</tr>
<?php $cnt++ ?>
<?php endforeach ?>
</table>
<div class="bottom">
<ul class="nav justify-content-center">
<!-- 사용자가 쓰기권한이 있는지 확인-->
<?php if (isRole_CommonHelper($this->viewDatas['currentRoles'], $this->viewDatas['category'], CATEGORY_ROLE_FIELDS['WRITE'])) : ?>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<?php endif ?>
</ul>
<?= $viewDatas['pagination'] ?>
</div>
<?= form_close() ?>
</div>
<?= $this->endSection() ?>

View File

@ -1,6 +1,7 @@
<?= $this->extend('layouts/front') ?> <?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<div class="content"> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?> <?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="form table table-bordered table-hover table-striped"> <table class="form table table-bordered table-hover table-striped">
<?php foreach ($viewDatas['fields'] as $field) : ?> <?php foreach ($viewDatas['fields'] as $field) : ?>

View File

@ -1,16 +0,0 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
<table class="form table table-bordered table-hover table-striped">
<?php foreach ($viewDatas['fields'] as $field) : ?>
<tr>
<td class="label"><?= getFieldLabel_UserHelper($field, $viewDatas) ?></td>
<td class="column">
<?= getFieldView_UserHelper($field, $viewDatas['entity'], $viewDatas) ?>
<?= validation_show_error($field); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?= $this->endSection() ?>

View File

@ -1,6 +1,6 @@
div#left_menu{ div#left_menu{
position:fixed; /* position:fixed;
z-index:100; z-index:100; */
width:160px; width:160px;
border:1px solid silver; border:1px solid silver;
} }