cfmgrv4 init...1
This commit is contained in:
parent
0672b0e1df
commit
99f88a6a92
@ -24,6 +24,8 @@ class Pager extends BaseConfig
|
|||||||
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
||||||
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
||||||
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
||||||
|
'bootstrap_full' => 'Pagers\bootstrap_full',
|
||||||
|
'bootstrap_simple' => 'Pagers\bootstrap_simple',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -205,26 +205,26 @@ abstract class MVController extends CommonController
|
|||||||
{
|
{
|
||||||
//조건절 처리
|
//조건절 처리
|
||||||
foreach ($this->filter_fields as $field) {
|
foreach ($this->filter_fields as $field) {
|
||||||
$this->$field = $this->request->getVar($field) ?? DEFAULTS['EMPTY'];
|
$this->$field = $this->request->getVar($field) ?: DEFAULTS['EMPTY'];
|
||||||
if ($this->$field !== DEFAULTS['EMPTY']) {
|
if ($this->$field !== DEFAULTS['EMPTY']) {
|
||||||
$this->getMyLibrary()->getMyStorage()->setList_FieldFilter($field, $this->$field);
|
$this->getMyLibrary()->getMyStorage()->setList_FieldFilter($field, $this->$field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//검색어 처리
|
//검색어 처리
|
||||||
$this->word = $this->request->getVar('word') ?? DEFAULTS['EMPTY'];
|
$this->word = $this->request->getVar('word') ?: DEFAULTS['EMPTY'];
|
||||||
if ($this->word !== DEFAULTS['EMPTY']) {
|
if ($this->word !== DEFAULTS['EMPTY']) {
|
||||||
$this->getMyLibrary()->getMyStorage()->setList_WordFilter($this->word);
|
$this->getMyLibrary()->getMyStorage()->setList_WordFilter($this->word);
|
||||||
}
|
}
|
||||||
//검색일 처리
|
//검색일 처리
|
||||||
$this->start = $this->request->getVar('start') ?? DEFAULTS['EMPTY'];
|
$this->start = $this->request->getVar('start') ?: DEFAULTS['EMPTY'];
|
||||||
$this->end = $this->request->getVar('end') ?? DEFAULTS['EMPTY'];
|
$this->end = $this->request->getVar('end') ?: DEFAULTS['EMPTY'];
|
||||||
if ($this->start !== DEFAULTS['EMPTY'] && $this->end !== DEFAULTS['EMPTY']) {
|
if ($this->start !== DEFAULTS['EMPTY'] && $this->end !== DEFAULTS['EMPTY']) {
|
||||||
$this->getMyLibrary()->getMyStorage()->setList_DateFilter($this->start, $this->end);
|
$this->getMyLibrary()->getMyStorage()->setList_DateFilter($this->start, $this->end);
|
||||||
}
|
}
|
||||||
if (!$isTotalCount) {
|
if (!$isTotalCount) {
|
||||||
//Sorting 처리
|
//Sorting 처리
|
||||||
$this->order_field = $this->request->getVar('order_field') ?? DEFAULTS['EMPTY'];
|
$this->order_field = $this->request->getVar('order_field') ?: DEFAULTS['EMPTY'];
|
||||||
$this->order_value = $this->request->getVar('order_value') ?? DEFAULTS['EMPTY'];
|
$this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY'];
|
||||||
if ($this->order_field !== DEFAULTS['EMPTY'] && $this->order_value !== DEFAULTS['EMPTY']) {
|
if ($this->order_field !== DEFAULTS['EMPTY'] && $this->order_value !== DEFAULTS['EMPTY']) {
|
||||||
$this->getMyLibrary()->getMyStorage()->setList_OrderBy("{$this->order_field} {$this->order_value}");
|
$this->getMyLibrary()->getMyStorage()->setList_OrderBy("{$this->order_field} {$this->order_value}");
|
||||||
}
|
}
|
||||||
@ -237,11 +237,11 @@ abstract class MVController extends CommonController
|
|||||||
return $this->getMyLibrary()->getMyStorage()->countAllResults();
|
return $this->getMyLibrary()->getMyStorage()->countAllResults();
|
||||||
}
|
}
|
||||||
//PageNation 처리
|
//PageNation 처리
|
||||||
protected function list_pagination($pager_group = 'default', int $segment = 0, $template = 'bootstrap_full'): string
|
protected function list_pagination($pager_group = 'default', int $segment = 0, $template = 'default_full'): string
|
||||||
{
|
{
|
||||||
//Page, Per_page필요부분
|
//Page, Per_page필요부분
|
||||||
$this->page = (int)$this->request->getVar('page') ?? 1;
|
$this->page = (int)$this->request->getVar('page') ?: 1;
|
||||||
$this->per_page = (int)$this->request->getVar('per_page') ?? $this->_per_page;
|
$this->per_page = (int)$this->request->getVar('per_page') ?: 20;
|
||||||
//줄수 처리용
|
//줄수 처리용
|
||||||
$page_options = array("" => "줄수선택");
|
$page_options = array("" => "줄수선택");
|
||||||
for ($i = 10; $i <= $this->total_count + $this->per_page; $i += 10) {
|
for ($i = 10; $i <= $this->total_count + $this->per_page; $i += 10) {
|
||||||
@ -272,7 +272,7 @@ abstract class MVController extends CommonController
|
|||||||
protected function list_entitys(): array
|
protected function list_entitys(): array
|
||||||
{
|
{
|
||||||
$this->list_condition();
|
$this->list_condition();
|
||||||
if (array_key_exists('page', $this->_viewDatas)) {
|
if ($this->page) {
|
||||||
$this->getMyLibrary()->getMyStorage()->limit(
|
$this->getMyLibrary()->getMyStorage()->limit(
|
||||||
$this->per_page,
|
$this->per_page,
|
||||||
$this->page * $this->per_page - $this->per_page
|
$this->page * $this->per_page - $this->per_page
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Models\Cloudflare\API;
|
namespace App\Models\Cloudflare;
|
||||||
|
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
use App\Entities\Cloudflare\ZoneEntity;
|
use App\Entities\Cloudflare\ZoneEntity;
|
||||||
@ -31,8 +31,7 @@ class RecordModel extends Model
|
|||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case self::PARENT:
|
case self::PARENT:
|
||||||
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";
|
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";;
|
||||||
;
|
|
||||||
break;
|
break;
|
||||||
case self::TITLE:
|
case self::TITLE:
|
||||||
case "content":
|
case "content":
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
namespace App\Models\Cloudflare;
|
namespace App\Models\Cloudflare;
|
||||||
|
|
||||||
use App\Models\CommonModel;
|
use App\Models\CommonModel;
|
||||||
use App\Models\Cloudflare\API\RecordModel;
|
|
||||||
use App\Entities\Cloudflare\ZoneEntity;
|
use App\Entities\Cloudflare\ZoneEntity;
|
||||||
use App\Entities\Cloudflare\AccountEntity;
|
use App\Entities\Cloudflare\AccountEntity;
|
||||||
|
|
||||||
@ -31,8 +30,7 @@ class ZoneModel extends CommonModel
|
|||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case self::PARENT:
|
case self::PARENT:
|
||||||
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";
|
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";;
|
||||||
;
|
|
||||||
break;
|
break;
|
||||||
case self::TITLE:
|
case self::TITLE:
|
||||||
case "plan":
|
case "plan":
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bs_full.php - - Bootstrap 4.5.2 Pager Template.
|
* bs_full.php - - Bootstrap 4.5.2 Pager Template.
|
||||||
* @var \CodeIgniter\Pager\PagerRenderer $pager
|
* @var \CodeIgniter\Pager\PagerRenderer $pager
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user