cfmgrv4 init...4

This commit is contained in:
최준흠 2024-09-29 22:47:56 +09:00
parent 34c7833132
commit 4bbfae7ccf
15 changed files with 251 additions and 160 deletions

View File

@ -121,7 +121,7 @@ function getListColumns_RecordHelper(string $field, array $viewDatas, array $ext
$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 Zones</buttion>";
$label .= "<button onClick=\"getElementsByClassNameCopyToClipboard('label_zones'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Domains</buttion>";
break;
case RecordModel::TITLE:
$label .= "<button onClick=\"getElementsByClassNameCopyToClipboard('label_hosts'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Hosts</buttion>";

View File

@ -66,7 +66,7 @@ function getFieldView_ZoneHelper(string $field, mixed $entity, array $viewDatas,
"class" => "btn btn-sm btn-primary btn-circle",
"target" => "_self"
]
) . " <span class=\"label_zones\">" .
) . " <span class=\"label_accounts\">" .
preg_replace("/(\w+)@(.+)/", "$1", $viewDatas['field_options'][$field][$value])
. "</span>";
}
@ -138,10 +138,9 @@ function getListColumns_ZoneHelper(string $field, array $viewDatas, array $extra
$label = anchor((string)$viewDatas['uri'], $label);
switch ($field) {
case ZoneModel::PARENT:
$label .= "<button onClick=\"getElementsByClassNameCopyToClipboard('label_zones'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Zones</buttion>";
break;
case ZoneModel::TITLE:
$label .= "<button onClick=\"getElementsByClassNameCopyToClipboard('label_hosts'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Hosts</buttion>";
$label .= "<button onClick=\"getElementsByClassNameCopyToClipboard('label_zones'); return false;\" class=\"btn btn-sm btn-danger btn-circle\">Copy Domains</buttion>";
break;
}
return sprintf("<th %s>%s</th>", implode(" ", $extras), $label);

View File

@ -1,40 +1,42 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title><?= $viewDatas['title'] ?></title>
<?php foreach (LAYOUTS[$viewDatas['layout']]['stylesheets'] as $stylesheet): ?>
<?= $stylesheet ?>
<?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['javascripts'] as $javascript): ?>
<?= $javascript ?>
<?php endforeach; ?>
<link href="/css/admin.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/admin.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title><?= $viewDatas['title'] ?></title>
<?php foreach (LAYOUTS[$viewDatas['layout']]['stylesheets'] as $stylesheet): ?>
<?= $stylesheet ?>
<?php endforeach; ?>
<?php foreach (LAYOUTS[$viewDatas['layout']]['javascripts'] as $javascript): ?>
<?= $javascript ?>
<?php endforeach; ?>
<link href="/css/<?= $viewDatas['layout'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn' t work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
</head>
<body>
<div class="layout">
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/head'); ?>
<div class="center">
<div class="left_menu"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?></div>
<div class="content">
<div class="header"><?= $this->include('templates/admin/header'); ?></div>
<div class="center"><?= $this->renderSection('content') ?></div>
<div class="footer"><?= $this->include('templates/admin/footer'); ?></div>
</div>
</div>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/tail'); ?>
<body>
<div class="top">
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
</div>
<div class="middle">
<div class="left"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?></div>
<div class="center">
<div class="header"><?= $this->include('templates/' . $viewDatas['layout'] . '/header'); ?></div>
<div class="content"><?= $this->renderSection('content') ?></div>
<div class="footer"><?= $this->include('templates/' . $viewDatas['layout'] . '/footer'); ?></div>
</div>
</body>
</div>
<div class="bottom">
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
</div>
</body>
</html>

View File

@ -1,13 +1,13 @@
<!-- left menu start -->
<link href="/css/admin/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/admin/side_menu.js"></script>
<div id="left_menu" class="shadow-lg rounded" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
<link href="/css/<?= $viewDatas['layout'] ?>/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/left_menu.js"></script>
<div id="left_menu">
<div id="accordion" class="accordion accordion-flush">
<div class="accordion-item" style="background-color: #eaeaea;">
<h2><a href=" /admin"><i class="fa fa-home"></i>Main</a></h2>
<div class="main">
<a href="/admin/user"><?= ICONS["HOME"] ?> Main</a>
</div>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/base'); ?>
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu/cloudflare'); ?>
</div>
<div id="menu_button">메뉴열기</div>
<div id="menu_button" onClick="sideMenuToggle(this);">메뉴열기</div>
</div>

