vhost init...3
This commit is contained in:
parent
f2457ea0e8
commit
101e6b0c75
@ -528,12 +528,12 @@ abstract class BaseController extends Controller
|
||||
{
|
||||
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||
}
|
||||
protected function index_setCondition()
|
||||
protected function index_condition()
|
||||
{
|
||||
//조건절 처리
|
||||
$filterFields = array();
|
||||
foreach ($this->_viewDatas['fieldFilters'] as $field) {
|
||||
if (!is_null($this->request->getVar($field))) {
|
||||
if ($this->request->getVar($field) != DEFAULTS['EMPTY']) {
|
||||
$filterFields[$field] = $this->request->getVar($field);
|
||||
}
|
||||
}
|
||||
@ -551,7 +551,7 @@ abstract class BaseController extends Controller
|
||||
$this->_viewDatas['order_value']
|
||||
);
|
||||
}
|
||||
private function index_getPagination($pager_group = 'default', int $segment = 0, $template = 'bootstrap_full'): string
|
||||
private function index_pagination($pager_group = 'default', int $segment = 0, $template = 'bootstrap_full'): string
|
||||
{
|
||||
// 1.Views/Pagers/에 bootstrap_full.php,bootstrap_simple.php 생성
|
||||
// 2.app/Config/Pager.php/$templates에 'bootstrap_full => 'Pagers\bootstrap_full',
|
||||
@ -570,9 +570,9 @@ abstract class BaseController extends Controller
|
||||
$this->_viewDatas['total_page'] = $pager->getPageCount($pager_group);
|
||||
return $pager->links($pager_group, $template);
|
||||
}
|
||||
private function index_getEntitys(): array
|
||||
private function index_entitys(): array
|
||||
{
|
||||
$this->index_setCondition();
|
||||
$this->index_condition();
|
||||
if (array_key_exists('page', $this->_viewDatas)) {
|
||||
return $this->_model->findAll(
|
||||
$this->_viewDatas['per_page'],
|
||||
@ -590,7 +590,7 @@ abstract class BaseController extends Controller
|
||||
}
|
||||
$this->index_process();
|
||||
//Totalcount 처리
|
||||
$this->index_setCondition();
|
||||
$this->index_condition();
|
||||
$this->_viewDatas['total_count'] = $this->_model->countAllResults();
|
||||
// echo $this->_model->getLastQuery();
|
||||
// echo "<HR>";
|
||||
@ -605,9 +605,9 @@ abstract class BaseController extends Controller
|
||||
$this->_viewDatas['pageOptions'][$i] = $i;
|
||||
}
|
||||
//pagenation 처리
|
||||
$this->_viewDatas['pagination'] = $this->index_getPagination();
|
||||
$this->_viewDatas['pagination'] = $this->index_pagination();
|
||||
//모델 처리
|
||||
$this->_viewDatas['entitys'] = $this->index_getEntitys();
|
||||
$this->_viewDatas['entitys'] = $this->index_entitys();
|
||||
// echo $this->_model->getLastQuery();
|
||||
// exit;
|
||||
// log_message("debug", __METHOD__ . "에서 findAll 호출:" . $this->_model->getLastQuery());
|
||||
@ -647,7 +647,7 @@ abstract class BaseController extends Controller
|
||||
{
|
||||
try {
|
||||
$this->_viewDatas = $this->action_init(['action' => __FUNCTION__]);
|
||||
$this->_viewDatas['Entitys'] = $this->index_getEntitys();
|
||||
$this->_viewDatas['Entitys'] = $this->index_entitys();
|
||||
$html = view(
|
||||
$this->_viewPath . '/excel',
|
||||
['viewDatas' => $this->_viewDatas]
|
||||
|
||||
@ -117,11 +117,11 @@ class BoardController extends FrontController
|
||||
parent::index_process();
|
||||
}
|
||||
//Category 및 Status 조건추가
|
||||
protected function index_setCondition()
|
||||
protected function index_condition()
|
||||
{
|
||||
$this->_model->where("category_uid", $this->_viewDatas['currentCategory']->getPrimaryKey());
|
||||
$this->_model->where("category", $this->_viewDatas['currentCategory']->getPrimaryKey());
|
||||
$this->_model->where("status", DEFAULTS['STATUS']);
|
||||
parent::index_setCondition();
|
||||
parent::index_condition();
|
||||
}
|
||||
//Download관련
|
||||
public function download_process($field, $entity)
|
||||
|
||||
@ -178,7 +178,7 @@ class OrderController extends FrontController
|
||||
$this->setCategory($this->request->getVar('category') ?: self::DEFAULT_CATEGORY);
|
||||
parent::index_process();
|
||||
}
|
||||
protected function index_setCondition()
|
||||
protected function index_condition()
|
||||
{
|
||||
//세션에 Cart정보(order_uids)가 있으면
|
||||
$uids = $this->_session->get(SESSION_NAMES['CART']) ?: array('NONE');
|
||||
@ -191,6 +191,6 @@ class OrderController extends FrontController
|
||||
} elseif (count($uids)) {
|
||||
$this->_model->whereIn('uid', $uids);
|
||||
}
|
||||
parent::index_setCondition();
|
||||
parent::index_condition();
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,10 +66,10 @@ class ProductController extends FrontController
|
||||
return parent::index_process();
|
||||
}
|
||||
//Category 및 Status 조건추가
|
||||
protected function index_setCondition()
|
||||
protected function index_condition()
|
||||
{
|
||||
$this->_model->where("category_uid", $this->_viewDatas['currentCategory']->getPrimaryKey());
|
||||
$this->_model->where("status", DEFAULTS['STATUS']);
|
||||
parent::index_setCondition();
|
||||
parent::index_condition();
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,10 +54,10 @@ class SitepageController extends FrontController
|
||||
return parent::index_process();
|
||||
}
|
||||
//Category 및 Status 조건추가
|
||||
protected function index_setCondition()
|
||||
protected function index_condition()
|
||||
{
|
||||
$this->_model->where("category_uid", $this->_viewDatas['currentCategory']->getPrimaryKey());
|
||||
$this->_model->where("category", $this->_viewDatas['currentCategory']->getPrimaryKey());
|
||||
$this->_model->where("status", DEFAULTS['STATUS']);
|
||||
parent::index_setCondition();
|
||||
parent::index_condition();
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,10 +115,10 @@ class UserController extends FrontController
|
||||
parent::index_process();
|
||||
}
|
||||
//사용자 UID 조건추가
|
||||
protected function index_setCondition()
|
||||
protected function index_condition()
|
||||
{
|
||||
$this->_model->where("uid", $this->_viewDatas['auth'][AUTH_FIELDS['ID']]);
|
||||
parent::index_setCondition();
|
||||
parent::index_condition();
|
||||
}
|
||||
|
||||
//추가기능
|
||||
|
||||
@ -15,7 +15,7 @@ return [
|
||||
'created_at' => "생성일"
|
||||
],
|
||||
"TYPE" => [
|
||||
'beremetal' => '실서버',
|
||||
'beremetal' => '단독서버',
|
||||
'kvm' => '가상서버',
|
||||
'container' => '콘테이너',
|
||||
'cpu' => 'CPU',
|
||||
|
||||
@ -289,12 +289,8 @@ abstract class BaseModel extends Model
|
||||
foreach ($filterFields as $field => $value) {
|
||||
$this->where($field, $value);
|
||||
}
|
||||
if (!is_null($word)) {
|
||||
$this->setIndexWordFilter($word);
|
||||
}
|
||||
if (!is_null($start) && !is_null($end)) {
|
||||
$this->setIndexDateFilter($start, $end);
|
||||
}
|
||||
$this->setIndexWordFilter($word);
|
||||
$this->setIndexDateFilter($start, $end);
|
||||
$this->setIndexOrderBy($order_field, $order_value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_BillingHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_BoardHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_CategoryHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_DeviceHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_OrderHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_ProductHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_SitepageHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_UserHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
<link href="/css/admin/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field) : ?><?= getFieldFilter_UserSNSHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
</div>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-hover">
|
||||
|
||||
@ -1,19 +1,12 @@
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="container-fluid">
|
||||
<nav class="nav">
|
||||
<span class="pageinfo">
|
||||
페이지정보 : <?= $viewDatas['page'] ?>/<?= $viewDatas['total_page'] ?>
|
||||
<?= form_dropdown('per_page', $viewDatas['pageOptions'], $viewDatas['per_page'], array('onChange' => 'this.form.submit()')) ?> / 총:<?= $viewDatas['total_count'] ?>
|
||||
</span>
|
||||
</nav>
|
||||
<nav class="nav justify-content-center"></nav>
|
||||
<nav class="nav justify-content-end">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
검색어:<?= form_input('word', $viewDatas['word']) ?>
|
||||
검색일:<?= form_input('start', $viewDatas['start'], ["class" => "calender"]) ?><?= form_input('end', $viewDatas['end'], ["class" => "calender"]) ?>
|
||||
<?= form_submit('', '검색하기') ?>
|
||||
<?= anchor(current_url() . '/excel?' . $viewDatas['uri']->getQuery(), ICONS['EXCEL'], ["target" => "_self"]) ?>
|
||||
<?= form_close() ?>
|
||||
</nav>
|
||||
</div>
|
||||
<nav class="nav justify-content-end">
|
||||
검색어:<?= form_input('word', $viewDatas['word']) ?>
|
||||
검색일:<?= form_input('start', $viewDatas['start'], ["class" => "calender"]) ?><?= form_input('end', $viewDatas['end'], ["class" => "calender"]) ?>
|
||||
<?= form_submit('', '검색하기') ?>
|
||||
<?= anchor(current_url() . '/excel?' . $viewDatas['uri']->getQuery(), ICONS['EXCEL'], ["target" => "_self"]) ?>
|
||||
</nav>
|
||||
<nav class="nav justify-content-end">
|
||||
<span class="pageinfo">
|
||||
페이지정보 : <?= $viewDatas['page'] ?>/<?= $viewDatas['total_page'] ?>
|
||||
<?= form_dropdown('per_page', $viewDatas['pageOptions'], $viewDatas['per_page'], array('onChange' => 'this.form.submit()')) ?> / 총:<?= $viewDatas['total_count'] ?>
|
||||
</span>
|
||||
</nav>
|
||||
Loading…
Reference in New Issue
Block a user