cfmgrv4 init...1
This commit is contained in:
parent
904e79a7b6
commit
79e58dcad2
@ -95,21 +95,21 @@ define('EVENT_PRIORITY_HIGH', 10);
|
|||||||
|
|
||||||
//Default값 정의
|
//Default값 정의
|
||||||
define('DEFAULTS', [
|
define('DEFAULTS', [
|
||||||
'ROLE' => "guest",
|
'ROLE' => "guest",
|
||||||
'STATUS' => "use",
|
'STATUS' => "use",
|
||||||
'EMPTY' => "",
|
'EMPTY' => "",
|
||||||
'DELIMITER_FILE' => "||",
|
'DELIMITER_FILE' => "||",
|
||||||
'DELIMITER_ROLE' => ",",
|
'DELIMITER_ROLE' => ",",
|
||||||
]);
|
]);
|
||||||
//FORM
|
//FORM
|
||||||
define('FORMS', [
|
define('FORMS', [
|
||||||
'MODAL' => 'modal_form',
|
'MODAL' => 'modal_form',
|
||||||
'IFRAME' => 'iframe_form',
|
'IFRAME' => 'iframe_form',
|
||||||
'DIRECT' => 'direct_form',
|
'DIRECT' => 'direct_form',
|
||||||
]);
|
]);
|
||||||
//URL
|
//URL
|
||||||
define('URLS', [
|
define('URLS', [
|
||||||
'LOGIN' => '/user/login',
|
'LOGIN' => '/user/login',
|
||||||
'SIGNUP' => '/user/signup',
|
'SIGNUP' => '/user/signup',
|
||||||
'LOGOUT' => '/user/logout',
|
'LOGOUT' => '/user/logout',
|
||||||
]);
|
]);
|
||||||
@ -127,78 +127,78 @@ define('ROLES', [
|
|||||||
define('SESSION_NAMES', [
|
define('SESSION_NAMES', [
|
||||||
'RETURN_URL' => "return_url",
|
'RETURN_URL' => "return_url",
|
||||||
'RETURN_MSG' => "return_message",
|
'RETURN_MSG' => "return_message",
|
||||||
'ISLOGIN' => "islogined",
|
'ISLOGIN' => "islogined",
|
||||||
'AUTH' => 'auth',
|
'AUTH' => 'auth',
|
||||||
]);
|
]);
|
||||||
//메신저 관련
|
//메신저 관련
|
||||||
define("MESSENGERS", [
|
define("MESSENGERS", [
|
||||||
"skype" => [
|
"skype" => [
|
||||||
"url" => "//join.skype.com/invite/uKUgXfZThSQC",
|
"url" => "//join.skype.com/invite/uKUgXfZThSQC",
|
||||||
"icon" => '<img src="/images/common/top_skype.png" alt="스카이프">',
|
"icon" => '<img src="/images/common/top_skype.png" alt="스카이프">',
|
||||||
"id" => '',
|
"id" => '',
|
||||||
],
|
],
|
||||||
"discord" => [
|
"discord" => [
|
||||||
"url" => "//discord.gg/k6nQg84N",
|
"url" => "//discord.gg/k6nQg84N",
|
||||||
"icon" => '<img src="/images/common/discord.png" alt="디스코드">',
|
"icon" => '<img src="/images/common/discord.png" alt="디스코드">',
|
||||||
"id" => '',
|
"id" => '',
|
||||||
],
|
],
|
||||||
"telegram" => [
|
"telegram" => [
|
||||||
"url" => "//t.me/daemonidc",
|
"url" => "//t.me/daemonidc",
|
||||||
"icon" => '<img src="/images/common/telegram.png" alt="텔레그램">',
|
"icon" => '<img src="/images/common/telegram.png" alt="텔레그램">',
|
||||||
"id" => '@daemonidc',
|
"id" => '@daemonidc',
|
||||||
],
|
],
|
||||||
"kakaotalk" => [
|
"kakaotalk" => [
|
||||||
"url" => "//t.me/daemonidc",
|
"url" => "//t.me/daemonidc",
|
||||||
"icon" => '<img src="/images/common/kakaotalk.png" alt="카카오톡">',
|
"icon" => '<img src="/images/common/kakaotalk.png" alt="카카오톡">',
|
||||||
"id" => '',
|
"id" => '',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
//아이콘 및 Sound관련
|
//아이콘 및 Sound관련
|
||||||
define('ICONS', [
|
define('ICONS', [
|
||||||
'LOGO' => '<img src="/images/logo/android-icon-48x48.png">',
|
'LOGO' => '<img src="/images/logo/android-icon-48x48.png">',
|
||||||
'EXCEL' => '<img src="/images/common/excel.png"/>',
|
'EXCEL' => '<img src="/images/common/excel.png"/>',
|
||||||
'PDF' => '<img src="/images/common/pdf.png"/>',
|
'PDF' => '<img src="/images/common/pdf.png"/>',
|
||||||
'MEMBER' => '<i class="bi bi-people"></i>',
|
'MEMBER' => '<i class="bi bi-people"></i>',
|
||||||
'LOGIN' => '<i class="bi bi-shield-check"></i>',
|
'LOGIN' => '<i class="bi bi-shield-check"></i>',
|
||||||
'LOGOUT' => '<i class="bi bi-sign-stop-fill"></i>',
|
'LOGOUT' => '<i class="bi bi-sign-stop-fill"></i>',
|
||||||
'HOME' => '<i class="bi bi-house"></i>',
|
'HOME' => '<i class="bi bi-house"></i>',
|
||||||
'MENU' => '<i class="bi bi-menu-button"></i>',
|
'MENU' => '<i class="bi bi-menu-button"></i>',
|
||||||
'NEW' => '<i class="bi bi-database-add"></i>',
|
'NEW' => '<i class="bi bi-database-add"></i>',
|
||||||
'REPLY' => '<i class="bi bi-arrow-return-right"></i>',
|
'REPLY' => '<i class="bi bi-arrow-return-right"></i>',
|
||||||
'DATABASE' => '<i class="bi bi-database"></i>',
|
'DATABASE' => '<i class="bi bi-database"></i>',
|
||||||
'DELETE' => '<i class="bi bi-trash"></i>',
|
'DELETE' => '<i class="bi bi-trash"></i>',
|
||||||
'REBOOT' => '<i class="bi bi-repeat"></i>',
|
'REBOOT' => '<i class="bi bi-repeat"></i>',
|
||||||
'RELOAD' => '<i class="bi bi-bootstrap-reboot"></i>',
|
'RELOAD' => '<i class="bi bi-bootstrap-reboot"></i>',
|
||||||
'SETUP' => '<i class="bi bi-gear"></i>',
|
'SETUP' => '<i class="bi bi-gear"></i>',
|
||||||
'FLAG' => '<i class="bi bi-send"></i>',
|
'FLAG' => '<i class="bi bi-send"></i>',
|
||||||
'SEARCH' => '<i class="bi bi-search"></i>',
|
'SEARCH' => '<i class="bi bi-search"></i>',
|
||||||
'PLAY' => '<i class="bi bi-play-fill"></i>',
|
'PLAY' => '<i class="bi bi-play-fill"></i>',
|
||||||
'CART' => '<i class="bi bi-cart4"></i>',
|
'CART' => '<i class="bi bi-cart4"></i>',
|
||||||
'CARD' => '<i class="bi bi-credit-card"></i>',
|
'CARD' => '<i class="bi bi-credit-card"></i>',
|
||||||
'DEPOSIT' => '<i class="bi bi-cash-coin"></i>',
|
'DEPOSIT' => '<i class="bi bi-cash-coin"></i>',
|
||||||
'DESKTOP' => '<i class="bi bi-pc-display-horizontal"></i>',
|
'DESKTOP' => '<i class="bi bi-pc-display-horizontal"></i>',
|
||||||
'UP' => '<i class="bi bi-arrow-up"></i>',
|
'UP' => '<i class="bi bi-arrow-up"></i>',
|
||||||
'DOWN' => '<i class="bi bi-arrow-down"></i>',
|
'DOWN' => '<i class="bi bi-arrow-down"></i>',
|
||||||
'LEFT' => '<i class="bi bi-arrow-left"></i>',
|
'LEFT' => '<i class="bi bi-arrow-left"></i>',
|
||||||
'RIGHT' => '<i class="bi bi-arrow-right"></i>',
|
'RIGHT' => '<i class="bi bi-arrow-right"></i>',
|
||||||
'IMAGE_FILE' => '<i class="bi bi-file-earmark-image"></i>',
|
'IMAGE_FILE' => '<i class="bi bi-file-earmark-image"></i>',
|
||||||
'GOOGLE' => '<i class="bi bi-google"></i>',
|
'GOOGLE' => '<i class="bi bi-google"></i>',
|
||||||
'CLOUD' => '<i class="bi bi-cloud"></i>',
|
'CLOUD' => '<i class="bi bi-cloud"></i>',
|
||||||
'SIGNPOST' => '<i class="bi bi-signpost"></i>',
|
'SIGNPOST' => '<i class="bi bi-signpost"></i>',
|
||||||
'LOCK' => '<i class="bi bi-lock"></i>',
|
'LOCK' => '<i class="bi bi-lock"></i>',
|
||||||
'UNLOCK' => '<i class="bi bi-unlock"></i>',
|
'UNLOCK' => '<i class="bi bi-unlock"></i>',
|
||||||
'BOX' => '<i class="bi bi-box"></i>',
|
'BOX' => '<i class="bi bi-box"></i>',
|
||||||
'BOXS' => '<i class="bi bi-boxes"></i>',
|
'BOXS' => '<i class="bi bi-boxes"></i>',
|
||||||
]);
|
]);
|
||||||
//배너관련
|
//배너관련
|
||||||
define('TOP_BANNER', [
|
define('TOP_BANNER', [
|
||||||
'default' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
'default' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||||
'aboutus' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
'aboutus' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||||
'member' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
'member' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||||
'hosting' => '<img src="/images/banner/sub_visual2.jpg"/>',
|
'hosting' => '<img src="/images/banner/sub_visual2.jpg"/>',
|
||||||
'serverdevice' => '<img src="/images/banner/sub_visual3.jpg"/>',
|
'serverdevice' => '<img src="/images/banner/sub_visual3.jpg"/>',
|
||||||
'service' => '<img src="/images/banner/sub_visual3.jpg"/>',
|
'service' => '<img src="/images/banner/sub_visual3.jpg"/>',
|
||||||
'support' => '<img src="/images/banner/sub_visual4.jpg"/>',
|
'support' => '<img src="/images/banner/sub_visual4.jpg"/>',
|
||||||
]);
|
]);
|
||||||
//소리관련
|
//소리관련
|
||||||
define('AUDIOS', [
|
define('AUDIOS', [
|
||||||
@ -208,9 +208,9 @@ define('AUDIOS', [
|
|||||||
define('KEYWORD', '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버');
|
define('KEYWORD', '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버');
|
||||||
define('LAYOUTS', [
|
define('LAYOUTS', [
|
||||||
'empty' => [
|
'empty' => [
|
||||||
'title' => KEYWORD,
|
'title' => KEYWORD,
|
||||||
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty',
|
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty',
|
||||||
'metas' => [
|
'metas' => [
|
||||||
'<meta charset="UTF-8">',
|
'<meta charset="UTF-8">',
|
||||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||||
@ -231,10 +231,10 @@ define('LAYOUTS', [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'front' => [
|
'front' => [
|
||||||
'title' => KEYWORD,
|
'title' => KEYWORD,
|
||||||
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front',
|
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front',
|
||||||
'topmenus' => ['aboutus', 'hosting', 'service', 'support'],
|
'topmenus' => ['aboutus', 'hosting', 'service', 'support'],
|
||||||
'metas' => [
|
'metas' => [
|
||||||
'<meta charset="UTF-8">',
|
'<meta charset="UTF-8">',
|
||||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||||
@ -253,7 +253,6 @@ define('LAYOUTS', [
|
|||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">',
|
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">',
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
|
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
|
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css" />',
|
|
||||||
'<link rel="stylesheet" href="/css/style.css" />',
|
'<link rel="stylesheet" href="/css/style.css" />',
|
||||||
],
|
],
|
||||||
'javascripts' => [
|
'javascripts' => [
|
||||||
@ -265,9 +264,9 @@ define('LAYOUTS', [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'title' => '관리자화면',
|
'title' => '관리자화면',
|
||||||
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin',
|
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin',
|
||||||
'metas' => [
|
'metas' => [
|
||||||
'<meta charset="UTF-8">',
|
'<meta charset="UTF-8">',
|
||||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||||
@ -285,8 +284,6 @@ define('LAYOUTS', [
|
|||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">',
|
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">',
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
|
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
|
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css" />',
|
|
||||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css" />',
|
|
||||||
'<link rel="stylesheet" href="/css/style.css" />',
|
'<link rel="stylesheet" href="/css/style.css" />',
|
||||||
],
|
],
|
||||||
'javascripts' => [
|
'javascripts' => [
|
||||||
@ -294,7 +291,7 @@ define('LAYOUTS', [
|
|||||||
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
|
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
|
||||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>',
|
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>',
|
||||||
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
|
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
|
||||||
'<script src="/vendors/tinymce/tinymce/tinymce.js" referrerpolicy="origin"></script>',
|
'<script src="/vendors/tinymce/tinymce.min.js" referrerpolicy="origin"></script>',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -22,7 +22,7 @@ class ZoneController extends CloudflareController
|
|||||||
$this->class_name .= "Zone";
|
$this->class_name .= "Zone";
|
||||||
$this->class_path .= $this->class_name;
|
$this->class_path .= $this->class_name;
|
||||||
$this->view_path = strtolower($this->view_root . $this->class_name);
|
$this->view_path = strtolower($this->view_root . $this->class_name);
|
||||||
$this->title = lang("{$this->class_path}.title");
|
$this->title = lang("{$this->class_path}.title");
|
||||||
helper($this->class_path);
|
helper($this->class_path);
|
||||||
}
|
}
|
||||||
final protected function getModel(): ZoneModel
|
final protected function getModel(): ZoneModel
|
||||||
@ -51,7 +51,7 @@ class ZoneController extends CloudflareController
|
|||||||
break;
|
break;
|
||||||
case 'type':
|
case 'type':
|
||||||
case 'proxied':
|
case 'proxied':
|
||||||
$options[$field] = lang($this->root . 'Record.' . strtoupper($field));
|
$options[$field] = lang('Cloudflare/Record.' . strtoupper($field));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$options = parent::getFormFieldOption($field, $options);
|
$options = parent::getFormFieldOption($field, $options);
|
||||||
@ -82,11 +82,11 @@ class ZoneController extends CloudflareController
|
|||||||
}
|
}
|
||||||
private function init(string $action): void
|
private function init(string $action): void
|
||||||
{
|
{
|
||||||
$this->action = $action;
|
$this->action = $action;
|
||||||
$this->fields = [$this->getModel()::PARENT, 'domains', 'hosts', 'type', 'content', 'proxied'];
|
$this->fields = [$this->getModel()::PARENT, 'domains', 'hosts', 'type', 'content', 'proxied'];
|
||||||
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
$this->filter_fields = [$this->getModel()::PARENT, 'type', 'proxied'];
|
$this->filter_fields = [$this->getModel()::PARENT, 'type', 'proxied'];
|
||||||
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
}
|
}
|
||||||
//생성
|
//생성
|
||||||
public function create_form(): RedirectResponse|string
|
public function create_form(): RedirectResponse|string
|
||||||
@ -149,7 +149,7 @@ class ZoneController extends CloudflareController
|
|||||||
foreach ($zone_entitys as $zone_entity) {
|
foreach ($zone_entitys as $zone_entity) {
|
||||||
$record = new Record($zone_entity);
|
$record = new Record($zone_entity);
|
||||||
foreach ($this->formDatas['hosts'] as $host) {
|
foreach ($this->formDatas['hosts'] as $host) {
|
||||||
$entity = $record->create($host, $this->formDatas['type'], $this->formDatas['content'], $this->formDatas['proxied']);
|
$entity = $record->create($host, $this->formDatas['type'], $this->formDatas['content'], $this->formDatas['proxied']);
|
||||||
log_message("debug", "Record:{$entity->getTitle()} 작업을 완료하였습니다.");
|
log_message("debug", "Record:{$entity->getTitle()} 작업을 완료하였습니다.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,9 +180,9 @@ class ZoneController extends CloudflareController
|
|||||||
//일괄처리작업
|
//일괄처리작업
|
||||||
public function batcjob(): RedirectResponse
|
public function batcjob(): RedirectResponse
|
||||||
{
|
{
|
||||||
$this->action = __FUNCTION__;
|
$this->action = __FUNCTION__;
|
||||||
$this->fields = ['development_mode', 'ipv6', 'security_level'];
|
$this->fields = ['development_mode', 'ipv6', 'security_level'];
|
||||||
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
return $this->batcjob_procedure();
|
return $this->batcjob_procedure();
|
||||||
}
|
}
|
||||||
//Sync작업
|
//Sync작업
|
||||||
@ -221,22 +221,22 @@ class ZoneController extends CloudflareController
|
|||||||
// 리스트
|
// 리스트
|
||||||
public function index(): string
|
public function index(): string
|
||||||
{
|
{
|
||||||
$this->action = __FUNCTION__;
|
$this->action = __FUNCTION__;
|
||||||
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'name_servers', 'original_name_servers', 'plan', 'development_mode', 'ipv6', 'security_level', 'status', 'updated_at', 'created_at'];
|
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'name_servers', 'original_name_servers', 'plan', 'development_mode', 'ipv6', 'security_level', 'status', 'updated_at', 'created_at'];
|
||||||
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
$this->filter_fields = [$this->getModel()::PARENT, 'development_mode', 'ipv6', 'security_level'];
|
$this->filter_fields = [$this->getModel()::PARENT, 'development_mode', 'ipv6', 'security_level'];
|
||||||
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
||||||
return $this->list_procedure();
|
return $this->list_procedure();
|
||||||
}
|
}
|
||||||
// Download
|
// Download
|
||||||
public function download(string $output_type, $uid = false): DownloadResponse|string
|
public function download(string $output_type, $uid = false): DownloadResponse|string
|
||||||
{
|
{
|
||||||
$this->action = __FUNCTION__;
|
$this->action = __FUNCTION__;
|
||||||
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'name_servers', 'original_name_servers', 'plan', 'development_mode', 'ipv6', 'security_level', 'status', 'updated_at', 'created_at'];
|
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'name_servers', 'original_name_servers', 'plan', 'development_mode', 'ipv6', 'security_level', 'status', 'updated_at', 'created_at'];
|
||||||
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
$this->filter_fields = [$this->getModel()::PARENT, 'development_mode', 'ipv6', 'security_level'];
|
$this->filter_fields = [$this->getModel()::PARENT, 'development_mode', 'ipv6', 'security_level'];
|
||||||
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
||||||
return $this->download_procedure($output_type, $uid);
|
return $this->download_procedure($output_type, $uid);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas,
|
|||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"placeholder" => "예)exmaple.com",
|
"placeholder" => "예)exmaple.com",
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:100%; ::placeholder{color:silver; opacity: 1;}",
|
"width:100%; ::placeholder{color:silver; opacity: 1;}",
|
||||||
"class" => "form-control",
|
"class" => "form-control",
|
||||||
(strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : ""
|
(strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : ""
|
||||||
]);
|
]);
|
||||||
@ -59,7 +59,7 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas,
|
|||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"placeholder" => "예)123.123.123.123",
|
"placeholder" => "예)123.123.123.123",
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
||||||
"class" => "form-control",
|
"class" => "form-control",
|
||||||
(strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : ""
|
(strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : ""
|
||||||
]);
|
]);
|
||||||
@ -76,7 +76,7 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas,
|
|||||||
case 'type': //A,AAA...
|
case 'type': //A,AAA...
|
||||||
case 'proxied': //CDN사용여부
|
case 'proxied': //CDN사용여부
|
||||||
$form = form_dropdown($field, [
|
$form = form_dropdown($field, [
|
||||||
"" => lang('Admin/Cloudflare/Record.label.' . $field) . ' 선택',
|
"" => lang('Cloudflare/Record.label.' . $field) . ' 선택',
|
||||||
...$viewDatas['field_options'][$field]
|
...$viewDatas['field_options'][$field]
|
||||||
], $value, $extras);
|
], $value, $extras);
|
||||||
break;
|
break;
|
||||||
@ -90,7 +90,7 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas,
|
|||||||
default:
|
default:
|
||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:100%;",
|
"width:100%;",
|
||||||
"class" => "form-control",
|
"class" => "form-control",
|
||||||
(strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : ""
|
(strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : ""
|
||||||
]);
|
]);
|
||||||
@ -128,7 +128,7 @@ function getFieldView_ZoneHelper(string $field, array $viewDatas, array $extras
|
|||||||
]
|
]
|
||||||
) . " " .
|
) . " " .
|
||||||
anchor(
|
anchor(
|
||||||
base_url() . $viewDatas['view_root'] . "record?zone_uid=" . $viewDatas['entity']->getPK(),
|
base_url() . $viewDatas['view_root'] . "record?zone_uid=" . $viewDatas['entity']->getPK(),
|
||||||
ICONS["FLAG"],
|
ICONS["FLAG"],
|
||||||
[
|
[
|
||||||
"class" => "btn btn-sm btn-primary btn-circle",
|
"class" => "btn btn-sm btn-primary btn-circle",
|
||||||
@ -181,7 +181,7 @@ function getListLabel_ZoneHelper(string $field, array $viewDatas, array $extras
|
|||||||
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
|
$order_value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
|
||||||
$viewDatas['uri']->addQuery('order_field', $field);
|
$viewDatas['uri']->addQuery('order_field', $field);
|
||||||
$viewDatas['uri']->addQuery('order_value', $order_value);
|
$viewDatas['uri']->addQuery('order_value', $order_value);
|
||||||
$label = anchor((string)$viewDatas['uri'], $label);
|
$label = anchor((string) $viewDatas['uri'], $label);
|
||||||
}
|
}
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case ZoneModel::PARENT:
|
case ZoneModel::PARENT:
|
||||||
@ -198,7 +198,7 @@ function getListButton_ZoneHelper(string $action, array $viewDatas, array $extra
|
|||||||
case 'create':
|
case 'create':
|
||||||
$viewDatas['list_action_url'] = current_url() . '/' . $action . '?' . $viewDatas['uri']->getQuery(['only' => ZoneModel::PARENT]);
|
$viewDatas['list_action_url'] = current_url() . '/' . $action . '?' . $viewDatas['uri']->getQuery(['only' => ZoneModel::PARENT]);
|
||||||
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||||
$action = getListButtonLabel_CommonHelper($action, '입력', $viewDatas, $extras);
|
$action = getListButtonLabel_CommonHelper($action, '입력', $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
case 'sync':
|
case 'sync':
|
||||||
$pk = $viewDatas['entity']->getPK();
|
$pk = $viewDatas['entity']->getPK();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user