cfmgrv4 init...2

This commit is contained in:
최준흠 2024-10-05 18:49:43 +09:00
parent 8af8e9d3ac
commit 8f596fc223
42 changed files with 242 additions and 875 deletions

View File

@ -11,16 +11,23 @@ $routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}
//authFilter는 추가적인 작업이 필요
//1. app/Filters/AuthFilter.php
//2. Config/Filters.php -> $aliases = ['authFilter' => AuthFilter::class]
$routes->get('/', 'Home::index');
$routes->group('', ['namespace' => 'App\Controllers'], function ($routes) {
$routes->get('/', 'Home::index');
$routes->group('user', function ($routes) {
$routes->get('login', 'UserController::create_form');
$routes->get('signup', 'UserController::create');
$routes->get('logout', 'UserController::logout', ['filter' => 'authFilter:user']);
});
});
$routes->group('cli', ['namespace' => 'App\CLI'], function ($routes) {
$routes->group('cloudflare', ['namespace' => 'App\CLI\Cloudflare'], function ($routes) {
$routes->cli('reload', 'Cloudflare::reload');
});
});
// $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], function ($routes) {
$routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($routes) {
$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], function ($routes) {
$routes->get('/', 'Home::index');
$routes->group('user', function ($routes) {
$routes->group('user', ['filter' => 'authFilter:master'], function ($routes) {
$routes->get('/', 'UserController::index');
$routes->get('create', 'UserController::create_form');
$routes->post('create', 'UserController::create');
@ -42,7 +49,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou
$routes->post('batchjob', 'MapurlController::batcjob');
$routes->get('download/(:alpha)', 'MapurlController::download/$1');
});
$routes->group('cloudflare', ['namespace' => 'App\Controllers\Admin\Cloudflare'], function ($routes) {
$routes->group('cloudflare', ['namespace' => 'App\Controllers\Admin\Cloudflare', 'filter' => 'authFilter:cloudflare'], function ($routes) {
$routes->group('auth', function ($routes) {
$routes->get('/', 'AuthController::index');
$routes->get('create', 'AuthController::create_form');
@ -55,7 +62,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou
});
$routes->group('account', function ($routes) {
$routes->get('/', 'AccountController::index');
$routes->post('create/(:uuid)', 'AccountController::create');
$routes->get('reload/(:num)', 'AccountController::reload/$1');
$routes->get('download/(:alpha)', 'AccountController::download/$1');
});
@ -73,7 +79,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou
$routes->group('record', function ($routes) {
$routes->get('/', 'RecordController::index');
$routes->get('create', 'RecordController::create_form');
$routes->post('create)', 'RecordController::create');
$routes->post('create', 'RecordController::create');
$routes->get('delete/(:alphanum)', 'RecordController::delete/$1');
$routes->get('sync/(:alphanum)', 'RecordController::sync/$1');
$routes->get('toggle/(:alphanum)/(:any)', 'RecordController::toggle/$1/$2');

View File

@ -7,17 +7,13 @@ use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Traits\AuthTrait;
abstract class AdminController extends MVController
{
use AuthTrait;
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->root = "Admin/";
$this->layout = "admin";
$this->session = $this->session_AuthTrait();
$this->view_root .= "admin/";
$this->action_form = FORMS['MODAL'];
}
}

View File

@ -19,7 +19,8 @@ class AccountController extends CloudflareController
{
parent::initController($request, $response, $logger);
$this->class_name = "Account";
$this->class_path = $this->root . $this->class_name;
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}

View File

@ -15,8 +15,9 @@ class AuthController extends CloudflareController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->class_name = "Auth";
$this->class_path = $this->root . $this->class_name;
$this->class_name .= "Auth";
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}

View File

@ -21,7 +21,8 @@ abstract class CloudflareController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->root .= "Cloudflare/";
$this->class_path .= "Cloudflare/";
$this->view_root .= strtolower($this->class_path);
}
final protected function getAuthModel(): AuthModel
{

View File

@ -17,8 +17,9 @@ class RecordController extends CloudflareController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->class_name = "Record";
$this->class_path = $this->root . $this->class_name;
$this->class_name .= "Record";
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}

View File

@ -19,8 +19,9 @@ class ZoneController extends CloudflareController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->class_name = "Zone";
$this->class_path = $this->root . $this->class_name;
$this->class_name .= "Zone";
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}

View File

@ -16,8 +16,9 @@ class MapurlController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->class_name = "Mapurl";
$this->class_path = $this->root . $this->class_name;
$this->class_name .= "Mapurl";
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}

View File

@ -17,8 +17,9 @@ class UserController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->class_name = "User";
$this->class_path = $this->root . $this->class_name;
$this->class_name .= "User";
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}

View File

@ -1,58 +0,0 @@
<?php
namespace App\Controllers;
use App\Entities\UserEntity;
use App\Models\UserModel;
class AuthController extends CommonController
{
public function login()
{
helper(['form']);
$viewDatas = [
'layout' => LAYOUTS['empty'],
'title' => '로그인',
'forms' => [
'attributes' => ['action' => 'post', 'class' => 'row g-3'],
'hiddens' => [SESSION_NAMES['RETURN_URL'] => session()->get(SESSION_NAMES['RETURN_URL'])],
]
];
return view('auth/login', $viewDatas);
}
public function signin()
{
$id = $this->request->getVar('id');
$passwd = $this->request->getVar('passwd');
$model = new UserModel();
$user = $model->asObject(UserEntity::class)->where('id', $id)->first();
if (is_null($user) || !isset($user->passwd)) {
session()->setFlashdata('error', "사용자ID: {$id}가 존재하지 않습니다.");
return redirect()->back()->withInput();
}
if (password_verify($passwd, $user->passwd)) {
//Session에 Login 정보전달
$authData = [
'uid' => $user->uid,
'name' => $user->name,
'email' => $user->email,
'role' => $user->role,
SESSION_NAMES['ISLOGIN'] => true
];
session()->set($authData);
return redirect()->to($this->request->getVar(SESSION_NAMES['RETURN_URL']) ? $this->request->getVar(SESSION_NAMES['RETURN_URL']) : "/");
} else {
session()->setFlashdata('error', '암호가 맞지 않습니다.');
return redirect()->back()->withInput();
}
}
public function logout()
{
//Session에 Login 정보 삭제
session()->set([SESSION_NAMES['ISLOGIN'] => false]);
session_destroy();
return redirect()->route('/');
}
}

View File

@ -6,9 +6,11 @@ use App\Controllers\BaseController;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use App\Traits\AuthTrait;
abstract class CommonController extends BaseController
{
use AuthTrait;
private $_viewDatas = [];
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{

View File

@ -14,10 +14,15 @@ use Psr\Log\LoggerInterface;
abstract class MVController extends CommonController
{
protected $class_name = "";
protected $class_path = "";
protected $view_root = "";
protected $view_path = "";
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
helper('common');
$this->session = $this->session_AuthTrait();
}
abstract protected function getModel(): mixed;
//Field별 Form Rule용
@ -97,7 +102,7 @@ abstract class MVController extends CommonController
$this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
strtolower(string: $this->class_path) . "/create",
$this->view_path . "/create",
data: ['viewDatas' => $this->getViewDatas()]
);
} catch (\Exception $e) {
@ -169,7 +174,7 @@ abstract class MVController extends CommonController
$this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
strtolower($this->class_path) . "/modify",
$this->view_path . "/modify",
data: ['viewDatas' => $this->getViewDatas()]
);
} catch (\Exception $e) {
@ -377,7 +382,7 @@ abstract class MVController extends CommonController
//setting return_url to session flashdata
$this->session->setFlashdata(SESSION_NAMES['RETURN_URL'], current_url() . '?' . $this->uri->getQuery() ?: "");
return view(
strtolower($this->class_path) . "/index",
$this->view_path . "/index",
['viewDatas' => $this->getViewDatas()]
);
} catch (\Exception $e) {

View File

@ -0,0 +1,127 @@
<?php
namespace App\Controllers;
use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Validation\Validation;
use Psr\Log\LoggerInterface;
use App\Models\UserModel;
use App\Entities\UserEntity;
class UserController extends MVController
{
private $_model = null;
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->class_name .= "User";
$this->class_path .= $this->class_name;
$this->view_path = strtolower($this->view_root . $this->class_name);
$this->title = lang("{$this->class_path}.title");
helper($this->class_path);
}
protected function getModel(): UserModel
{
if ($this->_model === null) {
$this->_model = new UserModel();
}
return $this->_model;
}
protected function setFormFieldRule($field, Validation $validation, string $action): Validation
{
switch ($field) {
case 'role':
//아래 Rule Array는 필드명.* checkbox를 사용
$validation->setRule($field . ".*", $field, $this->getModel()->getFieldRule($action, $field));
break;
default:
$validation = parent::setFormFieldRule($field, $validation, $action);
break;
}
return $validation;
}
protected function getFormFieldOption(string $field, array $options = []): array
{
switch ($field) {
default:
$options = parent::getFormFieldOption($field, $options);
break;
}
return $options;
}
protected function getFormData(string $field, array $formDatas): array
{
switch ($field) {
case 'role':
$roles = $this->request->getVar($field) ?? [];
if (!count($roles)) {
throw new \Exception("권한이 지정되지 않았습니다.");
}
$formDatas[$field] = implode(DEFAULTS["DELIMITER_ROLE"], $roles);
break;
default:
$formDatas = parent::getFormData($field, $formDatas);
break;
}
return $formDatas;
}
private function init(string $action): void
{
$this->action = $action;
$this->fields = ['id', 'passwd'];
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
}
//로그인화면
public function create_form(): RedirectResponse|string
{
$this->init('create');
return $this->create_form_procedure();
}
//로그인처리
public function create(): RedirectResponse|string
{
$this->init(__FUNCTION__);
$this->formDatas = $this->getFormDatas();
$id = $this->request->getVar('id');
$passwd = $this->request->getVar('passwd');
if (!$id) {
session()->setFlashdata('error', "사용자ID를 입력해주세요!");
return redirect()->back()->withInput();
}
if (!$passwd) {
session()->setFlashdata('error', "암호를 입력해주세요!");
return redirect()->back()->withInput();
}
$entity = $this->getModel()->getEntityByID($id);
if (is_null($entity) || !isset($entity->passwd)) {
session()->setFlashdata('error', "사용자ID: {$id}가 존재하지 않습니다.");
return redirect()->back()->withInput();
}
if (password_verify($passwd, $entity->passwd)) {
//Session에 Login 정보전달
$authData = [
'uid' => $entity->getPK(),
'name' => $entity->getTitle(),
'email' => $entity->email,
'role' => $entity->role,
SESSION_NAMES['ISLOGIN'] => true
];
session()->set($authData);
return redirect()->to($this->request->getVar(SESSION_NAMES['RETURN_URL']) ? $this->request->getVar(SESSION_NAMES['RETURN_URL']) : "/");
} else {
session()->setFlashdata('error', '암호가 맞지 않습니다.');
return redirect()->back()->withInput();
}
}
//로그아웃
public function logout(): RedirectResponse
{
//Session에 Login 정보 삭제
session()->set([SESSION_NAMES['ISLOGIN'] => false]);
session_destroy();
return redirect()->route('/');
}
}

View File

@ -26,22 +26,22 @@ class AuthFilter implements FilterInterface
public function before(RequestInterface $request, $arguments = null)
{
// 로그인을 했으면
if (session()->get(SESSION['NAMES']['ISLOGIN'])) {
$auth = session()->get(SESSION['NAMES']['AUTH']);
if (session()->get(SESSION_NAMES['ISLOGIN'])) {
$auth = session()->get(SESSION_NAMES['AUTH']);
// 회원 ROLES이 필요ROLE($arguments[0]) 목록에 존재하지 않으면(ACL)
if (!in_array($arguments[0], explode(DEFAULTS['DELIMITER_ROLE'], $auth[AUTH['FIELDS']['ROLE']]))) {
if (!in_array($arguments[0], explode(DEFAULTS['DELIMITER_ROLE'], $auth[AUTH_FIELDS['ROLE']]))) {
return redirect()->to(URLS['LOGIN'])->with(
'return_message',
sprintf(
"%s,%s회원님은 접속에 필요한 권한[%s]이 없습니다. ",
$auth[AUTH['FIELDS']['ROLE']],
$auth[AUTH['FIELDS']['TITLE']],
$auth[AUTH_FIELDS['ROLE']],
$auth[AUTH_FIELDS['TITLE']],
implode(",", $arguments)
)
);
}
} else {
session()->setFlashdata(SESSION['NAMES']['RETURN_URL'], $request->getUri()->getPath() . '?' . $request->getUri()->getQuery());
session()->setFlashdata(SESSION_NAMES['RETURN_URL'], $request->getUri()->getPath() . '?' . $request->getUri()->getQuery());
return redirect()->to(URLS['LOGIN'])->with('return_message', '로그인을하셔야합니다.');
}
}

View File

@ -75,7 +75,7 @@ function getFieldView_AccountHelper(string $field, array $viewDatas, array $extr
break;
case AccountModel::TITLE:
$value = anchor(
base_url() . strtolower($viewDatas['root']) . 'zone/reload/' . $viewDatas['entity']->getPK(),
base_url() . $viewDatas['view_root'] . 'zone/reload/' . $viewDatas['entity']->getPK(),
ICONS["RELOAD"],
[
"class" => "btn btn-sm btn-primary btn-circle",
@ -83,7 +83,7 @@ function getFieldView_AccountHelper(string $field, array $viewDatas, array $extr
]
) . " " .
anchor(
base_url() . strtolower($viewDatas['root']) . "zone?account_uid=" . $viewDatas['entity']->getPK(),
base_url() . $viewDatas['view_root'] . "zone?account_uid=" . $viewDatas['entity']->getPK(),
ICONS["FLAG"],
[
"class" => "btn btn-sm btn-primary btn-circle",
@ -122,16 +122,12 @@ function getFieldView_AccountHelper(string $field, array $viewDatas, array $extr
function getListLabel_AccountHelper(string $field, array $viewDatas, array $extras = []): string
{
$label = getFieldLabel_AccountHelper($field, $viewDatas, $extras);
if ($field == $viewDatas['order_field']) {
if (isset($viewDatas['order_field']) && $field == $viewDatas['order_field']) {
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"];
}
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
$viewDatas['uri']->addQuery('order_field', $field);
$viewDatas['uri']->addQuery('order_value', $order_value);
$label = anchor((string)$viewDatas['uri'], $label);
switch ($field) {
case AccountModel::TITLE:
break;
}
return sprintf("<th %s>%s</th>", implode(" ", $extras), $label);
}
@ -175,20 +171,9 @@ function getListButton_AccountHelper(string $action, array $viewDatas, array $ex
$action = getListButtonLabel_AccountHelper($action, '입력', $viewDatas, $extras);
break;
case 'sync':
// $checkbox = form_checkbox([
// "id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
// "name" => "batchjob_uids[]",
// "value" => $viewDatas['entity']->getPK(),
// "class" => "batchjobuids_checkboxs"
// ]);
// $viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
// $action = $checkbox . getListButtonLabel_AccountHelper($action, $viewDatas['cnt'], $viewDatas, $extras);
$action = $viewDatas['cnt'];
break;
case 'delete':
// $viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
// $extras = ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self", ...$extras];
// $action = anchor($viewDatas['list_action_url'], ICONS['DELETE'], $extras);
$action = "";
break;
}

View File

@ -43,7 +43,7 @@ function getFieldView_AuthHelper(string $field, array $viewDatas, array $extras
switch ($field) {
case AuthModel::TITLE:
$value = anchor(
base_url() . strtolower($viewDatas['root']) . 'account/reload/' . $viewDatas['entity']->getPK(),
base_url() . $viewDatas['view_root'] . 'account/reload/' . $viewDatas['entity']->getPK(),
ICONS["RELOAD"],
[
"class" => "btn btn-sm btn-primary btn-circle",
@ -51,7 +51,7 @@ function getFieldView_AuthHelper(string $field, array $viewDatas, array $extras
]
) . " " .
anchor(
base_url() . strtolower($viewDatas['root']) . "account?auth_uid=" . $viewDatas['entity']->getPK(),
base_url() . $viewDatas['view_root'] . "account?auth_uid=" . $viewDatas['entity']->getPK(),
ICONS["FLAG"],
[
"class" => "btn btn-sm btn-primary btn-circle",
@ -90,16 +90,12 @@ function getFieldView_AuthHelper(string $field, array $viewDatas, array $extras
function getListLabel_AuthHelper(string $field, array $viewDatas, array $extras = []): string
{
$label = getFieldLabel_AuthHelper($field, $viewDatas, $extras);
if ($field == $viewDatas['order_field']) {
if (isset($viewDatas['order_field']) && $field == $viewDatas['order_field']) {
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"];
}
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
$viewDatas['uri']->addQuery('order_field', $field);
$viewDatas['uri']->addQuery('order_value', $order_value);
$label = anchor((string)$viewDatas['uri'], $label);
switch ($field) {
case AuthModel::TITLE:
break;
}
return sprintf("<th %s>%s</th>", implode(" ", $extras), $label);
}
@ -143,11 +139,13 @@ function getListButton_AuthHelper(string $action, array $viewDatas, array $extra
$action = getListButtonLabel_AuthHelper($action, '입력', $viewDatas, $extras);
break;
case 'modify':
$pk = $viewDatas['entity']->getPK();
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $viewDatas['entity']->getPK(),
"class" => "batchjobuids_checkboxs"
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, old("batchjob_uids", []))
]);
$viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
$action = $checkbox . getListButtonLabel_AuthHelper($action, $viewDatas['cnt'], $viewDatas, $extras);

View File

@ -120,13 +120,13 @@ function getFieldView_RecordHelper(string $field, array $viewDatas, array $extra
function getListLabel_RecordHelper(string $field, array $viewDatas, array $extras = []): string
{
$label = getFieldLabel_RecordHelper($field, $viewDatas, $extras);
if ($field == $viewDatas['order_field']) {
if (isset($viewDatas['order_field']) && $field == $viewDatas['order_field']) {
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"];
}
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
$viewDatas['uri']->addQuery('order_field', $field);
$viewDatas['uri']->addQuery('order_value', $order_value);
$label = anchor((string)$viewDatas['uri'], $label);
}
switch ($field) {
case RecordModel::PARENT:
$label .= "<button onClick=\"getElementsByClassNameCopyToClipboard('label_zones'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Domains</buttion>";
@ -202,13 +202,16 @@ function getListButton_RecordHelper(string $action, array $viewDatas, array $ext
break;
case 'sync':
$checkbox = "";
if ($viewDatas['entity']->type == "A" && $viewDatas['entity']->fixed != 'on')
if ($viewDatas['entity']->type == "A" && $viewDatas['entity']->fixed != 'on') {
$pk = $viewDatas['entity']->getPK();
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $viewDatas['entity']->getPK(),
"class" => "batchjobuids_checkboxs"
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, old("batchjob_uids", []))
]);
}
$viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
$action = $checkbox . anchor($viewDatas['list_action_url'], $viewDatas['cnt'], $extras);
break;

View File

@ -92,7 +92,7 @@ function getFieldView_ZoneHelper(string $field, array $viewDatas, array $extras
break;
case ZoneModel::TITLE:
$value = anchor(
base_url() . strtolower($viewDatas['root']) . 'record/reload/' . $viewDatas['entity']->getPK(),
base_url() . $viewDatas['view_root'] . 'record/reload/' . $viewDatas['entity']->getPK(),
ICONS["RELOAD"],
[
"class" => "btn btn-sm btn-primary btn-circle",
@ -100,7 +100,7 @@ function getFieldView_ZoneHelper(string $field, array $viewDatas, array $extras
]
) . " " .
anchor(
base_url() . strtolower($viewDatas['root']) . "record?zone_uid=" . $viewDatas['entity']->getPK(),
base_url() . $viewDatas['view_root'] . "record?zone_uid=" . $viewDatas['entity']->getPK(),
ICONS["FLAG"],
[
"class" => "btn btn-sm btn-primary btn-circle",
@ -148,13 +148,13 @@ function getFieldView_ZoneHelper(string $field, array $viewDatas, array $extras
function getListLabel_ZoneHelper(string $field, array $viewDatas, array $extras = []): string
{
$label = getFieldLabel_ZoneHelper($field, $viewDatas, $extras);
if ($field == $viewDatas['order_field']) {
if (isset($viewDatas['order_field']) && $field == $viewDatas['order_field']) {
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"];
}
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
$viewDatas['uri']->addQuery('order_field', $field);
$viewDatas['uri']->addQuery('order_value', $order_value);
$label = anchor((string)$viewDatas['uri'], $label);
}
switch ($field) {
case ZoneModel::PARENT:
break;
@ -228,11 +228,13 @@ function getListButton_ZoneHelper(string $action, array $viewDatas, array $extra
$action = getListButtonLabel_ZoneHelper($action, '입력', $viewDatas, $extras);
break;
case 'sync':
$pk = $viewDatas['entity']->getPK();
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $viewDatas['entity']->getPK(),
"class" => "batchjobuids_checkboxs"
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, old("batchjob_uids", []))
]);
$viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
$action = $checkbox . anchor($viewDatas['list_action_url'], $viewDatas['cnt'], $extras);

View File

@ -84,13 +84,13 @@ function getFieldView_MapurlHelper(string $field, array $viewDatas, array $extra
function getListLabel_MapurlHelper(string $field, array $viewDatas, array $extras = []): string
{
$label = getFieldLabel_MapurlHelper($field, $viewDatas, $extras);
if ($field == $viewDatas['order_field']) {
if (isset($viewDatas['order_field']) && $field == $viewDatas['order_field']) {
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"];
}
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
$viewDatas['uri']->addQuery('order_field', $field);
$viewDatas['uri']->addQuery('order_value', $order_value);
$label = anchor((string)$viewDatas['uri'], $label);
}
switch ($field) {
case MapurlModel::TITLE:
break;
@ -137,11 +137,13 @@ function getListButton_MapurlHelper(string $action, array $viewDatas, array $ext
$action = getListButtonLabel_MapurlHelper($action, '입력', $viewDatas, $extras);
break;
case 'modify':
$pk = $viewDatas['entity']->getPK();
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $viewDatas['entity']->getPK(),
"class" => "batchjobuids_checkboxs"
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, old("batchjob_uids", []))
]);
$viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
$action = $checkbox . getListButtonLabel_MapurlHelper($action, $viewDatas['cnt'], $viewDatas, $extras);

View File

@ -103,13 +103,13 @@ function getFieldView_UserHelper(string $field, array $viewDatas, array $extras
function getListLabel_UserHelper(string $field, array $viewDatas, array $extras = []): string
{
$label = getFieldLabel_UserHelper($field, $viewDatas, $extras);
if ($field == $viewDatas['order_field']) {
if (isset($viewDatas['order_field']) && $field == $viewDatas['order_field']) {
$label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"];
}
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
$viewDatas['uri']->addQuery('order_field', $field);
$viewDatas['uri']->addQuery('order_value', $order_value);
$label = anchor((string)$viewDatas['uri'], $label);
}
switch ($field) {
case UserModel::TITLE:
break;
@ -156,12 +156,15 @@ function getListButton_UserHelper(string $action, array $viewDatas, array $extra
$action = getListButtonLabel_UserHelper($action, '입력', $viewDatas, $extras);
break;
case 'modify':
$pk = $viewDatas['entity']->getPK();
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$viewDatas['entity']->getPK()}",
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $viewDatas['entity']->getPK(),
"class" => "batchjobuids_checkboxs"
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, old("batchjob_uids", []))
]);
$viewDatas['list_action_url'] = current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK();
$action = $checkbox . getListButtonLabel_UserHelper($action, $viewDatas['cnt'], $viewDatas, $extras);
break;

View File

@ -238,6 +238,8 @@ abstract class CommonModel extends Model
}
public function setList_OrderBy(string $order = ""): void
{
$this->orderBy($order ?: "{$this->getPKField()} DESC");
if ($order) {
$this->orderBy($order);
}
}
}

View File

@ -1,41 +0,0 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['currentCategory']->head) ?></div>
<div class="top"><?= $this->include('templates/front/index_head') ?></div>
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
<?php foreach ($viewDatas['fields'] as $field) : ?><?= getFieldIndex_Column_UserHelper($field, $viewDatas) ?><?php endforeach ?>
</tr>
</thead>
<tbody>
<?php $cnt = 0 ?>
<?php foreach ($viewDatas['entitys'] as $entity) : ?>
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
<td nowrap>
<!-- 사용자가 자신의 작성한것인지 확인되면 update 가능-->
<?php if ($viewDatas[SESSION_NAMES['ISLOGIN']] && $entity->getPrimaryKey() == $viewDatas['auth'][AUTH_FIELDS['ID']]) : ?>
<?= anchor(current_url() . '/update/' . $entity->getPrimaryKey(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?>
<?php else : ?>
<?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
<?php endif ?>
</td>
<?php foreach ($viewDatas['fields'] as $field) : ?>
<td><?= getFieldIndex_Row_UserHelper($field, $entity, $viewDatas) ?></td>
<?php endforeach ?>
</tr>
<?php $cnt++ ?>
<?php endforeach ?>
</tbody>
</table>
<div class="bottom">
<?= $viewDatas['pagination'] ?>
</div>
<?= form_close() ?>
<div><?= html_entity_decode($viewDatas['currentCategory']->tail) ?></div>
</div>
<?= $this->endSection() ?>

View File

@ -1,24 +0,0 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['currentCategory']->head) ?></div>
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="form table table-bordered table-hover table-striped">
<?php foreach ($viewDatas['fields'] as $field) : ?>
<tr>
<td class="label"><?= getFieldLabel_UserHelper($field, $viewDatas) ?></td>
<td class="column">
<?= getFieldForm_UserHelper($field, old($field, DEFAULTS['EMPTY']), $viewDatas) ?>
<?= validation_show_error($field); ?>
</td>
</tr>
<?php endforeach; ?>
<tr>
<td valign="bottom" colspan="2" style="text-align:center;"><?= form_submit('', '회원가입', array("class" => "btn btn-outline btn-primary")); ?></td>
</tr>
</table>
<?= form_close(); ?>
<div><?= html_entity_decode($viewDatas['currentCategory']->tail) ?></div>
</div>
<?= $this->endSection() ?>

View File

@ -1,39 +0,0 @@
<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/common/login.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div class="login container">
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table style="width:60%; margin-left:80px;">
<tr>
<td class=" label" nowrap>계정</td>
<td class="column">
<?= form_input('id', old('id', DEFAULTS['EMPTY']), ['tabindex' => 0]) ?>
</td>
<td rowspan="2" class="submit">
<?= form_input([
'type' => 'image', 'src' => "/images/common/btn_login.png",
'width' => '57', 'height' => '60', 'tabindex' => 2
]) ?>
</td>
</tr>
<tr>
<td class="label" nowrap>암호</td>
<td class="column">
<?= form_password('passwd', old('passwd', DEFAULTS['EMPTY']), ['tabindex' => 1]) ?>
</td>
</tr>
<tr>
<td colspan="3" class="login_bottom">
<a href="/front/user/insert">회원가입</a>
<?php foreach ($viewDatas['login_buttons'] as $key => $login_button) : ?>
<?= $login_button ?>
<?php endforeach ?>
</td>
</tr>
</table>
<?= form_close(); ?>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -1,37 +0,0 @@
<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/common/login_v1.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div class="login container">
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<div class="row mb-3">
<div class="label_column col-3">
<label class="col-form-label">아이디</label>
</div>
<div class="col-9">
<?= form_input('id', old('id', DEFAULTS['EMPTY'])) ?>
</div>
</div>
<div class="row mb-3">
<div class="label_column col-3">
<label class="col-form-label">비밀번호</label>
</div>
<div class="col-9">
<?= form_password('passwd', old('passwd', DEFAULTS['EMPTY'])) ?>
</div>
</div>
<div class="row">
<div class="col-12 text-center d-grid">
<?= form_submit('', '로그인', array("class" => "btn btn-outline btn-primary")) ?>
</div>
</div>
<div class="login_bottom row">
<div class="col"><a href="/front/user/insert">회원가입</a></div>
<!-- <div class="col"><a href="/front/user/findid">아이디찾기</a></div>
<div class="col"><a href="/front/user/findpw">비밀번호찾기</a></div> -->
</div>
</div>
<?= form_close(); ?>
</div>
<?= $this->endSection() ?>

View File

@ -1,24 +0,0 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
<div><?= html_entity_decode($viewDatas['currentCategory']->head) ?></div>
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
<table class="form table table-bordered table-hover table-striped">
<?php foreach ($viewDatas['fields'] as $field) : ?>
<tr>
<td class="label"><?= getFieldLabel_UserHelper($field, $viewDatas) ?></td>
<td class="column">
<?= getFieldForm_UserHelper($field, old($field, $viewDatas['entity']->$field ?: DEFAULTS['EMPTY']), $viewDatas) ?>
<?= validation_show_error($field); ?>
</td>
</tr>
<?php endforeach; ?>
<tr>
<td valign="bottom" colspan="2" style="text-align:center;"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></td>
</tr>
</table>
<?= form_close(); ?>
<div><?= html_entity_decode($viewDatas['currentCategory']->tail) ?></div>
</div>
<?= $this->endSection() ?>

View File

@ -1,342 +0,0 @@
<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<link href="/css/main/content.css" media="screen" rel="stylesheet" type="text/css" />
<div class="main-bnr">
<ul>
<li class="bg1">
<div class="info">
<dl>
<dt>SERVER</dt>
<dd>- 정품HP 서버 사용</dd>
<dd>- 안정적인 RAID 1+0 구성</dd>
<dd>- 365/24 기술문의 가능</dd>
</dl>
</div>
</li>
<li class="bg2">
<div class="info">
<dl>
<dt>NETWORK</dt>
<dd>- 안정적인 기가망 사용</dd>
<dd>- 100% 도전! DDOS 방어</dd>
<dd>- 실시간 트래픽 관제</dd>
</dl>
</div>
</li>
<li class="bg3">
<div class="info">
<dl>
<dt>SERVICE</dt>
<dd>- 365일24시간 고객대응</dd>
<dd>- 친절한 고객 응대</dd>
<dd>- 신속하고 정확한 작업 처리</dd>
</dl>
</div>
</li>
</ul>
</div>
<div class="contain">
<div class="main-title">
<h2>가상서버 안내 사양, 가격정보입니다.</h2>
</div>
<div class="main-table">
<table class="table">
<caption>4core</caption>
<colgroup>
<col width="495px">
</colgroup>
<thead>
<tr class="table-primary">
<th style="text-align:center">지원 서비스 </th>
<th style="text-align:center">문의</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul style="list-style-type: circle;">
<li>서비스 방어</li>
<li>DDOS 방어</li>
<li>무료 SSL(Let's Encrypt)</li>
<li>기본 OS Application 설치</li>
<li>내부 사설네트워크 추가</li>
<li>Backup/Restore,Snapshot</li>
<li>공통 가상서버 Template</li>
<li>Online 스펙변경가능</li>
<li>서비스 신청 1시간내 사용가능</li>
<li>OS(x64) : Linux , Windows 지원</li>
</ul>
</td>
<td>
<ul style="list-style-type: circle;">
<li>웹호스팅의 제약으로인해, 단독서버호스팅으로 전환해야 하나,<BR> 비용/관리 부분이 걱정되시는 </li>
<li>장비 구매/임대/유지 비용을 절감하고자 하는, / 규모 서비스</li>
<li>신규 사업 시작시 독자적인 사이트 운영이 필요하신 </li>
<li>사용량이 낮은 단독 서버호스팅 운영비용 절감이 필요하신 </li>
<li>비정기적 이벤트에 따른 일시적/한시적 서버환경이 필요하신 </li>
<li>최신 하드웨어에서 설치 불가한 구버전 운영체제를 이용하실 경우</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="main-price">
<div class="col">
<div class="main-table type2">
<table>
<caption>VPS Basic(HP DL360Gen9)</caption>
<thead>
<tr>
<th scope="col" colspan="2">VPS Basic(HP DL360Gen9)</th>
</tr>
</thead>
<tbody>
<tr>
<th>VCPU</th>
<td>Xeon 4Core</td>
</tr>
<tr>
<th>RAM</th>
<td>8G</td>
</tr>
<tr>
<th>SSD</th>
<td>100G</td>
</tr>
<tr>
<th class="none">기본임대료</th>
<td class="none"><strong class="line-through">15만원</strong> <strong class="f-back">할인가 10만원</strong> <span class="text-gray">(공인IP,회선비 별도)</span></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col">
<div class="main-table type2">
<table>
<caption>VPS Pro(HP DL360Gen9)</caption>
<thead>
<tr>
<th scope="col" colspan="2">VPS Pro(HP DL360Gen9)</th>
</tr>
</thead>
<tbody>
<tr>
<th>VCPU</th>
<td>Xeon 8Core</td>
</tr>
<tr>
<th>RAM</th>
<td>16G</td>
</tr>
<tr>
<th>SSD</th>
<td>150G</td>
</tr>
<tr>
<th class="none">기본임대료</th>
<td class="none"><strong class="line-through">25만원</strong> <strong class="f-back">할인가 15만원</strong> <span class="text-gray">(공인IP,회선비 별도)</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="main-title">
<h2>단독서버 안내 사양, 가격정보입니다.</h2>
</div>
<div class="main-price">
<div class="col">
<div class="main-table">
<table>
<caption>4core</caption>
<colgroup>
<col width="195px">
<col>
</colgroup>
<thead>
<tr>
<th scope="col" colspan="2">4core</th>
</tr>
</thead>
<tbody>
<tr>
<th>CPU</th>
<td>E5530</td>
</tr>
<tr>
<th>RAM</th>
<td>8G</td>
</tr>
<tr>
<th>HDD</th>
<td>SAS146G*4</td>
</tr>
<tr>
<th class="none">임대료</th>
<td class="none"><strong class="line-through">35만원</strong> <strong class="f-back">할인가 25만원</strong> <span class="text-gray">(회선비 별도)</span></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col">
<div class="main-table">
<table>
<caption>8core</caption>
<colgroup>
<col width="195px">
<col>
</colgroup>
<thead>
<tr>
<th scope="col" colspan="2">8core</th>
</tr>
</thead>
<tbody>
<tr>
<th>CPU</th>
<td>X5560*2</td>
</tr>
<tr>
<th>RAM</th>
<td>16G</td>
</tr>
<tr>
<th>HDD</th>
<td>SSD128G*2+SATA500G*2</td>
</tr>
<tr>
<th class="none">임대료</th>
<td class="none"><strong class="line-through">45만원</strong> <strong class="f-back">할인가 35만원</strong> <span class="text-gray">(회선비 별도)</span></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col">
<div class="main-table">
<table>
<caption>12core</caption>
<colgroup>
<col width="195px">
<col>
</colgroup>
<thead>
<tr>
<th scope="col" colspan="2">12core</th>
</tr>
</thead>
<tbody>
<tr>
<th>CPU</th>
<td>X5650*2</td>
</tr>
<tr>
<th>RAM</th>
<td>16G</td>
</tr>
<tr>
<th>HDD</th>
<td>SSD128G*2+SATA500G*2</td>
</tr>
<tr>
<th class="none">임대료</th>
<td class="none"><strong class="line-through">55만원</strong> <strong class="f-back">할인가 45만원</strong> <span class="text-gray">(회선비 별도)</span></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col type2">
<div class="main-table">
<table>
<caption>20core</caption>
<colgroup>
<col width="195px">
<col>
</colgroup>
<thead>
<tr>
<th scope="col" colspan="2">20core</th>
</tr>
</thead>
<tbody>
<tr>
<th>CPU</th>
<td>E2690v2*2</td>
</tr>
<tr>
<th>RAM</th>
<td>32G</td>
</tr>
<tr>
<th>HDD</th>
<td>SSD128G*2+SATA500G*2</td>
</tr>
<tr>
<th class="none">임대료</th>
<td class="none"><strong class="line-through">65만원</strong> <strong class="f-back">할인가 55만원</strong> <span class="text-gray">(회선비 별도)</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="main-service">
<div class="contain">
<div class="col" style="padding-left:300px;">
<div class="link">
<dl>
<dt>회선 서비스</dt>
<dd>회선서비스 코로케이션 / 단독회선 등이 있습니다.</dd>
</dl>
</div>
</div>
<div class="col">
<div class="link">
<dl>
<dt>기타 서비스</dt>
<dd>방화벽 / 웹방화벽 / 우회망 / 도메인 구매대행이 있습니다.</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="main-notice">
<div class="contain">
<div class="main-bnr2">
<ul>
<li class="bg1">
<div class="info">
<dl>
<dt>고객센터</dt>
<dd><a href="<?= MESSENGERS['skype']['url'] ?>"><?= MESSENGERS['skype']['icon'] ?><?= MALLS['email'] ?></a></dd>
</dl>
</div>
</li>
<li class="bg2">
<div class="info">
<dl>
<dt>자료실</dt>
<dd><?= view_cell('BoardCell::reference', $viewDatas) ?></dd>
</dl>
</div>
</li>
<li class=" bg3">
<div class="info">
<dl>
<dt>공지사항</dt>
<dd><?= view_cell('BoardCell::information', $viewDatas) ?></dd>
</dl>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="bottom"></div>
<?= $this->endSection() ?>

View File

@ -1,2 +0,0 @@
<?= $this->include($viewDatas['layout']['path'] . 'head/navigator'); ?>
<?= $this->include($viewDatas['layout']['path'] . 'head/top_menu'); ?>

View File

@ -1,44 +0,0 @@
<link href="/css/common/top_navigator.css" media="screen" rel="stylesheet" type="text/css" />
<nav id="header" class="navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="nav">
<span style="float:left;"><?= ICONS['LOGO'] ?></span>
</nav>
<ul class="nav justify-content-center">
<li class="nav-item">
<a href="<?= MESSENGERS['skype']['url'] ?>"><?= MESSENGERS['skype']['icon'] ?></a>&nbsp;
<a href="<?= MESSENGERS['discord']['url'] ?>"><?= MESSENGERS['discord']['icon'] ?></a>&nbsp;
<a href="<?= MESSENGERS['telegram']['url'] ?>"><?= MESSENGERS['telegram']['icon'] ?></a>&nbsp;
<a href="<?= MESSENGERS['kakaotalk']['url'] ?>"><?= MESSENGERS['kakaotalk']['icon'] ?></a>
<!-- <form class="d-flex me-20" role="search">
<input class="form-control" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form> -->
</li>
</ul>
<ul class="nav justify-content-end">
<li class="cart nav-item">
<?= anchor('/front/order', ICONS['CART'], ["target" => "_self"]); ?>
</li>
<li class="nav-item">
<li class="nav-item dropdown">
<?php if ($viewDatas[SESSION_NAMES['ISLOGIN']]): ?>
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
<?= ICONS['LOGIN'] ?> <?= $viewDatas['session']->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['TITLE']] ?>
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item" href="/front/user/update/<?= $viewDatas['session']->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ID']]
?>"><?= ICONS['SETUP'] ?>수정</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="<?= URLS['LOGOUT'] ?>"><?= ICONS['LOGOUT'] ?>Logout</a></li>
</ul>
<?php else: ?><a class="nav-link dropdown-toggle" href="<?= URLS['LOGIN'] ?>"
role="button"><?= ICONS['LOGIN'] ?>Login</a><?php endif ?>
</li>
</li>
</ul>
</div>
</nav>

View File

@ -1,37 +0,0 @@
<link href="/css/common/top_menu.css" media="screen" rel="stylesheet" type="text/css" />
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="nav"></nav>
<nav class="nav justify-content-center">
<nav id="top_menu" class="navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="nav"><a class="navbar-brand" href="/"><?= ICONS['HOME'] ?></a></nav>
<nav class="nav justify-content-center"></nav>
<ul class="nav justify-content-end">
<li class="nav-item" style="padding-top:10px;">|</li>
<?php foreach ($viewDatas['layout']['topmenus'] as $topmenus_key) : ?>
<li class="nav-item">
<div class="dropdown-center">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<?= $viewDatas['menus'][$topmenus_key]['entity']->getTitle() ?>
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDarkDropdownMenuLink">
<?php foreach ($viewDatas['menus'][$topmenus_key]['childs'] as $child) : ?>
<li class="<?= $child->getPrimaryKey() == $viewDatas['category'] ? "active" : "" ?>"><a class=" dropdown-item" href="<?= $child->linkurl ?>?category=<?= $child->getPrimaryKey() ?>"><?= $child->getTitle() ?></a></li>
<?php endforeach ?>
</ul>
</li>
</ul>
</div>
</li>
<li class="nav-item" style="padding-top:10px;">|</li>
<?php endforeach ?>
</ul>
</div>
</nav>
</nav>
<nav class="nav justify-content-end"></nav>
</div>
</nav>

View File

@ -1,14 +0,0 @@
<!-- left menu start -->
<link href="/css/common/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
<div id="left_menu">
<div class="parent">
<div>-</div>
<div class="title"><?= $viewDatas['menus'][$viewDatas['currentCategory']->parent]['entity']->getTitle() ?></div>
</div>
<?php foreach ($viewDatas['menus'][$viewDatas['currentCategory']->parent]['childs'] as $child) : ?>
<div class="sibling <?= $child->getPrimaryKey() == $viewDatas['category'] ? "active" : "" ?>">
<a href="<?= $child->linkurl ?>?category=<?= $child->getPrimaryKey() ?>" target="_self"><?= $child->getTitle() ?></a><span class="play"><i class="bi bi-play-fill"></i></span>
</div>
<?php endforeach ?>
</div>
<!-- left menu end -->

View File

@ -1 +0,0 @@
<?= $this->include($viewDatas['layout']['path'] . 'tail/copyright'); ?>

View File

@ -1,48 +0,0 @@
<!-- Copyright 시작-->
<link href="/css/common/copyright.css" media="screen" rel="stylesheet" type="text/css" />
<div id="copyright" class="container-fluid">
<nav class="nav">&nbsp;</nav>
<nav class="nav justify-content-center">
<div>
<div style="padding: 10px; margin: 10px;">
<ul class=" nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="companyinfo-tab" data-bs-toggle="tab"
data-bs-target="#companyinfo" type="button" role="tab" aria-controls="companyinfo"
aria-selected="true">
회사소개</button>
</li>
<!-- <li class="nav-item" role="presentation">
<button class="nav-link" id="usageterms-tab" data-bs-toggle="tab" data-bs-target="#usageterms" type="button" role="tab" aria-controls="usageterms" aria-selected="false">
이용약관</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="privacyhandling-tab" data-bs-toggle="tab" data-bs-target="#privacyhandling" type="button" role="tab" aria-controls="privacyhandling" aria-selected="false">
개인정보취급방침</button>
</li> -->
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="companyinfo" role="tabpanel"
aria-labelledby="companyinfo-tab" style="height:150px; text-align:left;">
항상 빠르고 안전하고 저렴한 가격으로 고객님을 대신해서 구매대행을 진행할 있도록 하겠습니다.<BR>
언제나 믿고 신뢰할 있는 르호봇이 되도록 노력하겠습니다.<BR>
감사합니다.<BR>
</div>
<div class=" tab-pane fade" id="usageterms" role="tabpanel" aria-labelledby="usageterms-tab"
style="height:150px; text-align:left;">
이용약관
</div>
<div class="tab-pane fade" id="privacyhandling" role="tabpanel"
aria-labelledby="privacyhandling-tab" style="height:150px; text-align:left;">
개인정보취급방침
</div>
</div>
</div>
<div class="address">
Copyright(c) All Right Reserved.
</div>
</div>
</nav>
<nav class="nav justify-content-end"></nav>
</div>
<!-- Copyright -->

View File

@ -1,35 +0,0 @@
<div class="footer"></div>
<?= $viewDatas['session']->getFlashdata('return_message') ? alert_CommonHelper($viewDatas['session']->getFlashdata('return_message')) : "" ?>
<script type="text/javascript">
$(document).ready(function() {
//class가 calender인 inputbox용,날짜field용
$(".calender").datepicker({
changeYear: true,
changeMonth: true,
yearRange: "-10:+0",
dateFormat: "yy-mm-dd"
});
//id가 batchjobuids_checkbox인 버튼을 클릭시 class가 batchjobuids_checkboxs인 checkbox용
$('#batchjobuids_checkbox').click(function(event) {
if (this.checked) {
$('.batchjobuids_checkboxs').each(function() { //loop checkbox
$(this).prop('checked', true); //check
});
} else {
$('.batchjobuids_checkboxs').each(function() { //loop checkbox
$(this).prop('checked', false); //uncheck
});
}
});
//class가 select-field인 SelectBox용
$(".select-field").select2({
theme: "bootstrap-5",
});
//class가 editor인 textarea용
tinymce.init({
selector: '.editor',
theme: 'silver',
height: 500
});
});
</script>

View File

@ -1,11 +0,0 @@
<nav class="header navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="nav">
<h4 class="title"><?= $viewDatas['class_icon'] ?><?= $viewDatas['currentCategory']->getTitle() ?></h4>
</nav>
<nav class="nav justify-content-center"></nav>
<nav class="nav justify-content-end">
<span class="flow"><?= ICONS['HOME'] ?> > <?= $viewDatas['menus'][$viewDatas['currentCategory']->parent]['entity']->getTitle() ?> > <?= $viewDatas['currentCategory']->getTitle() ?></span>
</nav>
</div>
</nav>

View File

@ -1,14 +0,0 @@
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="nav">
<span class="pageinfo">페이지정보 : <?= $viewDatas['page'] ?>/<?= $viewDatas['total_page'] ?></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_submit('', '검색하기') ?>
<?= form_close() ?>
</nav>
</div>
</nav>