View File

@ -1,9 +1,9 @@
<div class="accordion-item">
<h2><a href="/admin/user"><?= ICONS['MEMBER'] ?>계정 관리</a></h2>
<a href="/admin/user"><?= ICONS['MEMBER'] ?>계정 관리</a>
</div>
<div class="accordion-item">
<h2><a href="/admin/usersns"><?= ICONS['GOOGLE'] ?>SNS 계정 관리</a></h2>
<a href="/admin/usersns"><?= ICONS['GOOGLE'] ?> SNS 계정 관리</a>
</div>
<div class="accordion-item">
<h2><a href="/admin/cloudflare/mapurl"><?= ICONS['FLAG'] ?>MapURL 관리</a></h2>
<a href="/admin/cloudflare/mapurl"><?= ICONS['FLAG'] ?> MapURL 관리</a>
</div>

View File

@ -1,19 +1,20 @@
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#flush-heading-Board" aria-expanded="false"
aria-controls="flush-heading-Board"><b><?= ICONS['CLOUD'] ?> Cloudflare API</b></button>
data-bs-target="#flush-heading1" aria-expanded="false"
aria-controls="flush-heading1"><b><?= ICONS['CLOUD'] ?> Cloudflare API</b>
</button>
</h2>
<div id="flush-heading-Board" class="accordion-collapse collapse show" aria-labelledby="flush-heading-Board">
<div id="flush-heading1" class="accordion-collapse collapse show" aria-labelledby="flush-heading1">
<div class="accordion-item">
<h2><a href="/admin/cloudflare/auth"><?= ICONS['MEMBER'] ?>Auth</a></h2>
<a href="/admin/cloudflare/auth"><?= ICONS['MEMBER'] ?> Auth</a>
</div>
<div class="accordion-item">
<h2><a href="/admin/cloudflare/account"><?= ICONS['SIGNPOST'] ?>Account</a></h2>
<a href="/admin/cloudflare/account"><?= ICONS['SIGNPOST'] ?> Account</a>
</div>
<div class="accordion-item">
<h2><a href="/admin/cloudflare/zone"><?= ICONS['SIGNPOST2'] ?>Zone</a></h2>
<a href="/admin/cloudflare/zone"><?= ICONS['SIGNPOST2'] ?> Zone</a>
</div>
<div class="accordion-item">
<h2><a href="/admin/cloudflare/record"><?= ICONS['SIGNPOST'] ?>Record</a></h2>
<a href="/admin/cloudflare/record"><?= ICONS['SIGNPOST'] ?> Record</a>
</div>
</div>

View File

@ -1,13 +1,13 @@
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#flush-heading-Board" aria-expanded="false"
aria-controls="flush-heading-Board"><b>사이트관리</b></button>
data-bs-target="#flush-heading2" aria-expanded="false"
aria-controls="flush-heading2"><b>사이트관리</b></button>
</h2>
<div id="flush-heading-Board" class="accordion-collapse collapse show" aria-labelledby="flush-heading-Board">
<div id="flush-heading2" class="accordion-collapse collapse show" aria-labelledby="flush-heading2">
<div class="accordion-item">
<h2><a href="/admin/board">게시글 관리</a></h2>
<a href="/admin/board"> 게시글 관리</a>
</div>
<div class="accordion-item">
<h2><a href="/admin/sitepage">SitePage 관리</a></h2>
<a href="/admin/sitepage"> SitePage 관리</a>
</div>
</div>

View File

