shoppingmallv2 init...

This commit is contained in:
최준흠git config git config --helpgit config --global user.name 최준흠 2023-08-03 03:36:33 +09:00
parent 96d449f3ed
commit 571468dfc6
13 changed files with 76 additions and 90 deletions

View File

@ -39,9 +39,9 @@ $routes->get('/login', 'AuthController::login');
$routes->post('/signup', 'AuthController::signup/local');
$routes->get('/signup/(:alpha)', 'AuthController::signup/$1');
$routes->get('/logout', 'AuthController::logout');
$routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function ($routes) {
$routes->post('addCart', 'EcommerceController::addCart');
$routes->get('cancelCart/(:uuid)', 'EcommerceController::cancelCart/$1');
$routes->group('cart', ['namespace' => 'App\Controllers'], static function ($routes) {
$routes->post('addCart', 'CartController::addCart');
$routes->get('cancelCart/(:uuid)', 'CartController::cancelCart/$1');
});;
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
});
@ -95,39 +95,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->post('batchjob', 'BoardController::batchjob');
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
});
$routes->group('category', static function ($routes) {
$routes->get('', 'CategoryController::index');
$routes->get('excel', 'CategoryController::excel/$1');
$routes->get('insert', 'CategoryController::insert_form');
$routes->post('insert', 'CategoryController::insert');
$routes->get('update/(:num)', 'CategoryController::update_form/$1');
$routes->post('update/(:num)', 'CategoryController::update/$1');
$routes->get('view/(:num)', 'CategoryController::view/$1');
$routes->get('reply/(:num)', 'CategoryController::reply_form/$1');
$routes->post('reply/(:num)', 'CategoryController::reply/$1');
$routes->get('delete/(:num)', 'CategoryController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('toggle/(:num)/(:hash)', 'CategoryController::toggle/$1/$2');
$routes->post('batchjob', 'CategoryController::batchjob');
});
$routes->group('product', static function ($routes) {
$routes->get('', 'ProductController::index');
$routes->get('excel', 'ProductController::excel/$1');
$routes->get('insert', 'ProductController::insert_form');
$routes->post('insert', 'ProductController::insert');
$routes->get('update/(:uuid)', 'ProductController::update_form/$1');
$routes->post('update/(:uuid)', 'ProductController::update/$1');
$routes->get('view/(:uuid)', 'ProductController::view/$1');
$routes->get('delete/(:uuid)', 'ProductController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('toggle/(:uuid)/(:hash)', 'ProductController::toggle/$1/$2');
$routes->post('batchjob', 'ProductController::batchjob');
});
$routes->group('order', static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('toggle/(:uuid)/(:hash)', 'OrderController::toggle/$1/$2');
$routes->post('batchjob', 'OrderController::batchjob`');
});
});
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
$routes->group('user', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) {
@ -148,15 +115,6 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou
$routes->get('delete/(:num)', 'BoardController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
});
$routes->group('product', static function ($routes) {
$routes->get('', 'ProductController::index');
$routes->get('excel', 'ProductController::excel/$1');
$routes->get('view/(:uuid)', 'ProductController::view/$1');
});
$routes->group('order', static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
});;
});
/*
* --------------------------------------------------------------------

View File

@ -61,4 +61,28 @@ class UserController extends AdminController
{
return parent::getFieldBatchFilters();
}
protected function insert_validate()
{
$rules = [];
foreach ($this->_viewDatas['fieldRules'] as $field => $rule) {
switch ($field) {
case 'role':
$rules['role.*'] = $rule;
break;
default:
$rules[$field] = $rule;
break;
}
}
//fieldData Rule 검사
if (!$this->validate($rules)) {
throw new \Exception("{$this->_viewDatas['title']}의 검증 오류발생\n" . implode("\n", $this->validator->getErrors()));
}
//fieldData 적용
$this->_viewDatas['fieldDatas'] = array();
foreach ($this->_viewDatas['fields'] as $field) {
$this->_viewDatas['fieldDatas'] = $this->getFieldFormData($field);
}
}
}

View File

@ -3,7 +3,6 @@
namespace App\Controllers;
use App\Models\UserModel;
use CodeIgniter\Controller;
use CodeIgniter\HTTP\CLIRequest;
use CodeIgniter\HTTP\Files\UploadedFile;
@ -70,23 +69,6 @@ abstract class BaseController extends Controller
{
return $this->getFieldFilters();
}
protected function getFieldRule(string $field, array $rules, string $action = ""): array
{
switch ($field) {
default:
$rules = $this->_model->getFieldRule($field, $rules, $action);
break;
}
return $rules;
}
final public function getFieldRules(array $fields, string $action = ""): array
{
$rules = array();
foreach ($fields as $field) {
$rules = $this->getFieldRule($field, $rules, $action);
}
return $rules;
}
//Field별 Form Datas 처리용
protected function getFieldFormData(string $field, $entity = null): array
{
@ -144,7 +126,7 @@ abstract class BaseController extends Controller
break;
}
$this->_viewDatas['fields'] = $fields ?: $this->getFields($action);
$this->_viewDatas['fieldRules'] = $this->getFieldRules($this->_viewDatas['fields'], $action);
$this->_viewDatas['fieldRules'] = $this->_model->getFieldRules($this->_viewDatas['fields'], $action);
$this->_viewDatas['fieldFilters'] = $this->getFieldFilters();
$this->_viewDatas['batchjobFilters'] = $this->getFieldBatchFilters();
$this->_viewDatas['fieldFormOptions'] = $this->_model->getFieldFormOptions($this->_viewDatas['fieldFilters']);

View File

@ -106,6 +106,14 @@ abstract class BaseModel extends Model
}
return $rules;
}
final public function getFieldRules(array $fields, string $action = ""): array
{
$rules = array();
foreach ($fields as $field) {
$rules = $this->getFieldRule($field, $rules, $action);
}
return $rules;
}
//Field별 Form Option용
public function getOptions(array $conditions = array(), $options = array()): array
{

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
@ -21,12 +21,12 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_BoardHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td><?= anchor(current_url() . 'delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
@ -36,7 +36,7 @@
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
<?php foreach ($batchjobFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_BoardHelper($field, DEFAULTS['EMPTY'], $fieldFormOptions) ?></li><?php endforeach; ?>
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")); ?></li>
<li class="nav-item"><?= anchor(current_url() . 'insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
</ul>
<?= $pagination ?>
</div>

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
@ -21,12 +21,12 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_BoardConfigHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td><?= anchor(current_url() . 'delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
@ -36,7 +36,7 @@
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
<?php foreach ($batchjobFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_BoardConfigHelper($field, DEFAULTS['EMPTY'], $fieldFormOptions) ?></li><?php endforeach; ?>
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")); ?></li>
<li class="nav-item"><?= anchor(current_url() . 'insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
</ul>
<?= $pagination ?>
</div>

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
@ -21,12 +21,12 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_CategoryHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td><?= anchor(current_url() . 'delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
@ -36,7 +36,7 @@
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
<?php foreach ($batchjobFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_CategoryHelper($field, DEFAULTS['EMPTY'], $fieldFormOptions) ?></li><?php endforeach; ?>
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")); ?></li>
<li class="nav-item"><?= anchor(current_url() . 'insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
</ul>
<?= $pagination ?>
</div>

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
@ -21,12 +21,12 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_ProductHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td><?= anchor(current_url() . 'delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
@ -36,7 +36,7 @@
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
<?php foreach ($batchjobFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_ProductHelper($field, DEFAULTS['EMPTY'], $fieldFormOptions) ?></li><?php endforeach; ?>
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")); ?></li>
<li class="nav-item"><?= anchor(current_url() . 'insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
</ul>
<?= $pagination ?>
</div>

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
@ -21,12 +21,12 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_UserHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td><?= anchor(current_url() . 'delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
@ -36,7 +36,7 @@
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
<?php foreach ($batchjobFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_UserHelper($field, DEFAULTS['EMPTY'], $fieldFormOptions) ?></li><?php endforeach; ?>
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")); ?></li>
<li class="nav-item"><?= anchor(current_url() . 'insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
</ul>
<?= $pagination ?>
</div>

View File

@ -9,7 +9,7 @@
</ul>
<?= form_close(); ?>
</div>
<?= form_open(current_url() . 'batchjob', $forms['attributes'], $forms['hiddens']) ?>
<?= form_open(current_url() . '/batchjob', $forms['attributes'], $forms['hiddens']) ?>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
@ -21,12 +21,12 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_UserSNSHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
<td><?= anchor(current_url() . 'delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
<td><?= anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
@ -36,7 +36,7 @@
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
<?php foreach ($batchjobFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_UserSNSHelper($field, DEFAULTS['EMPTY'], $fieldFormOptions) ?></li><?php endforeach; ?>
<li class="nav-item"><?= form_submit('', '일괄처리', array("class" => "btn btn-outline btn-warning")); ?></li>
<li class="nav-item"><?= anchor(current_url() . 'insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
<li class="nav-item"><?= anchor(current_url() . '/insert', '입력', ["class" => "btn btn-sm btn-primary btn-circle", "target" => "_self"]) ?></li>
</ul>
<?= $pagination ?>
</div>

View File

@ -19,7 +19,7 @@
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?php if ($session->get(SESSION_NAMES['ISLOGIN']) && $entity->getUser_Uid() == $session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ID']]) : ?>
<?= anchor(current_url() . 'update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"]) ?>
<?php else : ?>
<?= $total_count - (($page - 1) * $per_page + $i) ?>
<?php endif; ?>

View File

@ -0,0 +1,14 @@
<nav class="navbar navbar-expand-lg bg-light" style="border-bottom:1px solid silver;">
<div class="container-fluid">
<a href="/admin" class="navbar-brand">BaseProject 관리 Site</a>
<div class="input-group custom-search-form" style="width:270px;">
<?= $this->include($layout['path'] . '/top_menu/search'); ?>
</div>
<div class="input-group custom-search-form" style="width:270px;">
<?= $this->include($layout['path'] . '/top_menu/make_password'); ?>
</div>
<div style="float: right;">
<?= $this->include($layout['path'] . '/top_menu/member_link'); ?>
</div>
</div>
</nav>