dbms_init...1
This commit is contained in:
parent
e26d2c1d12
commit
f62fece95e
@ -95,7 +95,6 @@ define('EVENT_PRIORITY_HIGH', 10);
|
||||
|
||||
//Default값 정의
|
||||
define('DEFAULTS', [
|
||||
'EMPTY' => "",
|
||||
'DELIMITER_FILE' => "||",
|
||||
'DELIMITER_ROLE' => ",",
|
||||
]);
|
||||
|
||||
@ -429,11 +429,7 @@ abstract class CommonController extends BaseController
|
||||
//조건절 처리
|
||||
foreach ($filter_fields as $field) {
|
||||
$this->$field = $this->request->getVar($field);
|
||||
echo "<BR>";
|
||||
echo "1{$field}:{$this->$field}";
|
||||
echo "<BR>";
|
||||
if (!is_null($this->$field)) {
|
||||
echo "2{$field}:{$this->$field}";
|
||||
$this->getService()->getModel()->where($this->getService()->getModel()->getTable() . '.' . $field, $this->$field);
|
||||
}
|
||||
}
|
||||
@ -488,12 +484,12 @@ abstract class CommonController extends BaseController
|
||||
//Pagination 처리
|
||||
$this->pagination = $this->getPaginationForList();
|
||||
//OrderBy 처리
|
||||
$this->order_field = $this->request->getVar('order_field') ?? DEFAULTS['EMPTY'];
|
||||
$this->order_value = $this->request->getVar('order_value') ?? DEFAULTS['EMPTY'];
|
||||
if ($this->order_field !== DEFAULTS['EMPTY'] && $this->order_value !== DEFAULTS['EMPTY']) {
|
||||
$this->getService()->getModel()->orderBy(sprintf("%s.%s %s", $this->getService()->getModel()::TABLE, $this->order_field, $this->order_value));
|
||||
$this->order_field = $this->request->getVar('order_field');
|
||||
$this->order_value = $this->request->getVar('order_value');
|
||||
if ($this->order_field && $this->order_value) {
|
||||
$this->getService()->getModel()->orderBy(sprintf("%s.%s %s", $this->getService()->getModel()->getTable(), $this->order_field, $this->order_value));
|
||||
} else {
|
||||
$this->getService()->getModel()->orderBy(sprintf("%s.%s %s", $this->getService()->getModel()::TABLE, $this->getService()->getModel()::PK, "DESC"));
|
||||
$this->getService()->getModel()->orderBy(sprintf("%s.%s %s", $this->getService()->getModel()->getTable(), $this->getService()->getModel()->getPKField(), "DESC"));
|
||||
}
|
||||
$this->getService()->getModel()->limit($this->per_page);
|
||||
$this->getService()->getModel()->offset(($this->page - 1) * $this->per_page);
|
||||
|
||||
@ -18,7 +18,6 @@ class AuthHelper extends CommonHelper
|
||||
if (in_array($viewDatas['action'], ['create', 'modify'])) {
|
||||
$extras = (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? ["class" => "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras];
|
||||
}
|
||||
$value = $value ?? DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'id':
|
||||
case 'passwd':
|
||||
|
||||
@ -184,7 +184,6 @@ class CommonHelper
|
||||
if (in_array($viewDatas['action'], ['create', 'modify'])) {
|
||||
$extras = (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? ["class" => "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras];
|
||||
}
|
||||
$value = $value ?? DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'email':
|
||||
$form = form_input($field, $value, ["placeholder" => "예)test@example.com", ...$extras]);
|
||||
@ -239,7 +238,7 @@ class CommonHelper
|
||||
|
||||
public function getFieldView(string $field, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
$value = $viewDatas['entity']->$field ?? DEFAULTS['EMPTY'];
|
||||
$value = $viewDatas['entity']->$field;
|
||||
switch ($field) {
|
||||
case $this->getTitleField():
|
||||
$value = form_label(
|
||||
@ -300,6 +299,7 @@ class CommonHelper
|
||||
{
|
||||
return $entity->isMatched($field, $value) ? "" : 'class="table-danger"';
|
||||
}
|
||||
|
||||
public function getListLabel(string $field, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($field) {
|
||||
|
||||
@ -15,7 +15,7 @@ class ClientHelper extends CustomerHelper
|
||||
}
|
||||
public function getFieldView(string $field, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
$value = $viewDatas['entity']->$field ?? DEFAULTS['EMPTY'];
|
||||
$value = $viewDatas['entity']->$field;
|
||||
switch ($field) {
|
||||
case 'account_balance':
|
||||
case 'coupon_balance':
|
||||
|
||||
@ -16,7 +16,6 @@ class DeviceHelper extends CommonHelper
|
||||
if (in_array($viewDatas['action'], ['create', 'modify'])) {
|
||||
$extras = (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? ["class" => "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras];
|
||||
}
|
||||
$value = $value ?? DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case "serverinfo_uid":
|
||||
if (!is_array($viewDatas['field_options'][$field])) {
|
||||
|
||||
@ -16,7 +16,7 @@ class MyLogHelper extends CommonHelper
|
||||
|
||||
public function getFieldView(string $field, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
$value = $viewDatas['entity']->$field ?? DEFAULTS['EMPTY'];
|
||||
$value = $viewDatas['entity']->$field;
|
||||
switch ($field) {
|
||||
case 'content':
|
||||
$value = nl2br($value);
|
||||
|
||||
@ -18,7 +18,6 @@ class UserHelper extends CommonHelper
|
||||
if (in_array($viewDatas['action'], ['create', 'modify'])) {
|
||||
$extras = (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? ["class" => "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras];
|
||||
}
|
||||
$value = $value ?? DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case 'passwd':
|
||||
case 'confirmpassword':
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="nav-item"><?= form_checkbox(array("id" => "batchjobuids_checkbox")) ?>ALL</li>
|
||||
<?php foreach ($viewDatas['batchjob_fields'] as $field): ?>
|
||||
<?= $viewDatas['helper']->getFieldForm($field, DEFAULTS['EMPTY'], $viewDatas, ['data-batchjob' => 'true']) ?>
|
||||
<?= $viewDatas['helper']->getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>
|
||||
<?php endforeach ?>
|
||||
<li class="nav-item"><?= $viewDatas['helper']->getListButton('batchjob', $viewDatas) ?></li>
|
||||
<li class="nav-item"><?= $viewDatas['helper']->getListButton('create', $viewDatas) ?></li>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user