@ -1,4 +1,4 @@
<nav class="head navbar navbar-expand-lg">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="nav"><a class="navbar-brand" href="#">관리페이지</a></nav>
<ul class="nav justify-content-center">
@ -12,18 +12,18 @@
<button class="btn btn-default border border-dark" type="button" id="totSearchBtn"
onClick="window.location.reload();"><?= ICONS['SEARCH'] ?></button>
</li>
<li class="nav-item">
<!-- <li class="nav-item">
<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>
</li> -->
</ul>
<ul class="nav justify-content-end">
<li class="nav-item">
<?php if ($viewDatas['session']->get(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']] ?>
<?= ICONS['LOGIN'] ?> <?= $viewDatas['session']->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['TITLE']] ?>
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item"

View File

@ -1,8 +1,8 @@
<div class="footer">
<div>
<?= $viewDatas['session']->getFlashdata('return_message') ? alert_CommonHelper($viewDatas['session']->getFlashdata('return_message')) : "" ?>
</div>
<script type="text/javascript">
$(document).ready(function () {
$(document).ready(function() {
//class가 calender인 inputbox용,날짜field용
$(".calender").datepicker({
changeYear: true,
@ -11,13 +11,13 @@
dateFormat: "yy-mm-dd"
});
//id가 batchjobuids_checkbox인 버튼을 클릭시 class가 batchjobuids_checkboxs인 checkbox용
$('#batchjobuids_checkbox').click(function (event) {
$('#batchjobuids_checkbox').click(function(event) {
if (this.checked) {
$('.batchjobuids_checkboxs').each(function () { //loop checkbox
$('.batchjobuids_checkboxs').each(function() { //loop checkbox
$(this).prop('checked', true); //check
});
} else {
$('.batchjobuids_checkboxs').each(function () { //loop checkbox
$('.batchjobuids_checkboxs').each(function() { //loop checkbox
$(this).prop('checked', false); //uncheck
});
}
@ -25,7 +25,8 @@
//class가 select-field인 SelectBox용
$(".select-field").select2({
theme: "classic",
width: 'style'
width: 'style',
dropdownAutoWidth: true
});
// text editor 초기화
//참고: https://phppot.com/menu/php/learn-php/
@ -38,12 +39,12 @@
automatic_uploads: false,
images_upload_url: '/tinymce_upload.php',
// images_upload_base_path: '/upload_images',
images_upload_handler: function (blobInfo, success, failure) {
images_upload_handler: function(blobInfo, success, failure) {
var xhr, formData;
xhr = new XMLHttpRequest();
xhr.withCredentials = false;
xhr.open('POST', '/tinymce_upload.php');
xhr.onload = function () {
xhr.onload = function() {
var json;
if (xhr.status != 200) {
failure('HTTP Error: ' + xhr.status);

View File

@ -1,7 +1,87 @@
<ul class="nav nav-tabs">
<li class="nav-item">
<span class="nav-link active" aria-current="page">
<h4><?= ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?></h4>
<span class="nav-item navbar-brand" aria-current="page">
<h4>&nbsp;&nbsp;<?= ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?>&nbsp;&nbsp;</h4>
</span>
</li>
</ul>
<li class="nav-item">
<span class="nav-link active" aria-current="page" data-bs-toggle="modal" data-bs-target="#DNSModal" style="cursor:pointer;">Cloudflare DNS</span>
</li>
</ul>
<div class="modal fade" id="DNSModal" tabindex="-1" aria-labelledby="CloudflareDNSModal" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="CloudflareDNSModal">Cloudflare DNS</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<style>
table.cloudflare {
width: 100%;
border: thin solid;
}
table.cloudflare th {
border: thin solid;
text-align: center;
padding: 0px 5px 0px 5px;
background-color: #e8e9ea;
}
table.cloudflare td {
border: thin solid;
text-align: center;
padding: 0px 5px 0px 5px;
}
table.cloudflare td.dnsname:hover {
cursor: pointer;
background-color: #fde9bf;
}
</style>
<script>
function copyToClipboard(element, domain) {
navigator.clipboard.writeText(domain);
element.style.backgroundColor = '#fde9bf';
}
</script>
<table class="cloudflare">
<tr>
<th>cloudprime001@idcjp.jp(,숫자)</th>
<td class="dnsname" onclick="copyToClipboard(this,'felicity.ns.cloudflare.com')">felicity.ns.cloudflare.com</td>
<td class="dnsname" onclick="copyToClipboard(this,'tara.ns.cloudflare.com')">tara.ns.cloudflare.com</td>
</tr>
<tr>
<th>cloudjp002@idcjp.jp(~)</th>
<td class="dnsname" onclick="copyToClipboard(this,'aida.ns.cloudflare.com');">aida.ns.cloudflare.com</td>
<td class="dnsname" onclick="copyToClipboard(this,'kurt.ns.cloudflare.com');">kurt.ns.cloudflare.com</td>
</tr>
<tr>
<th>jpcf003@gmail.com(~)</th>
<td class="dnsname" onclick="copyToClipboard(this,'natasha.ns.cloudflare.com');">natasha.ns.cloudflare.com</td>
<td class="dnsname" onclick="copyToClipboard(this,'plato.ns.cloudflare.com');">plato.ns.cloudflare.com</td>
</tr>
<tr>
<th>cloudwin001@idcjp.jp(,숫자)</th>
<td class="dnsname" onclick="copyToClipboard(this,'alina.ns.cloudflare.com');">alina.ns.cloudflare.com</td>
<td class="dnsname" onclick="copyToClipboard(this,'rick.ns.cloudflare.com');">rick.ns.cloudflare.com</td>
</tr>
<tr>
<th>cloudwin002@idcjp.jp(~)</th>
<td class="dnsname" onclick="copyToClipboard(this,'hope.ns.cloudflare.com');">hope.ns.cloudflare.com</td>
<td class="dnsname" onclick="copyToClipboard(this,'piotr.ns.cloudflare.com');">piotr.ns.cloudflare.com</td>
</tr>
<tr>
<th>cloudwin003@idcjp.jp(~)</th>
<td class="dnsname" onclick="copyToClipboard(this,'tani.ns.cloudflare.com');">tani.ns.cloudflare.com</td>
<td class="dnsname" onclick="copyToClipboard(this,'woz.ns.cloudflare.com');">woz.ns.cloudflare.com</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

View File

@ -7,58 +7,66 @@
* {
margin: 0px;
padding: 0px;
font-size: 16px;
}
body {
height: 100vw; /* 화면 넓이의 100% */
height: 100vh; /* 화면 높이의 100% */
background-color: #efefef;
/* border:1px solid blue; */
}
div.layout > nav.head {
height: 51px;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
background-color: #f8f9fa;
}
div.layout > nav.tail {
height: 51px;
bottom: 0;
left: 0;
width: 100%;
background-color: silver;
text-align: center;
padding: 10px;
border: 0px;
/* font-size: 15px; */
}
div.layout > div.center > div.left_menu {
border-color: 1px solid red;
body {
background-color: #efefef;
}
div.layout > div.center > div.content {
margin: 15px 15px 15px 25px;
div.top {
height: 51px;
margin-bottom: 10px;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
background-color: #e8e9ea;
}
div.layout > div.center > div.content > div.header {
div.middle {
/* height: 100%; */
/* display: flex; */
}
div.middle div.left {
width: 217px;
/* overflow: auto; */
/* border: 1px solid red; */
}
div.middle div.center {
width: 100%;
/* overflow: auto; */
/* border: 1px solid blue; */
}
div.middle div.center div.header {
/*content 헤더라인*/
height: 50px;
height: 55px;
padding-top: 15px;
background-color: #e7e7e7;
}
div.layout > div.center > div.content > div.header > ul.nav {
/*nav-tabs 헤더라인*/
border-top: 1px solid gray;
border-left: 1px solid gray;
border-right: 1px solid gray;
border-radius: 15px 15px 0px 0px;
}
div.layout > div.center > div.content > div.center {
div.middle div.center div.header li.nav-item {
height: 40px;
}
div.middle div.center div.content {
/*content 부분*/
height: 100%;
padding: 15px;
/* border: 1px solid gray; */
padding-top: 15px;
padding-left: 23px;
padding-right: 15px;
padding-bottom: 15px;
border-left: 1px solid gray;
border-right: 1px solid gray;
background-color: white;
}
div.layout > div.center > div.content div.footer {
div.middle div.center div.footer {
/*content 하단라인*/
height: 20px;
border-left: 1px solid gray;
@ -66,3 +74,12 @@ div.layout > div.center > div.content div.footer {
border-bottom: 1px solid gray;
border-radius: 0px 0px 15px 15px;
}
div.bottom {
height: 51px;
margin-top: 10px;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
background-color: #efefef;
background-color: #e8e9ea;
}

View File

@ -1,35 +1,56 @@
div#left_menu {
position: fixed;
margin-top: 10px;
margin-top: 120px;
z-index: 100;
border: 1px solid #e7e7e7;
}
div#left_menu > div#menu_button {
position: absolute;
top: 0px;
right: -20px;
height: 100px;
width: 20px;
cursor: ew-resize;
writing-mode: vertical-rl; /* 세로로 글자를 출력 */
text-orientation: upright; /* 글자가 직립되도록 설정 */
border-radius: 0px 5px 5px 0px;
border: 1px solid silver;
background-color: #eaeaea;
}
div#left_menu > div.accordion {
/* display:none; */
background-color: white;
div#left_menu div#menu_button {
position: absolute;
top: -1px;
right: -21px;
width: 20px;
height: 50px;
height: 180px;
cursor: pointer;
writing-mode: vertical-rl;
/* 세로로 글자를 출력 */
text-orientation: upright;
/* 글자가 직립되도록 설정 */
border-top: 1px solid silver;
border-right: 1px solid silver;
border-bottom: 1px solid silver;
border-radius: 0px 5px 5px 0px;
background-color: #e8e9ea;
}
div#left_menu div.accordion {
display: none;
width: 20px;
}
div#left_menu > div.accordion div.accordion-item:hover {
background-color: #e7e7e7;
div#left_menu div.accordion div.main {
height: 50px;
padding-top: 15px;
padding-left: 10px;
background-color: white;
border-bottom: 1px solid silver;
}
div#left_menu > div.accordion div.accordion-item a {
div#left_menu div.accordion div.accordion-item {
height: 50px;
padding-top: 15px;
background-color: #eeeeee;
border-bottom: 1px solid silver;
}
div#left_menu div.accordion div.accordion-item:hover {
background-color: silver;
}
div#left_menu div.accordion div.accordion-item a {
padding-left: 20px;
}
div#left_menu > div.accordion div.accordion-collapse a {
div#left_menu div.accordion div.accordion-collapse a {
padding-left: 30px;
}
}

View File

@ -4,36 +4,6 @@
* Created : 2016/9/11 Tri-aBility by Junheum,Choi
* Updated :
------------------------------------------------------------ */
function trim(str){
return this.replace(/(^\s*)|(\s*$)/gi, "");
}
//오른쪽에 위 화살표 방향버튼용
/*$(document).ready(function(){
$('body').append('<div id="toTop"><i class="fa fa-angle-double-up fa-4x"></i></div>');
$("#toTop").bind("click", function () {$("body").animate({ scrollTop: 0 }, 200);});
$(window).scroll(function () {
if ($(this).scrollTop() != 0) {
$('#toTop').fadeIn();
} else {
$('#toTop').fadeOut();
}
});
});
//오른쪽에 위 화살표 방향버튼용
//오른쪽에 아래 화살표 방향버튼용
$(document).ready(function(){
$('body').append('<div id="toBottom"><i class="fa fa-angle-double-down fa-4x"></i></div>');
$("#toBottom").bind("click", function () {$("body").animate({ scrollTop: 200000 }, 200);});
$(window).scroll(function () {
if ($(this).scrollTop() != 0) {
$('#toBottom').fadeIn();
} else {
$('#toBottom').fadeIn();
}
});
});*/
//오른쪽에 아래 화살표 방향버튼용
function is_NumericKey(evt,obj){
var charCode = (evt.which) ? evt.which : event.keyCode;

View File

@ -2,7 +2,7 @@ function sideMenuToggle(left_menu) {
$accordion = $("#accordion")[0];
if (accordion.clientWidth == 0){
accordion.style.display = "block";
$("#accordion").css({ "width": '160px' })
$("#accordion").css({ "width": '217px' })
$("#menu_button").html("메뉴닫기");
}
else {