servermgrv2 init...
This commit is contained in:
parent
f53a847780
commit
70a6df1d65
@ -95,23 +95,27 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
|||||||
$routes->post('batchjob', 'BoardController::batchjob');
|
$routes->post('batchjob', 'BoardController::batchjob');
|
||||||
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
||||||
});
|
});
|
||||||
$routes->group('hpilo', static function ($routes) {
|
});
|
||||||
$routes->get('', 'HPILOController::index');
|
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
|
||||||
$routes->get('excel', 'HPILOController::excel');
|
$routes->group('user', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) {
|
||||||
$routes->get('insert', 'HPILOController::insert_form');
|
$routes->get('update', 'UserController::update_form');
|
||||||
$routes->post('insert', 'HPILOController::insert');
|
$routes->post('update', 'UserController::update');
|
||||||
$routes->get('update/(:num)', 'HPILOController::update_form/$1');
|
$routes->get('view', 'UserController::view');
|
||||||
$routes->post('update/(:num)', 'HPILOController::update/$1');
|
});
|
||||||
$routes->get('view/(:num)', 'HPILOController::view/$1');
|
$routes->group('board', static function ($routes) {
|
||||||
$routes->get('delete/(:num)', 'HPILOController::delete/$1', ['filter' => 'authFilter:master']);
|
$routes->get('', 'BoardController::index');
|
||||||
$routes->get('toggle/(:num)/(:hash)', 'HPILOController::toggle/$1/$2');
|
$routes->get('excel', 'BoardController::excel/$1');
|
||||||
$routes->post('batchjob', 'HPILOController::batchjob');
|
$routes->get('insert', 'BoardController::insert_form');
|
||||||
$routes->get('console/(:num)', 'HPILOController::console/$1');
|
$routes->post('insert', 'BoardController::insert');
|
||||||
$routes->get('reset/(:num)/(:alpha)', 'HPILOController::reset/$1/$2');
|
$routes->get('update/(:num)', 'BoardController::update_form/$1');
|
||||||
$routes->get('reload/(:num)', 'HPILOController::reload/$1');
|
$routes->post('update/(:num)', 'BoardController::update/$1');
|
||||||
|
$routes->get('view/(:num)', 'BoardController::view/$1');
|
||||||
|
$routes->get('reply/(:num)', 'BoardController::reply_form/$1');
|
||||||
|
$routes->post('reply/(:num)', 'BoardController::reply/$1');
|
||||||
|
$routes->get('delete/(:num)', 'BoardController::delete/$1', ['filter' => 'authFilter:master']);
|
||||||
|
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
* Additional Routing
|
* Additional Routing
|
||||||
|
|||||||
@ -22,6 +22,10 @@ class UserController extends AdminController
|
|||||||
protected function getFieldFormData(string $field, $entity = null): array
|
protected function getFieldFormData(string $field, $entity = null): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
case 'role':
|
||||||
|
$roles = $this->request->getVar($field);
|
||||||
|
$this->_viewDatas['fieldDatas'][$field] = is_array($roles) ? implode(",", $roles) : $roles;
|
||||||
|
break;
|
||||||
case 'passwd':
|
case 'passwd':
|
||||||
$this->_viewDatas['fieldDatas'][$field] = $this->request->getVar($field);
|
$this->_viewDatas['fieldDatas'][$field] = $this->request->getVar($field);
|
||||||
$this->_viewDatas['fieldDatas']['confirmpassword'] = $this->request->getVar('confirmpassword');
|
$this->_viewDatas['fieldDatas']['confirmpassword'] = $this->request->getVar('confirmpassword');
|
||||||
|
|||||||
@ -70,6 +70,23 @@ abstract class BaseController extends Controller
|
|||||||
{
|
{
|
||||||
return $this->getFieldFilters();
|
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 처리용
|
//Field별 Form Datas 처리용
|
||||||
protected function getFieldFormData(string $field, $entity = null): array
|
protected function getFieldFormData(string $field, $entity = null): array
|
||||||
{
|
{
|
||||||
@ -127,9 +144,9 @@ abstract class BaseController extends Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->_viewDatas['fields'] = $fields ?: $this->getFields($action);
|
$this->_viewDatas['fields'] = $fields ?: $this->getFields($action);
|
||||||
|
$this->_viewDatas['fieldRules'] = $this->getFieldRules($this->_viewDatas['fields'], $action);
|
||||||
$this->_viewDatas['fieldFilters'] = $this->getFieldFilters();
|
$this->_viewDatas['fieldFilters'] = $this->getFieldFilters();
|
||||||
$this->_viewDatas['batchjobFilters'] = $this->getFieldBatchFilters();
|
$this->_viewDatas['batchjobFilters'] = $this->getFieldBatchFilters();
|
||||||
$this->_viewDatas['fieldRules'] = $this->_model->getFieldRules($this->_viewDatas['fields'], $action);
|
|
||||||
$this->_viewDatas['fieldFormOptions'] = $this->_model->getFieldFormOptions($this->_viewDatas['fieldFilters']);
|
$this->_viewDatas['fieldFormOptions'] = $this->_model->getFieldFormOptions($this->_viewDatas['fieldFilters']);
|
||||||
return $this->_viewDatas;
|
return $this->_viewDatas;
|
||||||
}
|
}
|
||||||
@ -189,7 +206,7 @@ abstract class BaseController extends Controller
|
|||||||
$this->_viewDatas = $this->init(__FUNCTION__);
|
$this->_viewDatas = $this->init(__FUNCTION__);
|
||||||
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
helper(['form']);
|
helper(['form']);
|
||||||
$$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||||
$this->_viewDatas['entity'] = $this->_model->getEntity([$this->_model->getPrimaryKey() => $uid]);
|
$this->_viewDatas['entity'] = $this->_model->getEntity([$this->_model->getPrimaryKey() => $uid]);
|
||||||
return view($this->_viewPath . '/update', $this->_viewDatas);
|
return view($this->_viewPath . '/update', $this->_viewDatas);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@ -17,12 +17,12 @@ function getFieldForm_UserHelper($field, $value, array $fieldFormOptions, array
|
|||||||
$value = $value ?: DEFAULTS['EMPTY'];
|
$value = $value ?: DEFAULTS['EMPTY'];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'role':
|
case 'role':
|
||||||
$fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("User.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
// $fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("User.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
||||||
return form_dropdown($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes, 'class' => "select-field"]);
|
// return form_dropdown($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes, 'class' => "select-field"]);
|
||||||
// foreach ($fieldFormOptions[$field] as $key => $label) {
|
foreach ($fieldFormOptions[$field] as $key => $label) {
|
||||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, is_array($value) ? [...$value] : [$value]), $attributes) . $label;
|
$checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, is_array($value) ? [...$value] : [$value]), $attributes) . $label;
|
||||||
// }
|
}
|
||||||
// return implode(" ", $checkboxs);
|
return implode(" ", $checkboxs);
|
||||||
// return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
// return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
||||||
break;
|
break;
|
||||||
case "status":
|
case "status":
|
||||||
@ -86,6 +86,15 @@ function getFieldFilter_UserHelper($field, $value, array $fieldFormOptions, arra
|
|||||||
{
|
{
|
||||||
$value = $value ?: DEFAULTS['EMPTY'];
|
$value = $value ?: DEFAULTS['EMPTY'];
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
case 'role':
|
||||||
|
$fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("User.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
||||||
|
return form_dropdown($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes, 'class' => "select-field"]);
|
||||||
|
// foreach ($fieldFormOptions[$field] as $key => $label) {
|
||||||
|
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, is_array($value) ? [...$value] : [$value]), $attributes) . $label;
|
||||||
|
// }
|
||||||
|
// return implode(" ", $checkboxs);
|
||||||
|
// return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return getFieldForm_UserHelper($field, $value, $fieldFormOptions, $attributes);
|
return getFieldForm_UserHelper($field, $value, $fieldFormOptions, $attributes);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -106,14 +106,6 @@ abstract class BaseModel extends Model
|
|||||||
}
|
}
|
||||||
return $rules;
|
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용
|
//Field별 Form Option용
|
||||||
public function getOptions(array $conditions = array(), $options = array()): array
|
public function getOptions(array $conditions = array(), $options = array()): array
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<?= form_close(); ?>
|
<?= form_close(); ?>
|
||||||
</div>
|
</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">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>번호</th>
|
<th>번호</th>
|
||||||
@ -21,12 +21,12 @@
|
|||||||
<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>
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= 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>
|
</td>
|
||||||
<?php foreach ($fields as $field) : ?>
|
<?php foreach ($fields as $field) : ?>
|
||||||
<td nowrap><?= getFieldIndex_Row_BoardHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
<td nowrap><?= getFieldIndex_Row_BoardHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
<?php endforeach; ?>
|
<?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>
|
</tr>
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
<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; ?>
|
<?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"><?= 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>
|
</ul>
|
||||||
<?= $pagination ?>
|
<?= $pagination ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<?= form_close(); ?>
|
<?= form_close(); ?>
|
||||||
</div>
|
</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">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>번호</th>
|
<th>번호</th>
|
||||||
@ -21,12 +21,12 @@
|
|||||||
<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>
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= 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>
|
</td>
|
||||||
<?php foreach ($fields as $field) : ?>
|
<?php foreach ($fields as $field) : ?>
|
||||||
<td nowrap><?= getFieldIndex_Row_BoardConfigHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
<td nowrap><?= getFieldIndex_Row_BoardConfigHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
<?php endforeach; ?>
|
<?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>
|
</tr>
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
<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; ?>
|
<?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"><?= 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>
|
</ul>
|
||||||
<?= $pagination ?>
|
<?= $pagination ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<?= form_close(); ?>
|
<?= form_close(); ?>
|
||||||
</div>
|
</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">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>번호</th>
|
<th>번호</th>
|
||||||
@ -21,12 +21,12 @@
|
|||||||
<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>
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= 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>
|
</td>
|
||||||
<?php foreach ($fields as $field) : ?>
|
<?php foreach ($fields as $field) : ?>
|
||||||
<td nowrap><?= getFieldIndex_Row_UserHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
<td nowrap><?= getFieldIndex_Row_UserHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
<?php endforeach; ?>
|
<?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>
|
</tr>
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
<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; ?>
|
<?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"><?= 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>
|
</ul>
|
||||||
<?= $pagination ?>
|
<?= $pagination ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<?= form_close(); ?>
|
<?= form_close(); ?>
|
||||||
</div>
|
</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">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>번호</th>
|
<th>번호</th>
|
||||||
@ -21,12 +21,12 @@
|
|||||||
<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>
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= 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>
|
</td>
|
||||||
<?php foreach ($fields as $field) : ?>
|
<?php foreach ($fields as $field) : ?>
|
||||||
<td nowrap><?= getFieldIndex_Row_UserSNSHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
<td nowrap><?= getFieldIndex_Row_UserSNSHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
<?php endforeach; ?>
|
<?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>
|
</tr>
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
<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; ?>
|
<?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"><?= 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>
|
</ul>
|
||||||
<?= $pagination ?>
|
<?= $pagination ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
38
app/Views/front/board/index.php
Normal file
38
app/Views/front/board/index.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?= $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 ($fieldFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_BoardHelper($field, $$field, $fieldFormOptions) ?></li><?php endforeach; ?>
|
||||||
|
<?= $this->include('templates/front/index_head'); ?>
|
||||||
|
</ul>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
</div>
|
||||||
|
<table class="table table-bordered table-hover table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>번호</th>
|
||||||
|
<?php foreach ($fields as $field) : ?><th><?= getFieldIndex_Column_BoardHelper($field, $order_field, $order_value) ?></th><?php endforeach; ?>
|
||||||
|
</tr>
|
||||||
|
<?php $i = 0; ?>
|
||||||
|
<?php foreach ($entitys as $entity) : ?>
|
||||||
|
<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"]) ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<?= $total_count - (($page - 1) * $per_page + $i) ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
<?php foreach ($fields as $field) : ?>
|
||||||
|
<td nowrap><?= getFieldView_BoardHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tr>
|
||||||
|
<?php $i++; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<div class="bottom">
|
||||||
|
<?= $pagination ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
21
app/Views/front/board/insert.php
Normal file
21
app/Views/front/board/insert.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?= $this->extend('layouts/front') ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<div class="content">
|
||||||
|
<?= form_open_multipart(current_url(), $forms['attributes'], $forms['hiddens']) ?>
|
||||||
|
<table class="form table table-bordered table-hover table-striped">
|
||||||
|
<?php foreach ($fields as $field) : ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= getFieldLabel_BoardHelper($field, $fieldRules) ?></td>
|
||||||
|
<td class="column">
|
||||||
|
<?= getFieldForm_BoardHelper($field, old($field, DEFAULTS['EMPTY']), $fieldFormOptions) ?>
|
||||||
|
<?= validation_show_error($field); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<tr>
|
||||||
|
<td valign="bottom" colspan="2"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
21
app/Views/front/board/reply.php
Normal file
21
app/Views/front/board/reply.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?= $this->extend('layouts/front') ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<div class="content">
|
||||||
|
<?= form_open_multipart(current_url(), $forms['attributes'], $forms['hiddens']) ?>
|
||||||
|
<table class="form table table-bordered table-hover table-striped">
|
||||||
|
<?php foreach ($fields as $field) : ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= getFieldLabel_BoardHelper($field, $fieldRules) ?></td>
|
||||||
|
<td class="column">
|
||||||
|
<?= getFieldForm_BoardHelper($field, old($field, $entity->$field), $fieldFormOptions) ?>
|
||||||
|
<?= validation_show_error($field); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<tr>
|
||||||
|
<td valign="bottom" colspan="2"><?= form_submit('', '답글', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
21
app/Views/front/board/update.php
Normal file
21
app/Views/front/board/update.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?= $this->extend('layouts/front') ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<div class="content">
|
||||||
|
<?= form_open_multipart(current_url(), $forms['attributes'], $forms['hiddens']) ?>
|
||||||
|
<table class="form table table-bordered table-hover table-striped">
|
||||||
|
<?php foreach ($fields as $field) : ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= getFieldLabel_BoardHelper($field, $fieldRules) ?></td>
|
||||||
|
<td class="column">
|
||||||
|
<?= getFieldForm_BoardHelper($field, old($field, $entity->$field), $fieldFormOptions) ?>
|
||||||
|
<?= validation_show_error($field); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<tr>
|
||||||
|
<td valign="bottom" colspan="2"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
16
app/Views/front/board/view.php
Normal file
16
app/Views/front/board/view.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?= $this->extend('layouts/front') ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<div class="content">
|
||||||
|
<table class="form table table-bordered table-hover table-striped">
|
||||||
|
<?php foreach ($fields as $field) : ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= getFieldLabel_BoardHelper($field, $fieldRules) ?></td>
|
||||||
|
<td class="column">
|
||||||
|
<?= getFieldView_BoardHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?>
|
||||||
|
<?= validation_show_error($field); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
Loading…
Reference in New Issue
Block a user