This commit is contained in:
Jaybe
2025-03-05 14:02:29 +09:00
commit 247a7808d3
357 changed files with 161196 additions and 0 deletions
+243
View File
@@ -0,0 +1,243 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 회계 관리 / 세금계산서 요청
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script>
console.log('header')
</script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">세금계산서 요청</h2>
<!-- <p class="title-disc">세금계산서 발행을 경영지원실에 요청하세요~ 나연님, 서진님 고생이 많으십니다.</p> -->
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate1" id="sdate1" value="<?= date("Y-m-d", strtotime('-1 month')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate1" id="edate1" value="<?= date("Y-m-d") ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<select class="form-select" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="input ml15">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 담당자</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 결과</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 구분</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<a href="/accounting/taxList"><button type="button" class="btn btn-outline-danger">업체목록(세금계산서)</button></a>
<a href="#"><button type="button" class="btn btn-outline-danger">글쓰기(세금계산서)</button></a>
<a href="#"><button type="button" class="btn btn-outline-danger">엑셀백업</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:3%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
<col style="width:15%">
<col style="width:10%">
<col style="width:5%">
<col style="">
<col style="width:8%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">발행일자</th>
<th scope="col">작성자</th>
<th scope="col">구분</th>
<th scope="col">사업자명</th>
<th scope="col">사업자등록번호</th>
<th scope="col">대표자명</th>
<th scope="col">내역</th>
<th scope="col">공급가액</th>
<th scope="col">총금액<br>(VAT 포함)</th>
<th scope="col">비고</th>
<th scope="col">결과</th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-0">845</td>
<td>2023-03-13</td>
<td>김혜린</td>
<td>입금완료</td>
<td>우주마켓_MOBON</td>
<td>234-45-12456</td>
<td>이주옥</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td>1,100,000</td>
<td></td>
<td>완료</td>
</tr>
<tr>
<td class="p-0">845</td>
<td>2023-03-13</td>
<td>김혜린</td>
<td>입금완료</td>
<td>우주마켓_MOBON</td>
<td>234-45-12456</td>
<td>이주옥</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td>1,100,000</td>
<td>2/28 재발행 예정</td>
<td>완료</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
setDate('#sdate1, #edate1'); // 범위 날짜 선택기 - 세금계산서
// 범위 날짜 선택기
function setDate(selector) {
$(selector).daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function (start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $(selector.split(',')[0]);
$checkoutInput = $(selector.split(',')[1]);
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+395
View File
@@ -0,0 +1,395 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 세금계산서 요청
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script>
console.log('header')
</script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">세금계산서 요청</h2>
<!-- <p class="title-disc">세금계산서 발행을 경영지원실에 요청하세요~ 나연님, 서진님 고생이 많으십니다.</p> -->
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate1" id="sdate1" value="<?= date("Y-m-d", strtotime('-1 month')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate1" id="edate1" value="<?= date("Y-m-d") ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<select class="form-select" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="input ml15">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<button type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#bizModal">업체등록(세금계산서)</button>
<button type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#taxModal">리스트(세금계산서)</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:15%">
<col style="width:10%">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
<col style="">
<col style="width:12%">
<col style="width:12%">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">사업자명</th>
<th scope="col">사업자등록번호</th>
<th scope="col">대표자명</th>
<th scope="col">업태</th>
<th scope="col">종목</th>
<th scope="col">주소</th>
<th scope="col">메일주소1</th>
<th scope="col">메일주소2</th>
<th scope="col">작성자</th>
<th scope="col">담당자</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
<tr>
<td>우주마켓_MOBON</td>
<td>234-45-12456</td>
<td>김혜린</td>
<td>도소매</td>
<td>화장품</td>
<td>서울특별시 강남구 테헤란로 123길 22, b동 3층(신사동, 케이티타워신사)</td>
<td>b-uwqej@nave.rcom</td>
<td></td>
<td>고영석</td>
<td>고영석</td>
<td>2023-01-23 14:14:34</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<!-- 업체 등록 -->
<div class="modal fade" id="bizModal" tabindex="-1" aria-labelledby="bizModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="bizModalLabel">업체 등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row">사업자명</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">사업자등록번호</th>
<td>
<div class="d-flex">
<input type="text" class="form-control">
<button type="button" class="btn btn-secondary btn-sm">중복확인</button>
</div>
</td>
</tr>
<tr>
<th scope="row">대표자</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">업태</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">종목</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">주소</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">이메일1</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">당당자</th>
<td><input type="text" class="form-control"></td>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-danger btn-sm">이메일 추가</button>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">작성완료</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
<!-- //업체 등록 -->
<!-- 세금계산서 -->
<div class="modal fade" id="taxModal" tabindex="-1" aria-labelledby="taxModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title taxModalLabel" id="taxModalLabel">세금계산서 발행 요청서</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="approval">
<ol class="d-flex">
<li>
<span>담당자</span>
<div></div>
</li>
<li>
<span>경영지원실장</span>
<div></div>
</li>
<li>
<span>사업부대표</span>
<div></div>
</li>
</ol>
</div>
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:25%;">
<col style="width:75%;">
</colgroup>
<tbody>
<tr>
<th scope="row">담당자</th>
<td>
<select class="form-select" aria-label="담당자 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">사업자명</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">사업자 등록번호</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">대표자</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">업태</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">종목</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">주소</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">이메일1</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">이메일2</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">발행일자</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">구분</th>
<td>
<select class="form-select" aria-label="구분 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">내역</th>
<td>
<div class="d-flex align-items-center">
<span class="me-2">1.</span>
<input type="text" class="form-control" placeholder="내역">
<input type="text" class="form-control ms-2 me-2 w-50" placeholder="공급가액">
<input type="text" class="form-control w-50" placeholder="부가세">
</div>
<div class="d-flex justify-content-end mt-2">
<button type="button">- 헹 제거</button>
<button type="button">+ 행 추가</button>
</div>
</td>
</tr>
<tr>
<th scope="row">총금액(VAT포함)</th>
<td>
<div class="d-flex">
<button type="button" class="btn btn-dark btn-sm me-2">자동계산</button>
<input type="text" class="form-control">
</div>
</td>
</tr>
<tr>
<th scope="row">공급가액</th>
<td>
<div class="d-flex">
<button type="button" class="btn btn-dark btn-sm me-2">자동계산</button>
<input type="text" class="form-control">
</div>
</td>
</tr>
<tr>
<th scope="row">비고</th>
<td>
<textarea></textarea>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">작성완료</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
<!-- //세금계산서 -->
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
setDate('#sdate1, #edate1'); // 범위 날짜 선택기 - 세금계산서
// 범위 날짜 선택기
function setDate(selector) {
$(selector).daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function (start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $(selector.split(',')[0]);
$checkoutInput = $(selector.split(',')[1]);
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+222
View File
@@ -0,0 +1,222 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 회계 관리 / 미수금 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script>
console.log('header')
</script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">미수금 관리</h2>
</div>
<div class="row mt-5">
<div class="col half">
<h3 class="content-title">미수금 내역</h3>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<p class="mb-4">* 2019년 9월 1일부터 세부내역 조회가 가능하며, 문의사항이 있을 경우 경영지원실로 문의하시기 바랍니다.</p>
<div class="table-responsive">
<table class="table table-striped table-hover table-default caption-top">
<caption class="text-end">[단위: 원, 부가세포함]</caption>
<colgroup>
<col style="width:10%">
<col>
<col style="width:20%">
<col style="width:17%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">담당자</th>
<th scope="col">업체명</th>
<th scope="col">사업자 번호</th>
<th scope="col">최근 세금계산서</th>
<th scope="col">미수금</th>
</tr>
</thead>
<tbody>
<tr>
<td>김혜린</td>
<td>우주마켓_MOBON</td>
<td>114-02-34856</td>
<td class="text-end">+865일</td>
<td class="text-end">2,345,789</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col half">
<h3 class="content-title">입금 내역</h3>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate1" id="sdate1" value="<?= date("Y-m-d", strtotime('-1 month')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate1" id="edate1" value="<?= date("Y-m-d") ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="regi-wrap">
<form class="search d-flex justify-content-center">
<!-- <input type="text" name="sdate3" id="sdate3" class="form-control">
<button type="button"><i class="bi bi-calendar2-week"></i></button> -->
<div class="d-flex align-items-center justify-content-center">
<label class="d-flex align-items-center justify-content-center wid100">
<input type="text" name="sdate3" id="sdate3" class="form-control data-calendar">
<i class="bi bi-calendar2-week ml5"></i>
</label>
<input type="text" class="form-control" placeholder="광고주">
<input type="text" class="form-control" placeholder="사업자등록번호">
<input type="text" class="form-control" placeholder="입금액">
<input type="text" class="form-control" placeholder="적요/비고">
<button class="btn btn-primary ms-2" type="submit">등록</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:15%">
<col>
<col style="width:20%">
<col style="width:15%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">날짜</th>
<th scope="col">업체명</th>
<th scope="col">사업자 번호</th>
<th scope="col">입금액</th>
<th scope="col">비고</th>
</tr>
</thead>
<tbody>
<tr>
<td>2023-3-24</td>
<td>우주마켓_MOBON</td>
<td>114-02-34856</td>
<td class="text-end">34,4567,324</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
setDate('#sdate1, #edate1'); // 범위 날짜 선택기 - 입금내역
setDateSingle('#sdate3');//단일 날짜 선택기 - 미수금내역
// 범위 날짜 선택기
function setDate(selector) {
$(selector).daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function (start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $(selector.split(',')[0]);
$checkoutInput = $(selector.split(',')[1]);
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
//단일 날짜 선택기
function setDateSingle(selector) {
$(selector).daterangepicker({
singleDatePicker: true, // 단일 날짜 선택기 활성화
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
//maxDate: new Date(),
autoUpdateInput: true,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
});
}
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+382
View File
@@ -0,0 +1,382 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 회계 관리 / 출금요청
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">출금요청</h2>
<!-- <p class="title-disc">출금이 필요한 거래처를 경영지원실에 요청하세요~ 나연님, 서진님 고생이 많으십니다.</p> -->
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate" id="sdate" value="<?= date("Y-m-d", strtotime('-1 year +1 day')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate" id="edate" value="<?= date("Y-m-d") ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<select class="form-select" id="stx_opt" name="stx_opt" aria-label="선택">
<option value="" selected>-선택-</option>
<option value="company">거래처명</option>
<option value="detail">내역</option>
</select>
<div class="input ml15">
<input class="" id="stx" name="stx" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
<input type="hidden" id="userid" name="userid"/>
<input type="hidden" id="type" name="type"/>
<input type="hidden" id="complete" name="complete"/>
</form>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 담당자</h3>
<div class="row" id="nickname_row" name="nickname_row"></div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 결과</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" onclick="setVal(1,'complete')">완료</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" onclick="setVal(0,'complete')">진행중</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 구분</h3>
<div class="row" id="type_row" name="type_row"></div>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<a href="/accounting/withdrawList"><button type="button" class="btn btn-outline-danger">업체목록(출금요청)</button></a>
<a href="#"><button type="button" class="btn btn-outline-danger">글쓰기(출금요청)</button></a>
<button type="button" onclick="excel()" class="btn btn-outline-danger">엑셀백업</button>
</div>
<div class="table-responsive" id="withdrawTable">
<table class="table table-striped table-hover table-default withdrawListTable">
<!-- <colgroup>
<col style="width:3%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
<col style="width:10%">
<col style="width:8%">
<col style="width:10%">
<col style="">
<col style="width:10%">
<col style="">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
</colgroup> -->
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">작성일</th>
<th scope="col">작성자</th>
<th scope="col">구분</th>
<th scope="col">거래처명(예금주명)</th>
<th scope="col">은행</th>
<th scope="col">계좌번호</th>
<th scope="col">내역(자세히)</th>
<th scope="col">총금액(VAT 포함)</th>
<th scope="col">비고</th>
<th scope="col">결제현황</th>
<th scope="col">결과</th>
<th scope="col">출금완료일</th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-0">845</td>
<td>2023-03-13 18:34:39</td>
<td>김혜린</td>
<td>광고비</td>
<td>우주마켓_MOBON</td>
<td>국민은행</td>
<td>174892038457684</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td></td>
<td>진행중</td>
<td>진행중</td>
<td></td>
</tr>
<tr>
<td>845</td>
<td>2023-03-13 18:34:39</td>
<td>김혜린</td>
<td>광고비</td>
<td>우주마켓_MOBON</td>
<td>국민은행</td>
<td>174892038457684</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td></td>
<td class="text-primary">완료</td>
<td>완료</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
$(document).ready(function() {
typeList();
userList();
getList();
});
setDate('#sdate, #edate'); // 범위 날짜 선택기 - 출금요청
// 범위 날짜 선택기
function setDate(selector) {
$(selector).daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function (start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $(selector.split(',')[0]);
$checkoutInput = $(selector.split(',')[1]);
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
$(".btn-primary").click(function(e) {
e.preventDefault();
logTable.ajax.reload();//getList();
});
// 조회 버튼
$('form[name="search"]').bind('submit', function(e) {
e.preventDefault();
logTable.ajax.reload();//getList();
});
// datatable getList
function getList(){
logTable = $('#withdrawTable .withdrawListTable').DataTable({
"dom": '<t>p',
"destroy": true,
"autoWidth": true,
"responsive": true,
"processing": true,
"paging": true,
"info": false,
"language": {"url": '/static/js/dataTables.i18n.json'},
"ajax": {
"url": "<?=base_url()?>accounting/withdraw/getlist",
"type": "POST",
"data": function(d) {
let searchData = $(".search").serializeArray();
$.each(searchData, function(index, item) {
d[item.name] = item.value; // d[name] = value (데이터 이름 = 데이터 값)
});
console.log('서버로 보내는 데이터:', d); // 서버로 보내는 데이터 로깅
return d;
},
"dataType": "json",
"dataSrc": function (json) {
console.log(json);
return json; // 또는 json.data 등 실제 데이터 배열을 반환
}
},
columns: [
{ "data": "seq", "width":"7%", "className": "dt-type-center" }, //번호
{ "data": "reg_date", "width":"15%", "className": "dt-type-center" }, //작성일
{ "data": "nickname", "width":"10%", "className": "dt-type-center" }, //작성자
{ "data": "type", "width":"10%", "className": "dt-type-center" },//구분
{ "data": "company_name", "width":"15%", "className": "dt-type-center" },//거래처명 (예금주명)
{ "data": "bank", "width":"15%", "className": "dt-type-center" },//은행명
{ "data": "account", "width":"30%", "className": "dt-type-center" },//계좌번호
{ "data": "detail", "width":"50%", "className": "dt-type-center" },//내역(자세히)
{ "data": "total_price", "width":"15%", "className": "dt-type-center",
"render": function (data, type, row) {
return Number(row.total_price).toLocaleString('ko-KR');
}
},//총금액(vat포함)
{ "data": "memo", "width":"10%", "className": "dt-type-center" },//비고
{ "data": "gwstatus",
"width":"10%",
"className": "dt-type-center",
"render": function (data, type, row) {
if (row.status === '완료' && row.gwstatus && row.gwstatus.startsWith('http')) {
return '<a href="' + row.gwstatus + '" target="_gw" class="text-primary" onclick="window.open(this.href, \'NeosMain\', \'width=750,height=900,left=50,top=50,scrollbars=1,resizable=1\'); return false;" class="gw_status gw_status_90" title="' + row.title + '">완료</a>';
} else {
return '진행중';
}
}
},//결제현황 gwstatus
{ "data": "status", "width":"10%", "className": "dt-type-center" },//결과
{ "data": "date", "width":"15%", "className": "dt-type-center" }//출금완료일
],
language: {
url: "//cdn.datatables.net/plug-ins/1.10.24/i18n/Korean.json"
}
});
}
function typeList(){
$.ajax({
url: "<?=base_url()?>accounting/withdraw/typelist",
type: "GET",
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data) {
let $container = $('#type_row');
let i=0;
$.each(data, function() {
let $colDiv = $('<div class="col"></div>');
let $innerDiv = $('<div class="inner"></div>');
let $button = $('<button type="button" onclick=setVal("'+data[i]['type']+'","type") value="'+data[i]['type']+'"></button>').text(data[i]['type']);
$innerDiv.append($button);
$colDiv.append($innerDiv);
$container.append($colDiv);
i++;
});
}
});
}
function userList(){
$.ajax({
url: "<?=base_url()?>accounting/withdraw/userlist",
type: "GET",
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data) {
let $container = $('#nickname_row');
let i=0;
$.each(data, function() {
let $colDiv = $('<div class="col"></div>');
let $innerDiv = $('<div class="inner"></div>');
let $button = $('<button type="button" onclick=setVal("'+data[i]['id']+'","userid")></button>').text(data[i]['nickname']);
$innerDiv.append($button);
$colDiv.append($innerDiv);
$container.append($colDiv);
i++;
});
}
});
}
function setVal(val,id){
$("#"+id).val(val);
logTable.ajax.reload();//getList();
}
$('body').on('click', '.client-list button', function() {
$(this).toggleClass('active');
logTable.ajax.reload();//getList();
});
function excel(){
var data = $(".search").serialize();
$.ajax({
url: "<?=base_url()?>accounting/withdraw/excel",
type: "POST",
data:data,
contentType: 'application/json; charset=utf-8',
xhrFields: {
responseType: 'blob' // 바이너리 데이터로 응답 받기
},
success: function(response, status, xhr) {
const contentType = xhr.getResponseHeader('Content-Type');
if (contentType && contentType.indexOf('application/json') !== -1) {
// 응답이 JSON인 경우
if(response.status == 'error') {
alert(response.message);
}
} else {
// 응답이 Blob인 경우
const blob = new Blob([response], { type: contentType });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `출금요청_<?=date('Y-m-d_H-i-s')?>.xlsx`;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
}
},
error: function(xhr, status, error) {
console.log(xhr, status, error)
alert(xhr, status, error);
}
});
}
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
@@ -0,0 +1,221 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 회계 관리 / 출금요청
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script>
console.log('header')
</script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">출금요청 - 업체목록</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<input type="hidden" id="userid" name="userid">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate" id="sdate" value="<?= date("Y-m-d", strtotime('-1 month')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate" id="edate" value="<?= date("Y-m-d") ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<select class="form-select" id="stx_opt" name="stx_opt" aria-label="선택">
<option value="" selected>-선택-</option>
<option value="company">-거래처명</option>
<option value="no">계좌번호</option>
</select>
<div class="input ml15">
<input class="" type="text" id="stx" name="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 담당자</h3>
<div class="row" id="nickname_row" name="nickname_row"></div>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<button type="button" class="btn btn-danger">업체등록(출금요청)</button>
<button type="button" class="btn btn-danger" onclick="location.href='<?=base_url()?>accounting/withdraw/'">리스트(출금요청)</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default table-sm">
<colgroup>
<col style="">
<col style="width:8%">
<col style="width:15%">
<col style="width:5%">
<col style="width:15%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">거래처명(예금주명)</th>
<th scope="col">은행</th>
<th scope="col">계좌번호</th>
<th scope="col">작성자</th>
<th scope="col">작성일</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>(주)당금페이_상상의원3_21783</td>
<td>기업은행</td>
<td>0492173819374</td>
<td>윤재진</td>
<td>2023-03-02 :11:34:23</td>
<td>
<button type="button" class="btn btn-dark btn-sm">DEL</button>
</td>
</tr>
<tr>
<td>(주)당금페이_상상의원3_21783</td>
<td>기업은행</td>
<td>0492173819374</td>
<td>윤재진</td>
<td>2023-03-02 :11:34:23</td>
<td>
<button type="button" class="btn btn-dark btn-sm">DEL</button>
</td>
</tr>
<tr>
<td>(주)당금페이_상상의원3_21783</td>
<td>기업은행</td>
<td>0492173819374</td>
<td>윤재진</td>
<td>2023-03-02 :11:34:23</td>
<td>
<button type="button" class="btn btn-dark btn-sm">DEL</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
$(document).ready(function() {
userList();
accountList();
});
setDate('#sdate, #edate'); // 범위 날짜 선택기 - 출금요청
// 범위 날짜 선택기
function setDate(selector) {
$(selector).daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function (start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $(selector.split(',')[0]);
$checkoutInput = $(selector.split(',')[1]);
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
function userList(){
$.ajax({
url: "<?=base_url()?>accounting/withdraw/userlist",
type: "GET",
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data) {
let $container = $('#nickname_row');
let i=0;
$.each(data, function() {
let $colDiv = $('<div class="col"></div>');
let $innerDiv = $('<div class="inner"></div>');
let $button = $('<button type="button" onclick=setVal("'+data[i]['id']+'","userid")></button>').text(data[i]['nickname']);
$innerDiv.append($button);
$colDiv.append($innerDiv);
$container.append($colDiv);
i++;
});
}
});
}
function accountList(){
var data=$(".search").serialize();
$.ajax({
url: "<?=base_url()?>accounting/withdrawList/accountlist",
type: "POST",
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data) {
console.log(data);
}
});
}
function setVal(val,id){
$("#"+id).val(val);
getList();
}
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
@@ -0,0 +1,76 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 회계 관리 / 출금요청
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script>
console.log('header')
</script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">출금요청 - 업체등록(출금요청)</h2>
</div>
<div>
<div class="section">
샘플
</div>
<div class="section">
<form class="search d-flex justify-content-center">
<select required class=''>
<option value=''>-선택-</option>
<option value='BOA은행'> BOA은행</option>
<option value='SC제일은행'>SC제일은행</option>
<option value='KDB산업은행'>KDB산업은행</option>
<option value='경남은행'></option>
<option value='광주은행'>광주은행</option>
<option value='국민은행'>국민은행</option>
<option value='굿모닝신한증권'>굿모닝신한증권</option>
<option value='기업은행'>기업은행</option>
<option value='농협'>농협</option>
<option value='부산은행'>부산은행</option>
<option value='상호신용금고'>상호신용금고</option>
<option value='새마을금고'>새마을금고</option>
<option value='수협중앙회'>수협중앙회</option>
<option value='신한은행'>신한은행</option>
<option value='신한금융투자증권'>신한금융투자증권</option>
<option value='신협중앙회'>신협중앙회</option>
<option value='외환은행'>외환은행</option>
<option value='우리은행'>우리은행</option>
<option value='우체국'>우체국</option>
<option value='전북은행'>전북은행</option>
<option value='제주은행'>제주은행</option>
<option value='카카오뱅크'>카카오뱅크</option>
<option value='케이뱅크'>케이뱅크</option>
<option value='토스뱅크'>토스뱅크</option>
<option value='하나은행'>하나은행</option>
<option value='한국씨티은행'>한국씨티은행</option>
</select>
</form>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
$(document).ready(function() {
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+536
View File
@@ -0,0 +1,536 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 광고 관리 / 기타
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.html5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.colVis.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore/js/dataTables.stateRestore.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.min.js"></script>
<script src="/static/node_modules/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<!-- bootstrap5 -->
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-keytable-bs5/css/keyTable.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore-bs5/js/stateRestore.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedcolumns-bs5/js/fixedColumns.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-keytable-bs5/js/keyTable.bootstrap5.min.js"></script>
<script src="/static/js/jquery.number.min.js"></script>
<script src="/static/node_modules/jszip/dist/jszip.min.js"></script>
<script src="/static/js/pdfmake/pdfmake.min.js"></script>
<script src="/static/js/pdfmake/vfs_fonts.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap etc-contents-wrap">
<div class="title-area">
<h2 class="page-title">기타 광고관리</h2>
<p class="title-disc">여러 매체의 광고를 확인 하세요~</p>
</div>
<div class="search-wrap type-single">
<form name="search-form" autocomplete='off' class="search d-flex justify-content-center">
<div class="term term-small d-flex align-items-center">
<input type="hidden" name="sdate" id="sdate"><input type="hidden" name="edate" id="edate">
<label><input type="text" name="dates" id="dates" data="daterangepicker" autocomplete="off" aria-autocomplete="none"><i class="bi bi-calendar2-week"></i></label>
</div>
<div class="input">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="section client-list media_name">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매체</h3>
<div class="row" id="media-list"></div>
</div>
<div class="section client-list advertiser_name">
<h3 class="content-title toggle folded"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row" id="advertiser-list"></div>
</div>
<div class="section client-list event_seq">
<h3 class="content-title toggle folded"><i class="bi bi-chevron-up"></i> 이벤트 번호</h3>
<div class="row" id="event-list"></div>
</div>
<div class="section client-list description">
<h3 class="content-title toggle folded"><i class="bi bi-chevron-up"></i> 이벤트 구분</h3>
<div class="row" id="description-list"></div>
</div>
<div class="section">
<div class="table-responsive">
<div id="latestUpdateTime" class="latestUpdateTime"></div>
<table class="dataTable table table-default">
<thead class="table-dark">
<tr>
<th scope="col" rowspan="2">날짜</th>
<th scope="col" rowspan="2">이벤트</th>
<th scope="col" rowspan="2">site</th>
<th scope="col" rowspan="2">광고주</th>
<th scope="col" rowspan="2">매체</th>
<th scope="col" rowspan="2">목표수량</th>
<th scope="col" rowspan="2">이벤트 구분</th>
<th scope="col" colspan="3">DB 수량</th>
<th scope="col" rowspan="2">정산DB단가</th>
<th scope="col" rowspan="2">소진금액<br>(vat별도)</th>
<th scope="col" rowspan="2">현재DB단가</th>
<th scope="col" rowspan="2">수익</th>
<th scope="col" rowspan="2">수익률</th>
<th scope="col" rowspan="2">확인</th>
</tr>
<tr>
<th scope="col">전체</th>
<th scope="col">유효</th>
<th scope="col" class="r-border">무효</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<!--엑셀 업로드 폼
<form action="<?= base_url('AdvEtcManager/uploadExcel') ?>" method="post" enctype="multipart/form-data" class="d-flex align-items-center">
<input type="file" class="form-control" id="fileUpload" name="fileUpload" accept=".csv" style="display: none;" onchange="document.getElementById('uploadForm').submit();">
<button type="button" class="btn btn-secondary d-flex align-items-center" onclick="document.getElementById('fileUpload').click();">
<i class="bi bi-filetype-csv fs-5 me-1"></i>파일 선택
</button>
</form>
-->
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
$('#sdate, #dates').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
$('#edate').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
let dataTable = $('.dataTable').DataTable({
"dom": '<fr<t>>', // DataTables의 DOM 구조 설정
"fixedHeader": {
"header" : true, // 헤더 고정
"footer" : true, // 푸터 고정
},
"fixedColumns": {
"leftColumns": 3 // 왼쪽에서 세 열 고정
},
"autoWidth": true, // 자동 너비 조정 활성화
"processing" : true, // 처리 중 표시 활성화
"serverSide" : false, // 서버 사이드 처리 비활성화
"responsive": true, // 반응형 테이블 활성화
"searching": true, // 검색 기능 활성화
"ordering": true, // 정렬 기능 활성화
"orderMulti": true, // 다중 열 정렬 활성화
"orderCellsTop": true, // 열 헤더 클릭 시 정렬 활성화
"colOrder": true, // 열 순서 조정 활성화
"paging": false, // 페이징 비활성화
"info": false, // 정보 표시 비활성화
"scroller": false, // 스크롤러 비활성화
"scrollX": true, // 가로 스크롤 활성화
"stateSave": true, // 상태 저장 활성화
"deferRender": false, // 렌더링 지연 비활성화
"ajax": {
"url": "<?= base_url('etcmanager/get-list') ?>", // AJAX URL 설정
"type": "POST", // HTTP 요청 방식 설정
"data": function(d) {
d.date = {
sdate: $('#sdate').val(), // 시작 날짜
edate: $('#edate').val() // 종료 날짜
};
}
},
"columnDefs": [
{ "className": "dt-type-center", "targets": [0, 1, 2, 7, 8, 9, 12, 13, 14, 15] } // 특정 열 가운데 정렬
],
"columns": [
{ "data": "date", "width": "10%" }, //날짜
{ "data": "event_seq", "width": "5%" }, //이벤트
{ "data": "site", "width": "5%" }, //site
{ "data": "advertiser_name", "width": "10%" }, //광고주
{ "data": "media_name", "width": "5%" }, //매체
{ "data": "goal", "width": "3%", "class": "dt-type-center", "render": function(data, type) { //목표수량
if($('#sdate').val() != $('#edate').val()) return '-';
return type === 'display' ? `<div class="mw10"><input type='text' class='form-control form-control-sm' name='goal' value='${data}'></div>` : data;
}},
{ "data": "description", "width": "10%", "class": "dt-type-center", "render": function(data, type) { //이벤트구분
return type === 'display' ? `<div class="mw10">${data}</div>` : data;
}},
{ "data": "db_total", "width": "4%" }, //총DB
{ "data": "db_unique", "width": "4%" }, //유효DB
{ "data": "db_invalid", "width": "4%" }, //무효DB
{ "data": "unitprice", "width": "6%", "class": "dt-type-center", "render": function(data, type) { //정산DB단가
if($('#sdate').val() != $('#edate').val()) return '-';
return type === 'display' ? `<div class="mw10"><input type='text' class='form-control form-control-sm' name='unitprice' value='${parseInt(data).toLocaleString()}'></div>` : data;
}},
{ "data": "total_price", "width": "6%", "class": "dt-type-center", "render": function(data, type) { //소진금액
if($('#sdate').val() != $('#edate').val()) return '-';
return type === 'display' ? `<div class="mw10"><input type='text' class='form-control form-control-sm' name='total_price' value='${parseInt(data).toLocaleString()}'></div>` : data;
}},
{ "data": "now_unitprice", "width": "5%", "class": "dt-type-center", "render": function(data, type) { //현재DB단가
if($('#sdate').val() != $('#edate').val()) return '-';
var className = parseInt(data) < 0 ? 'text-danger' : '';
return type === 'display' ? `<span class="${className}">${parseInt(data).toLocaleString()}원</span>` : data;
}},
{ "data": "profit", "width": "6%", "class": "dt-type-center", "render": function(data, type) { //수익
if($('#sdate').val() != $('#edate').val()) return '-';
var className = parseInt(data) < 0 ? 'text-danger' : '';
return type === 'display' ? `<span class="${className}">${parseInt(data).toLocaleString()}원</span>` : data;
}},
{ "data": "profit_rate", "width": "4%", "class": "dt-type-center", "render": function(data, type) { //수익률
if($('#sdate').val() != $('#edate').val()) return '-';
var className = parseFloat(data) < 0 ? 'text-danger' : '';
return type === 'display' ? `<span class="${className}">${data}%</span>` : data;
}},
{ "data": "confirm", "width": "3%", "class": "dt-type-center", "render": function(data, type) { //확인
if($('#sdate').val() != $('#edate').val()) return '-';
return type === 'display' ? `<div class="d-flex justify-content-center"><div class="form-check form-switch"><input class="form-check-input form-switch-dark" type="checkbox" role="switch" name="confirm" style="width: 40px; height: 20px;" ${data == 1 ? 'checked' : ''}></div></div>` : data;
}}
],
"rowCallback": function(row, data) {
// 체크박스와 텍스트 입력 필드의 변경을 감지합니다.
$(row).find('input[type="checkbox"], input[type="text"]').off('change').on('change', function() {
var $row = $(this).closest('tr');
var rowData = dataTable.row($row).data();
var inputName = $(this).attr('name');
var newValue = $(this).attr('type') === 'checkbox' ? $(this).is(':checked') ? 1 : 0 : $(this).val();
// 변경된 값과 기본 키 값들만 포함하여 서버에 전송합니다.
var postData = {
date: rowData.date,
event_seq: rowData.event_seq,
site: rowData.site
};
postData[inputName] = newValue;
// 변경된 postData를 서버에 전송합니다.
$.ajax({
url: '<?= base_url('etcmanager/update-data') ?>',
type: 'POST',
data: postData,
success: function(response) {
// 성공적으로 데이터를 업데이트했을 때의 처리 로직
dataTable.ajax.reload();
console.log('Update successful', response);
},
error: function(xhr, status, error) {
// 데이터 업데이트에 실패했을 때의 처리 로직
console.error('Update failed', error);
}
});
});
// confirm 값이 1이면 행의 배경색을 회색으로 설정
if (data.confirm == 1) {
$(row).find('td').css('background-color', '#e9ecef');
}
},
"drawCallback": function(settings) {
var api = this.api();
var data = api.rows({page:'current'}).data();
var latestDateTime = '데이터 없음';
if (data.length > 0) {
latestDateTime = data.reduce((latest, item) => {
return new Date(latest.reg_date) > new Date(item.reg_date) ? latest : item;
}).reg_date;
if(latestDateTime === null) latestDateTime = '데이터 없음';
}
// 최신 datetime을 페이지 상단에 표시
$('#latestUpdateTime').text('업데이트 시간 : ' + latestDateTime);
var idx = {
totalDB: 7,
uniqueDB: 8,
invalidDB: 9,
setDbPrice: 10,
costPrice: 11,
dbPrice: 12,
profitPrice: 13,
profitRate: 14
};
var totalDB = api.column(idx['totalDB'], {page: 'current'}).data().reduce(function(a, b) { return parseInt(a) + parseInt(b); }, 0);
var uniqueDB = api.column(idx['uniqueDB'], {page: 'current'}).data().reduce(function(a, b) { return parseInt(a) + parseInt(b); }, 0);
var invalidDB = api.column(idx['invalidDB'], {page: 'current'}).data().reduce(function(a, b) { return parseInt(a) + parseInt(b); }, 0);
var setDbPrice = api.column(idx['setDbPrice'], {page: 'current'}).data().reduce(function(a, b) { return parseInt(a) + parseInt(b); }, 0);
var costPrice = api.column(idx['costPrice'], {page: 'current'}).data().reduce(function(a, b) { return parseInt(a) + parseInt(b); }, 0);
var dbPrice = Math.round(costPrice / uniqueDB); //현재 DB단가 = 지출액 / 유효DB
// var salePrice = ; //매출 = 각 정산DB단가 * 각 유효DB
var salePrice = api.column(idx['setDbPrice'], {page: 'current'}).data().reduce(function(a, b, i) {
var uniqueDB = api.column(idx['uniqueDB'], {page: 'current'}).data()[i];
return b > 0 ? a + (b * uniqueDB) : a;
}, 0);
var profitPrice = api.column(idx['profitPrice'], {page: 'current'}).data().reduce(function(a, b) { return parseInt(a) + parseInt(b); }, 0); //수익 = 매출 - 지출
var profitRate = (profitPrice/salePrice)*100; //수익률 = (수익/매출)*100
if (isNaN(profitRate)) profitRate = 0; // NaN인 경우 0으로 설정
var total = {
totalDB: totalDB,
uniqueDB: uniqueDB,
invalidDB: invalidDB,
costPrice: costPrice.toLocaleString() + '원',
dbPrice: dbPrice.toLocaleString() + '원', //현재 DB단가 = costPrice / uniqueDB
profitPrice: profitPrice.toLocaleString() + '원', //수익 = (DB단가-(소진금액/유효DB))*유효DB
profitRate: profitRate.toFixed(1) + '%' //수익률 = (수익/매출)*100
};
if($('#sdate').val() != $('#edate').val()) {
total.costPrice = '-';
total.dbPrice = '-';
total.profitPrice = '-';
total.profitRate = '-';
}
$("table.dataTable thead tr.sum-row").remove();
var newRow = '<tr class="sum-row">' +
'<th colspan="7">합계</th>' +
'<th>' + total.totalDB + '</th>' +
'<th>' + total.uniqueDB + '</th>' +
'<th>' + total.invalidDB + '</th>' +
'<th></th>' +
'<th>' + total.costPrice + '</th>' +
'<th>' + total.dbPrice + '</th>' +
'<th>' + total.profitPrice + '</th>' +
'<th>' + total.profitRate + '</th>' +
'<th></th>' + // 확인 열은 비워둠
'</tr>';
$(".dt-scroll-head table.dataTable thead").append(newRow);
updateFilterButtons.call(this);
},
"initComplete": function(settings, data) {
// foldedStates 복원
if (settings.oInit.foldedStates) {
$('.client-list > .content-title').each(function(index) {
if (settings.oInit.foldedStates[index]) {
$(this).addClass('folded');
} else {
$(this).removeClass('folded');
}
});
}
updateFilterButtons.call(this);
},
"language": {
"url": '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"stateSaveParams": function(settings, data) {
// folded 상태 저장
data.foldedStates = settings.oInit.foldedStates;
},
"stateLoadParams": function(settings, data) {
if (data.foldedStates) {
settings.oInit.foldedStates = data.foldedStates;
}
},
}).on('xhr.dt', function( e, settings, data, xhr ) {
if(data && data.data) {
var data = data.data;
const unique = (prop) => [...new Set(data.map(item => item[prop]))];
setFilter('media_name', unique('media_name'));
setFilter('advertiser_name', unique('advertiser_name'));
setFilter('event_seq', unique('event_seq'));
setFilter('description', unique('description'));
// $('.media_btn[value="토스"]').click();
}
});
function updateFilterButtons() {
var api = this.api(); // DataTables API 인스턴스를 가져옵니다.
var data = api.rows({ search: 'applied' }).data().toArray(); // 현재 페이지의 데이터를 배열로 변환합니다.
let uniqueValues = { advertiser_name: [], media_name: [], event_seq: [], description: [] }; // 고유 값 저장을 위한 객체 초기화
var columnToListMap = {
'event_seq': 'event-list',
'advertiser_name': 'advertiser-list',
'media_name': 'media-list',
'description': 'description-list'
};
// 필터링 상태에 따라 버튼에 active 클래스 적용
dataTable.columns().every(function() {
var column = this;
var search = column.search();
if (search) {
var searchRegex = new RegExp(search.replace(/\\/g, ''));
var expectedListId = columnToListMap[column.dataSrc()];
$('.filter_btn').each(function() {
var btnValue = $.trim($(this).text());
var parentListId = $(this).closest('.row').attr('id');
// DOM에 해당 id가 존재하는지 확인
if (parentListId && $('#' + parentListId).length > 0) {
if (searchRegex.test(btnValue) && parentListId === expectedListId) {
$(this).addClass('active');
}
}
});
}
});
// 각 행의 데이터를 순회하면서 고유 값 배열에 추가합니다.
data.forEach(row => {
['advertiser_name', 'media_name', 'event_seq', 'description'].forEach(key => {
if (!uniqueValues[key].includes(row[key])) { // 배열에 정확히 일치하는 값이 없으면 추가
uniqueValues[key].push(row[key]);
}
});
});
// 활성화된 필터 버튼이 없는 경우, 모든 필터 버튼의 'on' 클래스를 제거하고 함수를 종료합니다.
if (!$('.filter_btn.active').length) {
$('.filter_btn').removeClass('on');
return;
}
// 각 필터 유형에 대해 'on' 클래스를 토글합니다.
Object.keys(uniqueValues).forEach(key => {
let name = key.replace(/_(name|seq)/, '');
let $list = $(`#${name}-list`);
if ($list.length) { // 요소가 존재하는지 확인
$list.find('.filter_btn').not('.active').each(function() {
var btnText = $(this).text().trim();
var isExactMatch = uniqueValues[key].some(function(value) { // 완전 일치 여부를 확인합니다.
return value === btnText;
});
$(this).toggleClass('on', isExactMatch); // 'on' 클래스를 토글합니다.
});
}
});
}
$(document).on('click', '.filter_btn', function() {
$(this).toggleClass('active'); // 버튼 활성화/비활성화 토글
// 모든 열의 검색을 초기화
dataTable.columns().search('');
// 각 컬럼별로 활성화된 버튼의 텍스트를 배열로 수집하고 정규 표현식으로 조합
dataTable.columns().every(function() {
var column = this;
var filterType = column.dataSrc(); // 컬럼 헤더를 기반으로 필터 타입 결정
var activeFilters = $(`.filter_btn.active[data-btn="${filterType}"]`).map(function() {
return $.fn.dataTable.util.escapeRegex($(this).val());
}).get();
if (activeFilters.length) {
var regex = `^(${activeFilters.join('|')})$`; // '값1|값2|값3' 형태로 조합
column.search(regex, true, false); // 정규 표현식 검색 활성화
} else {
column.search(''); // 필터가 없는 경우 검색 초기화
}
});
dataTable.draw(); // 필터링 후 테이블 업데이트
});
function setFilter(type, data) {
let $row = $(`.${type} .row`);
$(`.${type}`).find('.zenith-loading').fadeOut(function(){$(this).remove();});
let existingIds = $row.find('.filter_btn').map(function() { return $(this).val(); }).get();
let html = data.filter(v => v && typeof v === 'string' && v.trim() !== '') // 빈 값과 undefined/null 제외
.map(v => `
<div class="col">
<div class="inner">
<button type="button" value="${v}" data-btn="${type}" class="${type}_btn filter_btn">
<span class="account_name">${v}</span>
</button>
</div>
</div>
`).join('');
$row.html('').append(html);
//정렬
let buttons = $row.find('.filter_btn').toArray();
buttons.sort((a, b) => $(a).find('.account_name').text().localeCompare($(b).find('.account_name').text(), 'en', { sensitivity: 'base' }));
buttons.forEach(button => $row.append(button.parentNode.parentNode));
}
$('#search_btn').on('click', function(e) {
e.preventDefault(); // 폼 제출 방지
dataTable.ajax.reload(); // DataTables의 AJAX 요청을 다시 실행
});
$('#dates').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
오늘: [moment(), moment()],
어제: [moment().subtract(1, "days"), moment().subtract(1, "days")],
최근7일: [moment().subtract(7, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
최근14일: [moment().subtract(14, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
이번주: [moment().day(1), moment()],
지난주: [moment().add(-1, "week").startOf("week").day(1), moment().add(-1, "week").startOf("week").add(7, "day")],
이번달: [moment().startOf("month"), moment().endOf("month")],
지난달: [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")],
한달전: [moment().subtract(1, "month"), moment()],
},
}, function(start, end, label) {
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$sdateInput = $('#sdate');
$edateInput = $('#edate');
$sdateInput.val(startDate);
$edateInput.val(endDate);
var dates = `${startDate} ~ ${endDate}`;
if(startDate == endDate) dates = startDate;
$('#dates').val(dates);
});
$(document).on('focus', 'input[name="unitprice"], input[name="total_price"]', function() {
var value = $(this).val();
$(this).val(value.replace(/,/g, ''));
});
$(document).on('blur', 'input[name="unitprice"], input[name="total_price"]', function() {
var value = parseInt($(this).val());
if (!isNaN(value)) {
$(this).val(value.toLocaleString());
}
});
$(document).on('input', 'input[type="text"]', function() {
$(this).val($(this).val().replace(/[^0-9]/g, ''));
});
// content-title 클릭 시 folded 상태 토글 및 저장
$(document).on('click', '.client-list > .content-title', function() {
// DataTables 상태 저장
let settings = dataTable.settings();
settings[0].oInit.foldedStates = [];
$('.client-list > .content-title').each(function() {
settings[0].oInit.foldedStates.push($(this).hasClass('folded'));
});
// DataTable 상태 저장
dataTable.state.save();
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
@@ -0,0 +1,951 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 광고 관리 / 페이스북
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/node_modules/datatables.net-dt/css/jquery.dataTables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/jquery.dataTables.js"></script>
<style>
.inner button.disapproval::after{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 3px;
content: "";
background: #ce1922;
}
.inner button.tag-inactive{
opacity: 0.5;
}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">페이스북 광고관리</h2>
<p class="title-disc">숫자 중심의 퍼포먼스 마케팅에 집중! 사람들이 어떤 콘텐츠에 반응하는가? 비용 대비 얼만큼의 성과가 있는가?</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text" name="sdate" id="sdate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text" name="edate" id="edate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="button">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭률</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<div class="client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-down"></i> 비즈니스 계정</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" class="filter_btn" id="business_btn" value="316991668497111">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="filter_btn" id="business_btn" value="2859468974281473">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="filter_btn" id="business_btn" value="213123902836946">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-down"></i> 광고주</h3>
<div class="row">
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" id="tab-list" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link tab-link active" value="campaigns" type="button" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="adsets" type="button" role="tab" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" aria-controls="set-tab-pane" aria-selected="false">광고 세트</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="ads" type="button" role="tab" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" aria-controls="advertisement-tab-pane" aria-selected="false">광고</button>
</li>
</ul>
<div class="tab-content">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="campaigns-table">
<colgroup>
<col style="width:10%">
<col style="width:5.5%">
<col style="width:5%">
<col style="width:5%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">예산 <br>ai</th>
<th scope="col">목표 <br>ai</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td></td>
<td id="total-budget"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-click"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="adsets-table">
<colgroup>
<col style="width:10%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">광고세트명</th>
<th scope="col">상태</th>
<th scope="col">예산 <br>ai</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td id="total-budget"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-click"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" role="tabpanel" id="advertisement-tab-pane" aria-labelledby="advertisement-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="ads-table">
<colgroup>
<col style="width:10%">
<col style="width:5.5%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">광고명</th>
<th scope="col">상태</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-click"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
var today = moment().format('YYYY-MM-DD');
var args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
};
args.type = 'campaigns';
setDate();
getReport(args);
getAccount(args);
getCampaigns(args);
function getReport(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/facebook/report",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#impressions_sum').text(data.impressions_sum);
$('#clicks_sum').text(data.clicks_sum);
$('#click_ratio_sum').text(data.click_ratio_sum);
$('#spend_sum').text(data.spend_sum);
$('#unique_total_sum').text(data.unique_total_sum);
$('#unique_one_price_sum').text(data.unique_one_price_sum);
$('#conversion_ratio_sum').text(data.conversion_ratio_sum);
$('#per_sum').text(data.per_sum);
$('#price_01_sum').text(data.price_sum);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function getAccount(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/facebook/accounts",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('.advertiser .row').empty();
var html = '';
var set_ratio = '';
$.each(data, function(idx, v) {
c = v.class;
c = c.join(' ');
if(v.db_count){
set_ratio = '<div class="progress"><div class="progress-bar" role="progressbar" style="width:'+v.db_ratio+'%"></div><div class="txt">'+v.db_sum+'/'+v.db_count+'</div></div>';
}
html += '<div class="col"><div class="inner"><button type="button" value="'+v.ad_account_id+'" id="account_btn" class="filter_btn '+c+'">'+v.name+set_ratio+'</button></div></div>';
});
$('.advertiser .row').html(html);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setDataTable(tableId, columns, args){
$(tableId).DataTable({
"processing" : true,
"searching": false,
"ordering": true,
"bLengthChange" : false,
"bDestroy": true,
"paging": false,
"info": false,
"ajax": {
"url": "<?=base_url()?>/advertisements/facebook/data",
"data": args,
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
if(res.total.margin < 0){
$(tableId+' #total-margin').css('color', 'red');
}
if(res.total.avg_margin_ratio < 20 && res.total.avg_margin_ratio != 0){
$(tableId+' #avg_margin_ratio').css('color', 'red');
}
$(tableId+' #total-count').text(res.data.length+"건 결과");
$(tableId+' #avg-cpa').text(Math.round(res.total.avg_cpa).toLocaleString('ko-KR'));
if(tableId == '#campaigns-table'){
$(tableId+' #total-unique_total').html('<div>'+res.total.unique_total+'</div><div style="color:blue">'+res.total.expect_db+'</div>');
$(tableId+' #total-budget').text('\u20A9'+res.total.budget.toLocaleString('ko-KR'));
}else if(tableId == '#adsets-table'){
$(tableId+' #total-unique_total').text(res.total.unique_total);
$(tableId+' #total-budget').text('\u20A9'+res.total.budget.toLocaleString('ko-KR'));
}else{
$(tableId+' #total-unique_total').text(res.total.unique_total);
}
$(tableId+' #total-spend').text('\u20A9'+res.total.spend.toLocaleString('ko-KR'));
$(tableId+' #total-margin').text('\u20A9'+res.total.margin.toLocaleString('ko-KR'));
$(tableId+' #avg_margin_ratio').text(Math.round(res.total.avg_margin_ratio * 100) / 100 +'\u0025');
$(tableId+' #total-sales').text('\u20A9'+res.total.sales.toLocaleString('ko-KR'));
$(tableId+' #total-impressions').text(res.total.impressions.toLocaleString('ko-KR'));
$(tableId+' #total-click').text(res.total.click.toLocaleString('ko-KR'));
$(tableId+' #avg-cpc').text('\u20A9'+Math.round(res.total.avg_cpc).toLocaleString('ko-KR'));
$(tableId+' #avg-ctr').text(Math.round(res.total.avg_ctr * 100) / 100);
$(tableId+' #avg-cvr').text(Math.round(res.total.avg_cvr * 100) / 100 +'\u0025');
return res.data;
}
},
"columns": columns,
"language": {
"emptyTable": "데이터가 존재하지 않습니다.",
"lengthMenu": "페이지당 _MENU_ 개씩 보기",
"infoEmpty": "데이터 없음",
"infoFiltered": "( _MAX_건의 데이터에서 필터링됨 )",
"search": "에서 검색: ",
"zeroRecords": "일치하는 데이터가 없어요.",
"loadingRecords": "로딩중...",
},
});
}
function getCampaigns(args) {
setDataTable('#campaigns-table', [
{ "data": "name" },
{ "data": "status" },
{ "data": null, "defaultContent": ""},
{ "data": "ai2_status" },
{
"data": "budget",
"render": function (data, type, row) {
if (data !== null) {
budget = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
budget = "";
}
return budget;
}
}, //예산
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAdsets(args) {
setDataTable('#adsets-table', [
{ "data": "name" },
{ "data": "status" },
{ "data": null, "defaultContent": ""},
{
"data": "budget",
"render": function (data, type, row) {
if (data !== null) {
budget = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
budget = "";
}
return budget;
}
}, //예산
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAds(args) {
setDataTable('#ads-table', [
{ "data": "name" },
{ "data": "status" },
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function setDate(){
$('#sdate, #edate').val(today);
$('#sdate, #edate').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $('#sdate');
$checkoutInput = $('#edate');
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
$('body').on('click', '.tab-link', function(){
args.stx = "";
var tabVal = $(this).val();
args.type = tabVal;
switch (args.type) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#business_btn, #account_btn', function(){
if ($(this).attr('id') === 'business_btn') {
$('#account_btn').removeClass('active')
}
$(this).toggleClass("active");
tab = $('.tab-link.active').val();
business = $('#business_btn.active').map(function(){return $(this).val();}).get();
accounts = $('#account_btn.active').map(function(){return $(this).val();}).get();
args.businesses = business;
args.accounts = accounts;
if ($(this).attr('id') === 'business_btn') {
args.accounts = [];
getAccount(args);
}
getReport(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#search_btn', function() {
tab = $('.tab-link.active').val();
args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
'stx': $('#stx').val(),
'type': tab,
};
getReport(args);
getAccount(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+946
View File
@@ -0,0 +1,946 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 광고 관리 / 구글 애드워즈
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/node_modules/datatables.net-dt/css/jquery.dataTables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/jquery.dataTables.js"></script>
<style>
.inner button.disapproval::after{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 3px;
content: "";
background: #ce1922;
}
.inner button.tag-inactive{
opacity: 0.5;
}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">구글 애드워즈 광고관리</h2>
<p class="title-disc">광고주별 매체의 기본적인 광고 합성/종료/수정의 기능을 제공하고 있으며, 추가적으로 CHAIN에서 개발한 스마트하게 광고를 최적화 시켜주는 기능도 함께 이용할 수 있습니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text" name="sdate" id="sdate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text" name="edate" id="edate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="button">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭률</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>수익</dt>
<dd id="profit_sum"></dd>
</dl>
<dl class="col">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매니저 계정</h3>
<div class="row"></div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row"></div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" id="tab-list" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link tab-link active" value="campaigns" type="button" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="adsets" type="button" role="tab" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" aria-controls="set-tab-pane" aria-selected="false">광고 그룹</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="ads" type="button" role="tab" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" aria-controls="advertisement-tab-pane" aria-selected="false">소재</button>
</li>
</ul>
<div class="tab-content">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="campaigns-table">
<colgroup>
<col style="width:20%">
<col style="width:7%">
<col style="width:7%">
<col style="width:10%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">입찰 <br>유형</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td id="total-budget"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-click"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="adsets-table">
<colgroup>
<col style="width:10%">
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:8%">
<col style="width:8%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">광고그룹명</th>
<th scope="col">상태</th>
<th scope="col">입찰가</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-click"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="ads-table">
<colgroup>
<col style="width:10%">
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">광고명</th>
<th scope="col">코드</th>
<th scope="col">상태</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-click"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
var today = moment().format('YYYY-MM-DD');
var args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
};
args.type = 'campaigns';
setDate();
getReport(args);
getManageAccount(args);
getAccount(args);
getCampaigns(args);
function getReport(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/google/report",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#impressions_sum').text(data.impressions_sum.toLocaleString('ko-KR'));
$('#clicks_sum').text(data.clicks_sum.toLocaleString('ko-KR'));
$('#click_ratio_sum').text(data.click_ratio_sum);
$('#spend_sum').text(data.spend_sum.toLocaleString('ko-KR'));
$('#unique_total_sum').text(data.unique_total_sum);
$('#unique_one_price_sum').text(data.unique_one_price_sum.toLocaleString('ko-KR'));
$('#conversion_ratio_sum').text(data.conversion_ratio_sum);
$('#profit_sum').text(data.profit_sum.toLocaleString('ko-KR'));
$('#per_sum').text(data.per_sum);
$('#price_01_sum').text(data.price_sum.toLocaleString('ko-KR'));
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function getManageAccount(){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/google/manageaccounts",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('.biz .row').empty();
var html = '';
var set_ratio = '';
$.each(data, function(idx, v) {
html += '<div class="col"><div class="inner"><button type="button" value="'+v.customerId+'" id="business_btn" class="filter_btn">'+v.name+'</button></div></div>';
});
$('.biz .row').html(html);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function getAccount(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/google/accounts",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('.advertiser .row').empty();
var html = '';
var set_ratio = '';
$.each(data, function(idx, v) {
c = v.class;
c = c.join(' ');
if(v.db_count){
set_ratio = '<div class="progress"><div class="progress-bar" role="progressbar" style="width:'+v.db_ratio+'%"></div><div class="txt">'+v.db_sum+'/'+v.db_count+'</div></div>';
}
html += '<div class="col"><div class="inner"><button type="button" value="'+v.id+'" id="account_btn" class="filter_btn '+c+'">'+v.name+set_ratio+'</button></div></div>';
});
$('.advertiser .row').html(html);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setDataTable(tableId, columns, args){
$(tableId).DataTable({
"processing" : true,
"searching": false,
"ordering": true,
"bLengthChange" : false,
"bDestroy": true,
"paging": false,
"info": false,
"ajax": {
"url": "<?=base_url()?>/advertisements/google/data",
"data": args,
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
if(res.total.margin < 0){
$(tableId+' #total-margin').css('color', 'red');
}
if(res.total.avg_margin_ratio < 20 && res.total.avg_margin_ratio != 0){
$(tableId+' #avg_margin_ratio').css('color', 'red');
}
$(tableId+' #total-count').text(res.data.length+"건 결과");
$(tableId+' #avg-cpa').text(Math.round(res.total.avg_cpa).toLocaleString('ko-KR'));
if(tableId == '#campaigns-table'){
$(tableId+' #total-unique_total').html('<div>'+res.total.unique_total+'</div><div style="color:blue">'+res.total.expect_db+'</div>');
$(tableId+' #total-budget').text('\u20A9'+res.total.budget.toLocaleString('ko-KR'));
}else if(tableId == '#adsets-table'){
$(tableId+' #total-unique_total').text(res.total.unique_total);
}else{
$(tableId+' #total-unique_total').text(res.total.unique_total);
}
$(tableId+' #total-spend').text('\u20A9'+res.total.spend.toLocaleString('ko-KR'));
$(tableId+' #total-margin').text('\u20A9'+res.total.margin.toLocaleString('ko-KR'));
$(tableId+' #avg_margin_ratio').text(Math.round(res.total.avg_margin_ratio * 100) / 100 +'\u0025');
$(tableId+' #total-sales').text('\u20A9'+res.total.sales.toLocaleString('ko-KR'));
$(tableId+' #total-impressions').text(res.total.impressions.toLocaleString('ko-KR'));
$(tableId+' #total-click').text(res.total.click.toLocaleString('ko-KR'));
$(tableId+' #avg-cpc').text('\u20A9'+Math.round(res.total.avg_cpc).toLocaleString('ko-KR'));
$(tableId+' #avg-ctr').text(Math.round(res.total.avg_ctr * 100) / 100);
$(tableId+' #avg-cvr').text(Math.round(res.total.avg_cvr * 100) / 100 +'\u0025');
return res.data;
}
},
"columns": columns,
"language": {
"emptyTable": "데이터가 존재하지 않습니다.",
"lengthMenu": "페이지당 _MENU_ 개씩 보기",
"infoEmpty": "데이터 없음",
"infoFiltered": "( _MAX_건의 데이터에서 필터링됨 )",
"search": "에서 검색: ",
"zeroRecords": "일치하는 데이터가 없어요.",
"loadingRecords": "로딩중...",
},
});
}
function getCampaigns(args) {
setDataTable('#campaigns-table', [
{ "data": "name" },
{ "data": "status" },
{ "data": "biddingStrategyType" },
{
"data": "budget",
"render": function (data, type, row) {
if (data !== null) {
budget = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
budget = "";
}
return budget;
}
}, //예산
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAdsets(args) {
setDataTable('#adsets-table', [
{ "data": "name" },
{ "data": "status" },
{ "data": "bidAmount" },
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impression = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAds(args) {
setDataTable('#ads-table', [
{ "data": "name" },
{ "data": null, "defaultContent": "" },//code
{ "data": "status" },
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function setDate(){
$('#sdate, #edate').val(today);
$('#sdate, #edate').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $('#sdate');
$checkoutInput = $('#edate');
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
$('body').on('click', '.tab-link', function(){
args.stx = "";
var tabVal = $(this).val();
args.type = tabVal;
switch (args.type) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#business_btn, #account_btn', function(){
if ($(this).attr('id') === 'business_btn') {
$('#account_btn').removeClass('active')
}
$(this).toggleClass("active");
tab = $('.tab-link.active').val();
business = $('#business_btn.active').map(function(){return $(this).val();}).get();
accounts = $('#account_btn.active').map(function(){return $(this).val();}).get();
args.businesses = business;
args.accounts = accounts;
if ($(this).attr('id') === 'business_btn') {
args.accounts = [];
getAccount(args);
}
getReport(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#search_btn', function() {
tab = $('.tab-link.active').val();
args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
'stx': $('#stx').val(),
'type': tab,
};
getReport(args);
getAccount(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+965
View File
@@ -0,0 +1,965 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 광고 관리 / 카카오 모먼트
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/node_modules/datatables.net-dt/css/jquery.dataTables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/jquery.dataTables.js"></script>
<style>
.inner button.disapproval::after{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 3px;
content: "";
background: #ce1922;
}
.inner button.tag-inactive{
opacity: 0.5;
}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">카카오 모먼트 광고관리</h2>
<p class="title-disc">광고주별 매체의 기본적인 광고 합성/종료/수정의 기능을 제공하고 있으며, 추가적으로 CHAIN에서 개발한 스마트하게 광고를 최적화 시켜주는 기능도 함께 이용할 수 있습니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text" name="sdate" id="sdate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text" name="edate" id="edate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="button">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭률</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>매체비</dt>
<dd id="spend_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row">
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" id="tab-list" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link tab-link active" value="campaigns" type="button" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="adsets" type="button" role="tab" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" aria-controls="set-tab-pane" aria-selected="false">광고 세트</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="ads" type="button" role="tab" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" aria-controls="advertisement-tab-pane" aria-selected="false">광고</button>
</li>
</ul>
<div class="tab-content">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="campaigns-table">
<colgroup>
<col>
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">목표 <br>ai</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td id="total-budget"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-inline_link_clicks"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="adsets-table">
<colgroup>
<col style="width:10%">
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">광고그룹명</th>
<th scope="col">상태</th>
<th scope="col">Ai</th>
<th scope="col">예산</th>
<th scope="col">입찰금액</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td id="total-budget"></td>
<td></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-inline_link_clicks"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="ads-table">
<colgroup>
<col style="width:10%">
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">광고명</th>
<th scope="col">상태</th>
<th scope="col">Ai</th>
<th scope="col">프리퀀시캡</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td></td>
<td></td>
<td></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-inline_link_clicks"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
var today = moment().format('YYYY-MM-DD');
var args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
};
args.type = 'campaigns';
setDate();
getReport(args);
getAccount(args);
getCampaigns(args);
function getReport(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/kakao/report",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#impressions_sum').text(data.impressions_sum.toLocaleString('ko-KR'));
$('#clicks_sum').text(data.clicks_sum.toLocaleString('ko-KR'));
$('#click_ratio_sum').text(data.click_ratio_sum);
$('#spend_sum').text(data.spend_sum.toLocaleString('ko-KR'));
$('#spend_ratio_sum').text(data.spend_ratio_sum.toLocaleString('ko-KR'));
$('#unique_total_sum').text(data.unique_total_sum);
$('#unique_one_price_sum').text(data.unique_one_price_sum.toLocaleString('ko-KR'));
$('#conversion_ratio_sum').text(data.conversion_ratio_sum);
$('#per_sum').text(data.per_sum);
$('#price_01_sum').text(data.price_sum.toLocaleString('ko-KR'));
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function getAccount(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/kakao/accounts",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('.advertiser .row').empty();
var html = '';
$.each(data, function(idx, v) {
c = v.class;
c = c.join(' ');
html += '<div class="col"><div class="inner"><button type="button" value="'+v.id+'" id="account_btn" class="filter_btn '+c+'">'+v.name+'</button></div></div>';
});
$('.advertiser .row').html(html);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setDataTable(tableId, columns, args){
$(tableId).DataTable({
"processing" : true,
"searching": false,
"ordering": true,
"bLengthChange" : false,
"bDestroy": true,
"paging": false,
"info": false,
"ajax": {
"url": "<?=base_url()?>/advertisements/kakao/data",
"data": args,
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
if(res.total.margin < 0){
$(tableId+' #total-margin').css('color', 'red');
}
if(res.total.avg_margin_ratio < 20 && res.total.avg_margin_ratio != 0){
$(tableId+' #avg_margin_ratio').css('color', 'red');
}
$(tableId+' #total-count').text(res.data.length+"건 결과");
$(tableId+' #avg-cpa').text(Math.round(res.total.avg_cpa).toLocaleString('ko-KR'));
if(tableId == '#campaigns-table'){
$(tableId+' #total-unique_total').html('<div>'+res.total.unique_total+'</div><div style="color:blue">'+res.total.expect_db+'</div>');
$(tableId+' #total-budget').text('\u20A9'+res.total.budget.toLocaleString('ko-KR'));
}else if(tableId == '#adsets-table'){
$(tableId+' #total-unique_total').text(res.total.unique_total);
$(tableId+' #total-budget').text('\u20A9'+res.total.budget.toLocaleString('ko-KR'));
}else{
$(tableId+' #total-unique_total').text(res.total.unique_total);
}
$(tableId+' #total-spend').text('\u20A9'+res.total.spend.toLocaleString('ko-KR'));
$(tableId+' #total-margin').text('\u20A9'+res.total.margin.toLocaleString('ko-KR'));
$(tableId+' #avg_margin_ratio').text(Math.round(res.total.avg_margin_ratio * 100) / 100 +'\u0025');
$(tableId+' #total-sales').text('\u20A9'+res.total.sales.toLocaleString('ko-KR'));
$(tableId+' #total-impressions').text(res.total.impressions.toLocaleString('ko-KR'));
$(tableId+' #total-inline_link_clicks').text(res.total.click.toLocaleString('ko-KR'));
$(tableId+' #avg-cpc').text('\u20A9'+Math.round(res.total.avg_cpc).toLocaleString('ko-KR'));
$(tableId+' #avg-ctr').text(Math.round(res.total.avg_ctr * 100) / 100);
$(tableId+' #avg-cvr').text(Math.round(res.total.avg_cvr * 100) / 100 +'\u0025');
return res.data;
}
},
"columns": columns,
"language": {
"emptyTable": "데이터가 존재하지 않습니다.",
"lengthMenu": "페이지당 _MENU_ 개씩 보기",
"infoEmpty": "데이터 없음",
"infoFiltered": "( _MAX_건의 데이터에서 필터링됨 )",
"search": "에서 검색: ",
"zeroRecords": "일치하는 데이터가 없어요.",
"loadingRecords": "로딩중...",
},
});
}
function getCampaigns(args) {
setDataTable('#campaigns-table', [
{ "data": "name" },
{ "data": "status" },
{ "data": "autoBudget" },
{
"data": "budget",
"render": function (data, type, row) {
if (data !== null) {
dailyBudgetAmount = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
budget = "";
}
return budget;
}
}, //예산
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAdsets(args) {
setDataTable('#adsets-table', [
{ "data": "name" },
{ "data": "status" },
{
"data": "aiConfig",
"render": function (data, type, row) {
html = '';
html += `<select name="aiConfig" data-id="${row.id}" class="form-select ai-select active-select ai-${row.aiConfig}">`;
html += `<option value="OFF" ${row.aiConfig === 'OFF' ? 'selected' : ''}>X</option><option value="ON" ${row.aiConfig === 'ON' ? 'selected' : ''}>O</option></select>`;
html += `<select name="aiConfig" data-id="${row.id}" class="form-select ai-select active-select ai-${row.aiConfig2}">`;
html += `<option value="OFF" ${row.aiConfig2 === 'OFF' ? 'selected' : ''}>X</option><option value="ON" ${row.aiConfig === 'ON' ? 'selected' : ''}>O</option></select>`;
return html;
}
},
{
"data": "budget",
"render": function (data, type, row) {
if (data !== null) {
budget = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
budget = "";
}
return budget;
}
}, //예산
{
"data": "bidAmount",
"render": function (data, type, row) {
if (data !== null) {
bidAmount = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
bidAmount = "";
}
return bidAmount;
}
}, //예산
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAds(args) {
setDataTable('#ads-table', [
{ "data": "name" },
{
"data": "status",
"render": function (data, type, row) {
html = '';
html += `<select name="status" data-id="${row.id}" class="form-select active-select">`;
html += `<option value="OFF" ${row.status === 'OFF' ? 'selected' : ''}>비활성</option><option value="ON" ${row.status === 'ON' ? 'selected' : ''}>활성</option></select>`;
return html;
}
},
{
"data": "aiConfig",
"render": function (data, type, row) {
html = '';
html += `<select name="aiConfig" data-id="${row.id}" class="form-select active-select ai-${row.aiConfig}">`;
html += `<option value="OFF" ${row.aiConfig === 'OFF' ? 'selected' : ''}>비활성</option><option value="ON" ${row.aiConfig === 'ON' ? 'selected' : ''}>활성</option></select>`;
return html;
}
},
{ "data": "frequencyCap" }, //프리퀀시캡
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "spend",
"render": function (data, type, row) {
if (data !== null) {
spend = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
spend = "";
}
return spend;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "";
}
return sales;
}
}, //매출액
{
"data": "impressions",
"render": function (data, type, row) {
if (data !== null) {
impressions = parseInt(data).toLocaleString('ko-KR');
}else{
impressions = "";
}
return impressions;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function setDate(){
$('#sdate, #edate').val(today);
$('#sdate, #edate').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $('#sdate');
$checkoutInput = $('#edate');
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
$('body').on('click', '.tab-link', function(){
args.stx = "";
var tabVal = $(this).val();
args.type = tabVal;
switch (args.type) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#account_btn', function(){
$(this).toggleClass("active");
tab = $('.tab-link.active').val();
accounts = $('#account_btn.active').map(function(){return $(this).val();}).get();
args.accounts = accounts;
getReport(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#search_btn', function() {
tab = $('.tab-link.active').val();
args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
'stx': $('#stx').val(),
'type': tab,
};
getReport(args);
getAccount(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
File diff suppressed because it is too large Load Diff
+842
View File
@@ -0,0 +1,842 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 광고 관리 / 네이버
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/node_modules/datatables.net-dt/css/jquery.dataTables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/jquery.dataTables.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">네이버 광고관리</h2>
<p class="title-disc">광고주별 매체의 기본적인 광고 합성/종료/수정의 기능을 제공하고 있으며, 추가적으로 CHAIN에서 개발한 스마트하게 광고를 최적화 시켜주는 기능도 함께 이용할 수 있습니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text" name="sdate" id="sdate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text" name="edate" id="edate" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="button">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭률</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row">
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" id="tab-list" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link tab-link active" value="campaigns" type="button" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="adsets" type="button" role="tab" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" aria-controls="set-tab-pane" aria-selected="false">광고 세트</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tab-link" value="ads" type="button" role="tab" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" aria-controls="advertisement-tab-pane" aria-selected="false">광고</button>
</li>
</ul>
<div class="tab-content">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="campaigns-table">
<colgroup>
<col>
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-inline_link_clicks"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="adsets-table">
<colgroup>
<col>
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-inline_link_clicks"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="ads-table">
<colgroup>
<col>
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<thead>
<tr id="total">
<td id="total-count"></td>
<td id="avg-cpa"></td>
<td id="total-unique_total"></td>
<td id="total-spend"></td>
<td id="total-margin"></td>
<td id="avg_margin_ratio"></td>
<td id="total-sales"></td>
<td id="total-impressions"></td>
<td id="total-inline_link_clicks"></td>
<td id="avg-cpc"></td>
<td id="avg-ctr"></td>
<td id="avg-cvr"></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
var today = moment().format('YYYY-MM-DD');
var args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
};
args.type = 'campaigns';
setDate();
getReport(args);
getAccount(args);
getCampaigns(args);
function getReport(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/naver/report",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#impressions_sum').text(data.impressions_sum.toLocaleString('ko-KR'));
$('#clicks_sum').text(data.clicks_sum.toLocaleString('ko-KR'));
$('#click_ratio_sum').text(data.click_ratio_sum);
$('#spend_sum').text(Math.floor(data.spend_sum).toLocaleString('ko-KR'));
$('#unique_total_sum').text(data.unique_total_sum);
$('#unique_one_price_sum').text(data.unique_one_price_sum.toLocaleString('ko-KR'));
$('#conversion_ratio_sum').text(data.conversion_ratio_sum);
$('#per_sum').text(data.per_sum);
$('#price_01_sum').text(data.price_sum);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function getAccount(args){
$.ajax({
type: "GET",
url: "<?=base_url()?>/advertisements/naver/accounts",
data: args,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('.advertiser .row').empty();
var html = '';
$.each(data, function(idx, v) {
html += '<div class="col"><div class="inner"><button type="button" value="'+v.account_id+'" id="account_btn" class="filter_btn">'+v.name+'</button></div></div>';
});
$('.advertiser .row').html(html);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setDataTable(tableId, columns, args){
$(tableId).DataTable({
"processing" : true,
"searching": false,
"ordering": true,
"bLengthChange" : false,
"bDestroy": true,
"paging": false,
"info": false,
"ajax": {
"url": "<?=base_url()?>/advertisements/naver/data",
"data": args,
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
if(res.total.margin < 0){
$(tableId+' #total-margin').css('color', 'red');
}
if(res.total.avg_margin_ratio < 20 && res.total.avg_margin_ratio != 0){
$(tableId+' #avg_margin_ratio').css('color', 'red');
}
$(tableId+' #total-count').text(res.data.length+"건 결과");
$(tableId+' #avg-cpa').text(Math.round(res.total.avg_cpa).toLocaleString('ko-KR'));
$(tableId+' #total-unique_total').text(res.total.unique_total);
$(tableId+' #total-spend').text('\u20A9'+res.total.cost.toLocaleString('ko-KR'));
$(tableId+' #total-margin').text('\u20A9'+res.total.margin.toLocaleString('ko-KR'));
$(tableId+' #avg_margin_ratio').text(Math.round(res.total.avg_margin_ratio * 100) / 100 +'\u0025');
$(tableId+' #total-sales').text('\u20A9'+res.total.sales.toLocaleString('ko-KR'));
$(tableId+' #total-impressions').text(res.total.impression.toLocaleString('ko-KR'));
$(tableId+' #total-inline_link_clicks').text(res.total.click.toLocaleString('ko-KR'));
$(tableId+' #avg-cpc').text('\u20A9'+Math.round(res.total.avg_cpc).toLocaleString('ko-KR'));
$(tableId+' #avg-ctr').text(Math.round(res.total.avg_ctr * 100) / 100);
$(tableId+' #avg-cvr').text(Math.round(res.total.avg_cvr * 100) / 100 +'\u0025');
return res.data;
}
},
"columns": columns,
"language": {
"emptyTable": "데이터가 존재하지 않습니다.",
"lengthMenu": "페이지당 _MENU_ 개씩 보기",
"infoEmpty": "데이터 없음",
"infoFiltered": "( _MAX_건의 데이터에서 필터링됨 )",
"search": "에서 검색: ",
"zeroRecords": "일치하는 데이터가 없어요.",
"loadingRecords": "로딩중...",
},
});
}
function getCampaigns(args) {
setDataTable('#campaigns-table', [
{ "data": "name" },
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "cost",
"render": function (data, type, row) {
if (data !== null) {
cost = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cost = "";
}
return cost;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "\u20A90";
}
return sales;
}
}, //매출액
{
"data": "impression",
"render": function (data, type, row) {
if (data !== null) {
impression = parseInt(data).toLocaleString('ko-KR');
}else{
impression = "";
}
return impression;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAdsets(args) {
setDataTable('#adsets-table', [
{ "data": "name" },
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "cost",
"render": function (data, type, row) {
if (data !== null) {
cost = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cost = "";
}
return cost;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "\u20A90";
}
return sales;
}
}, //매출액
{
"data": "impression",
"render": function (data, type, row) {
if (data !== null) {
impression = parseInt(data).toLocaleString('ko-KR');
}else{
impression = "";
}
return impression;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function getAds(args) {
setDataTable('#ads-table', [
{ "data": "name" },
{
"data": "cpa",
"render": function (data, type, row) {
if (data !== null) {
cpa = parseInt(data).toLocaleString('ko-KR');
}else{
cpa = "";
}
return cpa;
}
}, //현재 DB단가
{ "data": "unique_total" }, //유효DB수
{
"data": "cost",
"render": function (data, type, row) {
if (data !== null) {
cost = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cost = "";
}
return cost;
}
}, //지출액
{
"data": "margin",
"render": function (data, type, row) {
if (data !== null) {
if(data < 0){
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
return '<span style="color:red">'+margin+'</span>';
}else{
margin = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}
}else{
margin = "";
}
return margin;
}
}, //수익
{
"data": "margin_ratio",
"render": function (data, type, row) {
if (data !== null) {
if(data < 20 && data != 0){
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
return '<span style="color:red">'+margin_ratio+'</span>';
}else{
margin_ratio = parseInt(data).toLocaleString('ko-KR')+'\u0025';
}
}else{
margin_ratio = "";
}
return margin_ratio;
}
}, //수익률
{
"data": "sales",
"render": function (data, type, row) {
if (data !== null) {
sales = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
sales = "\u20A90";
}
return sales;
}
}, //매출액
{
"data": "impression",
"render": function (data, type, row) {
if (data !== null) {
impression = parseInt(data).toLocaleString('ko-KR');
}else{
impression = "";
}
return impression;
}
}, //노출수
{
"data": "click",
"render": function (data, type, row) {
if (data !== null) {
click = parseInt(data).toLocaleString('ko-KR');
}else{
click = "";
}
return click;
}
}, //링크클릭
{
"data": "cpc",
"render": function (data, type, row) {
if (data !== null) {
cpc = '\u20A9'+parseInt(data).toLocaleString('ko-KR');
}else{
cpc = "";
}
return cpc;
}
}, //클릭당단가 (1회 클릭당 비용)
{ "data": "ctr", }, //클릭율 (노출 대비 클릭한 비율)
{
"data": "cvr",
"render": function (data, type, row) {
return data+'\u0025';
}
}, //전환율
], args);
}
function setDate(){
$('#sdate, #edate').val(today);
$('#sdate, #edate').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $('#sdate');
$checkoutInput = $('#edate');
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
$('body').on('click', '.tab-link', function(){
args.stx = "";
var tabVal = $(this).val();
args.type = tabVal;
switch (args.type) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#account_btn', function(){
$(this).toggleClass("active");
tab = $('.tab-link.active').val();
accounts = $('#account_btn.active').map(function(){return $(this).val();}).get();
args.accounts = accounts;
getReport(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
$('body').on('click', '#search_btn', function() {
tab = $('.tab-link.active').val();
args = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
'stx': $('#stx').val(),
'type': tab,
};
getReport(args);
getAccount(args);
switch (tab) {
case "ads":
getAds(args);
break;
case "adsets":
getAdsets(args);
break;
default:
getCampaigns(args);
}
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+31
View File
@@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= lang('Auth.email2FASubject') ?></title>
</head>
<body>
<p><?= lang('Auth.email2FAMailBody') ?></p>
<div style="text-align: center">
<h1><?= $code ?></h1>
</div>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
<tbody>
<tr>
<td style="line-height: 20px; font-size: 20px; width: 100%; height: 20px; margin: 0;" align="left" width="100%" height="20">
&#160;
</td>
</tr>
</tbody>
</table>
<b><?= lang('Auth.emailInfo') ?></b>
<p><?= lang('Auth.emailIpAddress') ?> <?= esc($ipAddress) ?></p>
<p><?= lang('Auth.emailDevice') ?> <?= esc($userAgent) ?></p>
<p><?= lang('Auth.emailDate') ?> <?= esc($date) ?></p>
</body>
</html>
@@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= lang('Auth.emailActivateSubject') ?></title>
</head>
<body>
<p><?= lang('Auth.emailActivateMailBody') ?></p>
<div style="text-align: center">
<h1><?= $code ?></h1>
</div>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
<tbody>
<tr>
<td style="line-height: 20px; font-size: 20px; width: 100%; height: 20px; margin: 0;" align="left" width="100%" height="20">
&#160;
</td>
</tr>
</tbody>
</table>
<b><?= lang('Auth.emailInfo') ?></b>
<p><?= lang('Auth.emailIpAddress') ?> <?= esc($ipAddress) ?></p>
<p><?= lang('Auth.emailDevice') ?> <?= esc($userAgent) ?></p>
<p><?= lang('Auth.emailDate') ?> <?= esc($date) ?></p>
</body>
</html>
+78
View File
@@ -0,0 +1,78 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<head>
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= lang('Auth.magicLinkSubject') ?></title>
</head>
<body style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
<!-- ... (Rest of the code) ... -->
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body" style="background-color: #f6f6f6; width: 100%;">
<tr>
<td>&nbsp;</td>
<td class="container" style="display: block; margin: 0 auto !important; max-width: 580px; padding: 10px; width: 580px;">
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;background:#ffffff;text-align:center">
<!-- START CENTERED WHITE CONTAINER -->
<table role="presentation" class="main" style="border-radius: 3px; width: 100%;margin-bottom:20px">
<!-- START MAIN CONTENT AREA -->
<tr>
<td class="wrapper">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<tr>
<td>
<h3 style="color: #000000; font-family: sans-serif; font-weight: 400; line-height: 1.4; margin: 0; margin-bottom: 20px; font-size: 23px; text-align: center; text-transform: capitalize;">비밀번호 재설정 링크</h3>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">아래 버튼을 클릭하여 접속 후 비밀번호를 변경해주시기 바랍니다.</p>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="box-sizing: border-box; width: 100%;">
<tbody>
<tr>
<td align="left">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="margin: 0 auto;">
<tbody>
<tr>
<td> <a href="<?= url_to('verify-magic-link') ?>?token=<?= $token ?>" target="_blank" style="background-color: #ce1922; border-radius: 5px; box-sizing: border-box; color: #ffffff; cursor: pointer; display: inline-block; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-decoration: none; text-transform: capitalize;">비밀번호 재설정</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="content-block">
<span class="apple-link" style="color: #999999; font-size: 12px; text-align: center;"><?= lang('Auth.emailInfo') ?></span>
<br> <?= lang('Auth.emailIpAddress') ?> <?= esc($ipAddress) ?>.
</td>
</tr>
<tr>
<td class="content-block powered-by" style="color: #999999; font-size: 12px; text-align: center;">
<?= lang('Auth.emailDevice') ?> <?= esc($userAgent) ?>.<br>
<?= lang('Auth.emailDate') ?> <?= esc($date) ?>
</td>
</tr>
</table>
<!-- END CENTERED WHITE CONTAINER -->
</div>
</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
+38
View File
@@ -0,0 +1,38 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.email2FATitle') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.email2FATitle') ?></h5>
<p><?= lang('Auth.confirmEmailAddress') ?></p>
<?php if (session('error')) : ?>
<div class="alert alert-danger"><?= session('error') ?></div>
<?php endif ?>
<form action="<?= url_to('auth-action-handle') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2">
<input type="email" class="form-control" name="email"
inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>"
<?php /** @var \CodeIgniter\Shield\Entities\User $user */ ?>
value="<?= old('email', $user->email) ?>" required />
</div>
<div class="d-grid col-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.send') ?></button>
</div>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>
+36
View File
@@ -0,0 +1,36 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.email2FATitle') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.emailEnterCode') ?></h5>
<p><?= lang('Auth.emailConfirmCode') ?></p>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger"><?= session('error') ?></div>
<?php endif ?>
<form action="<?= url_to('auth-action-verify') ?>" method="post">
<?= csrf_field() ?>
<!-- Code -->
<div class="mb-2">
<input type="number" class="form-control" name="token" placeholder="000000"
inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" required />
</div>
<div class="d-grid col-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.confirm') ?></button>
</div>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>
+36
View File
@@ -0,0 +1,36 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.emailActivateTitle') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.emailActivateTitle') ?></h5>
<?php if (session('error')) : ?>
<div class="alert alert-danger"><?= session('error') ?></div>
<?php endif ?>
<p><?= lang('Auth.emailActivateBody') ?></p>
<form action="<?= site_url('auth/a/verify') ?>" method="post">
<?= csrf_field() ?>
<!-- Code -->
<div class="mb-2">
<input type="text" class="form-control" name="token" placeholder="000000" inputmode="numeric"
pattern="[0-9]*" autocomplete="one-time-code" value="<?= old('token') ?>" required />
</div>
<div class="d-grid col-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.send') ?></button>
</div>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>
+93
View File
@@ -0,0 +1,93 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.login') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="row container-fluid account-container">
<div class="card col-lg-6 col-12">
<form action="<?= url_to('login') ?>" method="post">
<?= csrf_field() ?>
<h1 class="card-title">로그인</h1>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger lh-base" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger lh-base" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if (session('message') !== null) : ?>
<div class="alert alert-success" role="alert"><?= session('message') ?></div>
<?php endif ?>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="bi bi-person-check"></i>
<input type="text" class="form-control" name="username" autocomplete="off" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>"/>
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<i class="bi bi-lock"></i>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="off" placeholder="<?= lang('Auth.password') ?>" />
</div>
<!-- Remember me -->
<?php if (setting('Auth.sessionConfig')['allowRemembering']): ?>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')): ?> checked<?php endif ?>>
<?= lang('Auth.rememberMe') ?>
</label>
</div>
<?php endif; ?>
<div class="my-5">
<button type="submit" class="btn btn-outline-primary btn-block"><?= lang('Auth.login') ?></button>
</div>
<div class="d-flex justify-content-between">
<?php if (setting('Auth.allowMagicLinkLogins')) : ?>
<div class="d-flex align-items-center icon"><a href="<?= url_to('magic-link') ?>"><span class="material-symbols-outlined">lock_person</span><?= lang('Auth.forgotPassword') ?> </a></div>
<?php endif ?>
<?php if (setting('Auth.allowRegistration')) : ?>
<div class="d-flex align-items-center icon"><a href="<?= url_to('register') ?>"><span class="material-symbols-outlined">how_to_reg</span><?= lang('Auth.register') ?></a></div>
<?php endif ?>
</div>
</form>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.account-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
//회원정보 입력시 아이콘 색상 변화
let icon_blue = '#4477CE';
$('.form-control').bind('keyup',function(){
$(this).prev().css('color',icon_blue);
$(this).css('color',icon_blue);
});
</script>
<?= $this->endSection() ?>
+70
View File
@@ -0,0 +1,70 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?>로그인<?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5 text-center">로그인</h5>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if (session('message') !== null) : ?>
<div class="alert alert-success" role="alert"><?= session('message') ?></div>
<?php endif ?>
<form action="<?= url_to('login') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2">
<input type="text" class="form-control" name="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" />
</div>
<!-- Password -->
<div class="mb-2">
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="current-password" placeholder="<?= lang('Auth.password') ?>" />
</div>
<!-- Remember me -->
<?php if (setting('Auth.sessionConfig')['allowRemembering']): ?>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')): ?> checked<?php endif ?>>
<?= lang('Auth.rememberMe') ?>
</label>
</div>
<?php endif; ?>
<div class="d-grid col-12 col-md-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.login') ?></button>
</div>
<?php if (setting('Auth.allowMagicLinkLogins')) : ?>
<p class="text-center"><a href="<?= url_to('magic-link') ?>"><?= lang('Auth.forgotPassword') ?> </a></p>
<?php endif ?>
<?php if (setting('Auth.allowRegistration')) : ?>
<p class="text-center"><a href="<?= url_to('register') ?>"><?= lang('Auth.register') ?></a></p>
<?php endif ?>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>
+65
View File
@@ -0,0 +1,65 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?>비밀번호 재설정<?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="row container-fluid account-container">
<div class="card col-lg-6 col-12">
<form action="<?= url_to('magic-link') ?>" method="post">
<?= csrf_field() ?>
<h1 class="card-title">비밀번호 재설정</h1>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="bi bi-person-check"></i>
<input type="email" class="form-control" name="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>"
value="<?= old('email', auth()->user()->email ?? null) ?>" />
</div>
<div class="my-5">
<button type="submit" class="btn btn-outline-primary btn-block"><?= lang('Auth.send') ?></button>
</div>
</form>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.account-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
//회원정보 입력시 아이콘 색상 변화
let icon_blue = '#4477CE';
$('.form-control').bind('keyup',function(){
$(this).prev().css('color',icon_blue);
$(this).css('color',icon_blue);
});
</script>
<?= $this->endSection() ?>
+20
View File
@@ -0,0 +1,20 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.useMagicLink') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="row container-fluid account-container">
<div class="card col-lg-6 col-12">
<h1 class="card-title"><?= lang('Auth.useMagicLink') ?></h1>
<div class="mb- position-relative">
<i class="fa fa-envelope-o me-2"></i>
<b><?= lang('Auth.checkYourEmail') ?></b>
<p class="mt-3"><?= lang('Auth.magicLinkDetails', [setting('Auth.magicLinkLifetime') / 60]) ?></p>
</div>
</div>
</div>
<?= $this->endSection() ?>
+83
View File
@@ -0,0 +1,83 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="row container-fluid account-container">
<div class="card col-lg-6 col-12">
<form action="<?= url_to('register') ?>" method="post">
<?= csrf_field() ?>
<h5 class="card-title"><?= lang('Auth.register') ?></h5>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger lh-base" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="fa fa-envelope-o"></i>
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="off" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>"/>
</div>
<!-- Username -->
<div class="mb-2 position-relative">
<i class="bi bi-person-check"></i>
<input type="text" class="form-control" name="username" inputmode="text" autocomplete="off" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>"/>
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<i class="bi bi-lock"></i>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="off" placeholder="<?= lang('Auth.password') ?>" />
</div>
<!-- Password (Again) -->
<div class="mb-2 position-relative">
<i class="bi bi-check-circle"></i>
<input type="password" class="form-control" name="password_confirm" inputmode="text" autocomplete="off" placeholder="<?= lang('Auth.passwordConfirm') ?>" />
</div>
<div class="my-5">
<button type="submit" class="btn btn-outline-primary btn-block"><?= lang('Auth.register') ?></button>
</div>
<div class="icon"><a href="<?= url_to('login') ?>"><span class="material-symbols-outlined">input</span><?= lang('Auth.login') ?></a></div>
</form>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.account-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
//회원정보 입력시 아이콘 색상 변화
let icon_blue = '#4477CE';
$('.form-control').bind('keyup',function(){
$(this).prev().css('color',icon_blue);
$(this).css('color',icon_blue);
});
</script>
<?= $this->endSection() ?>
+60
View File
@@ -0,0 +1,60 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.register') ?></h5>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<form action="<?= url_to('register') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2">
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" />
</div>
<!-- Username -->
<div class="mb-4">
<input type="text" class="form-control" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" />
</div>
<!-- Password -->
<div class="mb-2">
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" />
</div>
<!-- Password (Again) -->
<div class="mb-5">
<input type="password" class="form-control" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" />
</div>
<div class="d-grid col-12 col-md-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.register') ?></button>
</div>
<p class="text-center"><a href="<?= url_to('login') ?>"><?= lang('Auth.login') ?></a></p>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>
+60
View File
@@ -0,0 +1,60 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?>비밀번호 재설정<?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="row container-fluid account-container">
<div class="card col-lg-6 col-12">
<form action="/set-password" method="post">
<?= csrf_field() ?>
<h1 class="card-title">비밀번호 재설정</h1>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="bi bi-lock"></i>
<input type="password" class="form-control" name="password" placeholder="<?= lang('Auth.password') ?>" value=""/>
</div>
<div class="mb-2 position-relative">
<i class="bi bi-check-circle"></i>
<input type="password" class="form-control" name="password_confirm" placeholder="<?= lang('Auth.passwordConfirm') ?>" value=""/>
</div>
<div class="my-5">
<button type="submit" class="btn btn-outline-primary btn-block">비밀번호 변경</button>
</div>
</form>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.account-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
</script>
<?= $this->endSection() ?>
+526
View File
@@ -0,0 +1,526 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 통합 DB 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap align-items-center automationContent" id="automationContent">
<div class="title-area mb0">
<h2 class="page-title">자동화 목록</h2>
</div>
<!-- 매체 카테고리 -->
<!-- <div class="section client-list media mt50">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매체</h3>
<div class="row">
<div class="col">
<div class="inner"><button type="button" value="facebook" data-btn="media" class="media_btn"><span>페이스북</span></button></div>
</div>
<div class="col">
<div class="inner"><button type="button" value="kakao" data-btn="media" class="media_btn"><span>카카오</span></button></div>
</div>
<div class="col">
<div class="inner"><button type="button" value="google" data-btn="media" class="media_btn"><span>구글</span></button></div>
</div>
</div>
</div> -->
<!-- 매체 카테고리 -->
<!-- 임시주석 2024.07.11 -->
<!-- <div class="search-wrap type-single">
<form name="search-form" class="search">
<div class="input align-center">
<button class="btn-special createBtn" type="button" data-bs-toggle="modal" data-bs-target="#automationModal">작성하기</button>
<button class="btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#logModal">전체 로그 보기</button>
</div>
</form>
</div> -->
<!-- //임시주석 2024.07.11 -->
<div class="section mt0">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="automation-table">
<thead class="table-dark">
<tr>
<th scope="col">제목</th>
<th scope="col">작성자</th>
<th scope="col">업데이트</th>
<th scope="col">마지막 실행</th>
<th scope="col">예상 실행 시간</th>
<th scope="col">사용</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal logModal fade" id="logModal" tabindex="-1" aria-labelledby="logModal" aria-hidden="true">
<input type="hidden" name="log_seq">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="logModal-tit"> <span></span>감사 로그</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="search-wrap log-search-wrap">
<form name="log-search-form" class="search">
<div class="term term-small d-flex align-items-center">
<input type="hidden" name="sdate" id="log_sdate"><input type="hidden" name="edate" id="log_edate">
<label><input type="text" name="dates" id="log_dates" data="daterangepicker" autocomplete="off" aria-autocomplete="none"><i class="bi bi-calendar2-week"></i></label>
</div>
<div class="input">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default logTable" id="logTable">
<thead class="table-dark">
<tr>
<th scope="col">제목</th>
<th scope="col">작성자</th>
<th scope="col">결과</th>
<th scope="col">마지막 실행</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?=$this->include('templates/inc/automation_create_modal.php')?>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script src="/static/js/automation/automation.js"></script>
<script>
let data = {};
let dataTable;
getList();
function getList(){
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#automation-table').DataTable({
"dom": '<<"search-control-box"fB>r<t>ip>',
"autoWidth": false,
"fixedHeader": true,
"order": [[2,'desc']],
"processing" : true,
"serverSide" : false,
"responsive": true,
"searching": true,
"ordering": true,
"scrollX": true,
// "scrollY": 500,
"scrollCollapse": true,
"deferRender": true,
"rowId": "seq",
"lengthMenu": [[ 25, 10, 50, -1 ],[ '25개', '10개', '50개', '전체' ]],
"buttons":[
{text: '<span class="btn btn-outline-danger" type="button" data-bs-toggle="modal" data-bs-target="#automationModal">작성하기</span>'},
{text: '<span class="btn btn-outline-danger" type="button" data-bs-toggle="modal" data-bs-target="#logModal">전체 로그 보기</span>'}
],
"ajax": {
"url": "<?=base_url()?>/automation/list",
"data": function(d) {
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columnDefs": [
{ "className": "dt-type-center", "targets": [2, 3, 4, 5] } // 특정 열 가운데 정렬
],
"columns": [
{
"data": "aa_subject",
"width": "20%",
"render": function(data){
subject = '<button type="button" data-bs-toggle="modal" data-bs-target="#automationModal" class="updateBtn">'+data+'</button>';
return subject;
}
},
{
"data": "aa_nickname",
"width": "15%",
},
{
"data": "aa_mod_datetime",
"width": "15%",
"render": function(data){
if(data != null){
data = data.substr(0, 16);
}else{
data = null;
}
return data;
}
},
{
"data": "aar_exec_timestamp_success",
"width": "15%",
"render": function(data){
if(data != null){
data = data.substr(0, 16);
}else{
data = null;
}
return data;
}
},
{
"data": "expected_time",
"width": "15%",
"render": function(data){
if(data != null){
data = data.substr(0, 16);
}else{
data = null;
}
return data;
}
},
{
"data": "aa_status",
"width": "20%",
"render": function(data, type, row){
checked = data == 1 ? 'checked' : '';
var status = '<div class="td-inner"><div class="ui-toggle"><input type="checkbox" name="status" id="status_' + row.aa_seq + '" ' + checked + ' value="'+row.aa_seq+'"><label for="status_' + row.aa_seq + '">사용</label></div><div class="more-action"><button type="button" class="btn-more"><span>더보기</span></button><ul class="action-list z-1"><li><a href="#" data-seq="' + row.aa_seq + '" class="log-btn" data-bs-target="#logModal" data-bs-toggle="modal">로그보기</a></li><li><a href="#" data-seq="' + row.aa_seq + '" class="copy-btn">복제하기</a></li><li><a href="#" data-seq="' + row.aa_seq + '" class="delete-btn">제거하기</a></li></ul></div></div>';
return status;
}
},
],
"createdRow": function(row, data, dataIndex) {
$(row).attr("data-id", data.aa_seq);
},
"language": {
"url": '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"initComplete": function(settings, json) {
// fadeIn 효과 적용 $('#automation-table')
let advTable = document.getElementById('automation-table');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
//테이블 페이드인 효과
function fadeIn(tableName, duration) {
let opacity = 0;
tableName.style.opacity = 0;
tableName.style.display = "table";
const jsInterval = 50;
const increment = jsInterval / duration;
const jsFade = setInterval(() => {
opacity += increment;
tableName.style.opacity = opacity;
if(opacity >= 1) {
clearInterval(jsFade)
}
}, jsInterval);
}
function setDate(){
$('#log_sdate, #log_dates').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
$('#log_edate').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
$('[data="daterangepicker"]').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$sdateInput = $('[name="sdate"]', this.element.parentNode);
$edateInput = $('[name="edate"]', this.element.parentNode);
$sdateInput.val(startDate);
$edateInput.val(endDate);
var dates = `${startDate} ~ ${endDate}`;
if(startDate == endDate) dates = startDate;
$(this.element).val(dates);
});
}
function setAutomationStatus(data){
$.ajax({
type: "put",
url: "<?=base_url()?>/automation/set-status",
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data) {
if (data != true) {
alert('오류가 발생하였습니다.');
}
},
error: function(error, status, msg) {
alert("상태코드 " + status + "에러메시지" + msg);
}
});
}
//검색
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
//리스트 더보기 버튼
$('#automation-table').on('click', '.btn-more', function () {
var seq = $(this).data('seq');
var currentActionList = $(this).closest('.more-action').find('.action-list');
$('.action-list').not(currentActionList).fadeOut(0);
currentActionList.fadeToggle();
});
//status 변경
$('body').on('change', '.ui-toggle input[name=status]', function() {
var isChecked = $(this).is(':checked');
var seq = $(this).val();
var status = isChecked ? 1 : 0;
data = {
'seq' : seq,
'status' : status
};
setAutomationStatus(data);
});
//복제하기
$('body').on('click', '.copy-btn', function() {
let seq = $(this).data('seq');
$.ajax({
type: "POST",
url: "<?=base_url()?>/automation/copy",
data: {'seq': seq},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
dataTable.ajax.reload();
$('#automationModal').modal('hide');
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
});
//삭제하기
$('body').on('click', '.delete-btn', function() {
let seq = $(this).data('seq');
$.ajax({
type: "DELETE",
url: "<?=base_url()?>/automation/delete",
data: {'seq': seq},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
dataTable.ajax.reload();
$('#automationModal').modal('hide');
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
});
//로그
function getLogs($seq = null){
$.fn.DataTable.ext.pager.numbers_length = 10;
logTable = $('#logTable').DataTable({
"destroy": true,
"autoWidth": false,
"processing" : true,
"serverSide" : false,
"responsive": false,
"searching": false,
"ordering": true,
"order": [[3,'desc']],
"deferRender": true,
'lengthChange': true,
'pageLength': 10,
"scrollX": true,
"info": false,
"ajax": {
"url": "<?=base_url()?>/automation/logs",
"data": function(d) {
$.extend(d, {
dates: {
'sdate': $('#log_sdate').val(),
'edate': $('#log_edate').val()
},
seq: $('input[name=log_seq]').val()
});
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
return res.data;
}
},
"columnDefs": [
{ "className": "dt-type-center", "targets": [0, 1, 2, 3] } // 특정 열 가운데 정렬
],
"columns": [
{ "data": "subject"},
{ "data": "nickname", width:"15%"},
{
"data": "result",
"width": "15%",
"render": function(data, type, row){
let result;
if(data == '실행됨'){
result = '<b class="em">'+data+'</b>';
}else if(data == '실패'){
result = '<b class="fail">'+data+'</b>';
}else{
result = data;
}
return result;
}
},
{ "data": "exec_timestamp", "width":"15%"},
],
"createdRow": function(row, data, dataIndex) {
$(row).attr("data-id", data.id);
//감사로그정보
let detailRow = `<div class="detail-log-wrap">
<h2>작업 세부 정보</h2>
<div class="detail-log">
<dl class="log-item mb-3">
<dt class="mb-1">일정</dt>
<dd>${data.schedule_desc ? data.schedule_desc : ""}</dd>
</dl>
<dl class="log-item mb-3">
<dt class="mb-1">대상</dt>
<dd>${data.target_desc ? data.target_desc : ""}</dd>
</dl>
<dl class="log-item mb-3">
<dt class="mb-1">조건</dt>
<dd>${data.conditions_desc ? data.conditions_desc : ""}</dd>
</dl>
<dl class="log-item">
<dt class="mb-1">실행</dt>
<dd>${data.executions_desc != null ? (Array.isArray(data.executions_desc) ? data.executions_desc.join('<br>') : data.executions_desc) : ""}</dd>
</dl>
</div>
</div>`;
logTable.row(row).child(detailRow).hide();
},
"language": {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"initComplete": function(settings, json) {
// 열 너비 강제 설정
$('#logTable').find('th, td').css('width', '');
}
});
}
//모달 보기
$('#logModal').on('show.bs.modal', function(e) {
let $btn = $(e.relatedTarget);
setDate();
if ($btn.hasClass('log-btn')) {
let seq = $btn.attr('data-seq');
$('input[name=log_seq]').val(seq);
let title = $btn.closest('tr').find('.updateBtn').text();
$('#logModal .modal-header h1 span').text(title+" - ");
getLogs(seq);
}else{
getLogs();
}
})//모달 닫기
.on('hidden.bs.modal', function(e) {
$('input[name=log_stx]').val('');
$('input[name=log_seq]').val('');
logTable = $('#logTable').DataTable();
logTable.destroy();
});
$('form[name="log-search-form"]').bind('submit', function() {
logTable.ajax.reload();
return false;
});
$('body').on('click', '#logModal tbody tr', function(){
var tr = $(this).closest('tr');
var row = logTable.row(tr);
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
row.child.hide();
tr.removeClass('shown');
}else {
$(this).addClass('selected');
row.child.show();
tr.addClass('shown');
}
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+479
View File
@@ -0,0 +1,479 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 게시판
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script src="/static/js/twbsPagination.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<!--content-->
<div class="container-md">
<div class="modal fade" id="modalUpdate" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">글수정</h5>
</div>
<div class="modal-body">
<form id="frm">
<input type="hidden" name="id" id="hidden_id">
<div class="form-group">
<label for="board_title">제목</label>
<input type="text" name="board_title" class="form-control" id="board_title">
<span id="board_title_error" class="text-danger"></span>
</div>
<div class="form-group">
<label for="board_description">본문</label>
<textarea name="board_description" class="form-control" id="board_description" style="min-height:300px"></textarea>
<span id="board_description_error" class="text-danger"></span>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="boardUpdateBtn">저장</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalView" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="boardUpdateModal">수정</button>
<button type="button" class="btn btn-danger" id="boardDelete">삭제</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalWrite" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">글쓰기</h5>
</div>
<div class="modal-body">
<form id="frm">
<input type="hidden" name="id" id="hidden_id">
<div class="form-group">
<label for="board_title">제목</label>
<input type="text" name="board_title" class="form-control board_title">
<span id="board_title_error" class="text-danger"></span>
</div>
<div class="form-group">
<label for="board_description">본문</label>
<textarea name="board_description" class="form-control board_description"></textarea>
<span id="board_description_error" class="text-danger"></span>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="boardInsertBtn">저장</button>
</div>
</div>
</div>
</div>
<h1 class="font-weight-bold mb-5">게시판</h1>
<div class="row mb-2 flex justify-content-end">
<div class="col-5">
<label for="fromDate">시작날짜</label>
<input type="text" class="form-control" id="fromDate" name="fromDate" placeholder="날짜 선택" readonly="readonly">
<label for="toDate">종료날짜</label>
<input type="text" class="form-control" id="toDate" name="toDate" placeholder="날짜 선택" readonly="readonly">
</div>
</div>
<div class="row mb-2">
<div class="col" id="allCount"></div>
<div class="col">
<select name="sort" id="sort" class="form-control">
<option value="recent">최근순</option>
<option value="old">오래된 순</option>
</select>
</div>
<div class="col-3">
<select name="pageLimit" id="pageLimit" class="form-control">
<option value="10">10개</option>
<option value="50">50개</option>
<option value="100">100개</option>
</select>
</div>
<div class="col-3">
<input type="text" class="form-control" id="search" name="search" placeholder="검색">
</div>
</div>
<button id="DataResetBtn" class="btn btn-primary">초기화</button>
<div class="row">
<table class="table" id="board">
<thead class="table-dark">
<tr>
<th scope="col">#</th>
<th scope="col">제목</th>
<th scope="col">생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="row pagination-container">
<ul class="pagination">
</ul>
</div>
<div class="d-grid gap-2 d-md-flex justify-content-end">
<button class="btn btn-primary" id="boardNewBtn">글쓰기</button>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('script');?>
<script>
$(document).ready(function(){
getBoardList();
function getBoardList(page, limit, search, sort, startDate, endDate){
data = {
'page': page ? page : 1,
'limit': limit ? limit : 10,
'search': search ? search : '',
'sort': sort ? sort : 'recent',
'startDate': startDate ? startDate : '',
'endDate': endDate ? endDate : '',
}
console.log(data);
$.ajax({
type: "get",
url: "<?=base_url()?>/boards",
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(xhr){
setTable(xhr);
setPaging(xhr);
setAllCount(xhr);
setDate(xhr);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setPaging(xhr){
if(xhr.pager.pageCount == 0){
xhr.pager.pageCount = 1;
}
$('.pagination').twbsPagination('destroy');
$('.pagination').twbsPagination({
totalPages: xhr.pager.pageCount, // 총 페이지 번호 수
visiblePages: 5, // 하단에서 한번에 보여지는 페이지 번호 수
startPage : xhr.pager.currentPage, // 시작시 표시되는 현재 페이지
initiateStartPageClick: false, // 플러그인이 시작시 페이지 버튼 클릭 여부 (default : true)
first : "첫 페이지", // 페이지네이션 버튼중 처음으로 돌아가는 버튼에 쓰여 있는 텍스트
prev : "이전 페이지", // 이전 페이지 버튼에 쓰여있는 텍스트
next : "다음 페이지", // 다음 페이지 버튼에 쓰여있는 텍스트
last : "마지막 페이지", // 페이지네이션 버튼중 마지막으로 가는 버튼에 쓰여있는 텍스트
nextClass : "page-item next", // 이전 페이지 CSS class
prevClass : "page-item prev", // 다음 페이지 CSS class
lastClass : "page-item last", // 마지막 페이지 CSS calss
firstClass : "page-item first", // 첫 페이지 CSS class
pageClass : "page-item", // 페이지 버튼의 CSS class
activeClass : "active", // 클릭된 페이지 버튼의 CSS class
disabledClass : "disabled", // 클릭 안된 페이지 버튼의 CSS class
anchorClass : "page-link", //버튼 안의 앵커에 대한 CSS class
onPageClick: function (event, page) {
console.log(xhr.pager.limit);
getBoardList(page, xhr.pager.limit, xhr.pager.search, xhr.pager.sort, xhr.pager.startDate, xhr.pager.endDate)
}
});
}
function setTable(xhr){
$('#board tbody').empty();
$.each(xhr.result, function(index, item){
index++
$('<tr id="boardView" data-id="'+item.bdx+'">').append('<td>'+item.bdx+'</td>')
.append('<td>'+item.board_title+'</td>')
.append('<td>'+item.created_at+'</td>')
.appendTo('#board');
});
}
function setAllCount(xhr){
console.log(xhr.pager.total);
if(xhr.pager.total == 0){
$total = 0;
}else{
$total = xhr.pager.total;
}
$('#allCount').text("총 "+$total+"개");
}
function setDate(xhr){
if($('#fromDate, #toDate').length){
var currentDate = moment().format("YYYY-MM-DD");
$('#fromDate, #toDate').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
"alwaysShowCalendars": true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $('#fromDate');
$checkoutInput = $('#toDate');
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
getBoardList(1, $('#pageLimit').val(), $('#search').val(), $('#sort').val(), startDate, endDate);
});
}
}
//페이지 게시글 갯수
$('body').on('change', '#pageLimit', function(){
getBoardList(
1,
$(this).val(),
$('#search').val(),
$('#sort').val(),
$('#fromDate').val(),
$('#toDate').val(),
);
})
//검색
$('body').on('keyup', '#search', function(){
getBoardList(
1,
$('#pageLimit').val(),
$(this).val(),
$('#sort').val(),
$('#fromDate').val(),
$('#toDate').val(),
);
})
//분류
$('body').on('change', '#sort', function(){
getBoardList(
1,
$('#pageLimit').val(),
$('#search').val(),
$(this).val(),
$('#fromDate').val(),
$('#toDate').val(),
);
})
$('#dateRange').on('cancel.daterangepicker', function (ev, picker) {
$(this).val('');
getBoardList(1, $('#pageLimit').val(), $('#search').val(), $('#sort').val());
});
//글쓰기 버튼
$('body').on('click', '#boardNewBtn', function(){
$('#modalWrite #frm').trigger("reset");
var myModal = new bootstrap.Modal(document.getElementById('modalWrite'))
myModal.show()
})
//저장 버튼
$('body').on('click', '#boardInsertBtn', function(){
data = {
board_title: $('#modalWrite input:text[name=board_title]').val(),
board_description: $('#modalWrite textarea[name=board_description]').val(),
};
console.log(data);
$.ajax({
type: "post",
url: "<?=base_url()?>/boards",
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
headers:{'X-Requested-With':'XMLHttpRequest'},
success: function(response){
$('#modalWrite').modal('hide');
$('#modalWrite').find('input').val('');
$('#modalWrite #frm span').text('');
getBoardList();
console.log(response);
},
error: function(error){
var errorText = error.responseJSON.messages;
$.each(errorText, function(key, val){
$("#modalWrite #" + key + "_error").text(val);
})
}
});
})
//글보기
$('body').on('click', '#boardView', function(){
let id = $(this).attr('data-id');
$.ajax({
type: "get",
url: "<?=base_url()?>/boards/"+id,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#modalView .modal-title').html(data.result.board_title);
$('#modalView .modal-body').html(data.result.board_description);
$('#modalView #boardUpdateModal').attr('data-id', data.result.bdx);
$('#modalView #boardDelete').attr('data-id', data.result.bdx);
var myModal = new bootstrap.Modal(document.getElementById('modalView'))
myModal.show()
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
//글수정
$('body').on('click', '#boardUpdateModal', function(){
$('#modalView').modal('hide');
let id = $(this).attr('data-id');
$.ajax({
type: "get",
url: "<?=base_url()?>/boards/"+id,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#modalUpdate #board_title').val(data.result.board_title);
$('#modalUpdate #board_description').val(data.result.board_description);
$('#modalUpdate #hidden_id').val(data.result.bdx);
$('#modalUpdate #frm span').text('');
var myModal = new bootstrap.Modal(document.getElementById('modalUpdate'))
myModal.show()
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
//글수정
$('body').on('click', '#boardUpdateBtn', function(){
let id = $("#modalUpdate input:hidden[name=id]").val();
data = {
//file: $('.file').val(),
board_title: $('#modalUpdate input:text[name=board_title]').val(),
board_description: $('#modalUpdate textarea[name=board_description]').val(),
};
console.log(data);
$.ajax({
type: "put",
url: "<?=base_url()?>/boards/"+id,
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
headers:{'X-Requested-With':'XMLHttpRequest'},
success: function(response){
$('#modalUpdate').modal('hide');
$('#modalUpdate').find('input').val('');
$('#modalUpdate #frm span').text('');
getBoardList();
console.log(response);
},
error: function(error){
var errorText = error.responseJSON.messages;
$.each(errorText, function(key, val){
$("#modalWrite #" + key + "_error").text(val);
})
}
});
})
//글삭제
$('body').on('click', '#boardDelete', function(){
let id = $(this).attr('data-id');
if(confirm('정말 삭제하시겠습니까?')){
$.ajax({
type: "delete",
url: "<?=base_url()?>/boards/"+id,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#modalView').modal('hide');
getBoardList();
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
})
$('body').on('keyup', '.board_title', function(){
$(this).siblings('span').text("");
});
$('body').on('keyup', '.board_description', function(){
$(this).siblings('span').text("");
});
$('body').on('click', '#DataResetBtn', function(){
$('#sort option:first').prop('selected',true);
$('#pageLimit option:first').prop('selected',true);
$('#fromDate').val('');
$('#toDate').val('');
$('#search').val('');
getBoardList();
})
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+903
View File
@@ -0,0 +1,903 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 광고주/광고대행사 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-select-bs5/css/select.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<style>
.ui-autocomplete{
z-index: 10000000;
max-height: 300px;
overflow-y: auto; /* prevent horizontal scrollbar */
overflow-x: hidden;
}
hr{
display: block !important;
}
.ui-widget{
font-family: "NanumSquareNeo", "Noto Sans", dotum, Gulim, sans-serif;
}
.modal .dataTable{
width: 100% !important;
}
#create-button-wrap {
display:flex;
justify-content:flex-end;
}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap company-contaniner">
<div class="title-area">
<h2 class="page-title">광고주/광고대행사 관리</h2>
<!-- <p class="title-disc">내가 더 멀리 보았다면 이는 거인들의 어깨 위에 올라 서있었기 때문이다.</p> -->
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="position-relative">
<div id="create-button-wrap">
<button id="create-btn-modal" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#adv-create">등록</button>
</div>
<div class="row table-responsive">
<table class="dataTable table table-striped table-hover table-default" id="deviceTable">
<thead class="table-dark">
<tr>
<th scope="col">#</th>
<th scope="col">소속대행사</th>
<th scope="col">타입</th>
<th scope="col">이름</th>
<th scope="col">작성자</th>
<th scope="col">생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!--광고대행사 정보, 소속 수정-->
<div class="modal fade" id="adv-show" tabindex="-1" aria-labelledby="adv-show-label" aria-hidden="true">
<div class="modal-dialog modal-lg sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="adv-show-label"><i class="bi bi-file-text"></i> <span class="title">광고주/광고대행사</span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div>
<h2 class="body-title">광고대행사/광고주 정보 수정</h2>
<form name="adv-show-form" class="adv-show-form">
<table class="table table-bordered table-modal adv-show-table" id="adv-show-table">
<colgroup>
<col style="width:15%;">
<col style="width:25%;">
<col style="width:25%;">
<col style="width:15%;">
<col style="width:20%;">
<!-- <col style="width:*;"> -->
</colgroup>
<thead>
<tr>
<th scope="col">타입</th>
<th scope="col">소속대행사</th>
<th scope="col">이름</th>
<th scope="col">작성자</th>
<th scope="col">생성일</th>
<!-- <th scope="col"></th> -->
</tr>
</thead>
<tbody>
<tr>
<td id="type">
<span></span>
</td>
<td id="p_name" class="p_name">
<input type="hidden" name="id">
<input type="hidden" name="p_id">
<input type="text" name="p_name" class="form-control" id="show-p_name" autocomplete="off">
</td>
<td id="name">
<input type="text" name="name" class="form-control">
</td>
<td id="nickname">
<span></span>
</td>
<td id="created_at">
<span></span>
</td>
<!-- <td id="btns" class="d-flex">
<button class="btn btn-primary" id="modify_btn" type="submit">수정</button>
<button class="btn btn-danger" id="delete_btn" type="button">삭제</button>
</td> -->
</tr>
</tbody>
</table>
<div id="btns" class="d-flex" style="display:flex;justify-content:center;">
<button class="btn btn-primary" id="modify_btn" type="submit">수정</button>
<button class="btn btn-danger ml5" id="delete_btn" type="button">삭제</button>
</div>
</form>
</div>
<hr class="my-5">
<div>
<h2 class="body-title">매체별 연결 광고주</h2>
<form name="adaccount-form" class="form-search-wrap">
<div class="adaccount-search" id="adaccount-table">
<h3>연결 광고주 검색/추가</h3>
<div class="ada-search-box" id="adaccount">
<input type="hidden" name="company_id">
<input type="hidden" name="ad_account_id">
<input type="text" name="ad_account_name" class="form-control" id="show-adaccount" autocomplete="off">
<input type="text" style="display:none">
</div>
</div>
</form>
<!--매체별 연결 광고주 리스트-->
<table class="table table-bordered table-modal adv-show-table adAccountListTable" id="adAccountListTable">
<thead>
<tr>
<th class="first">#</th>
<th>아이디</th>
<th>매체</th>
<th>광고주 이름</th>
<th>상태</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<!-- 매체별 연결 광고주 리스트-->
</div>
<hr class="my-5">
<div>
<h2 class="body-title">소속 사용자</h2>
<form name="belong-user-form" class="form-search-wrap">
<div class="adaccount-search" id="belong-user-table">
<h3>사용자 검색/추가</h3>
<div class="ada-search-box" id="username">
<input type="hidden" name="company_id">
<input type="hidden" name="user_id">
<input type="text" name="username" class="form-control" id="show-user-name" autocomplete="off">
<input type="text" style="display:none">
</div>
</div>
</form>
<!--유저리스트-->
<table class="table table-bordered table-modal adv-show-table userTable" id="userTable">
<thead>
<tr>
<th class="first">#</th>
<th>아이디</th>
<th>이름</th>
<th>생성일</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<!--유저리스트-->
</div>
</div>
</div>
</div>
</div>
<!--광고대행사 정보, 소속 수정-->
<!--광고대행사 생성-->
<div class="modal fade" id="adv-create" tabindex="-1" aria-labelledby="adv-create-label" aria-hidden="true">
<div class="modal-dialog modal-lg sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="adv-create-label"><i class="bi bi-file-text"></i> <span class="title">광고주/광고대행사</span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<form name="adv-create-form">
<table class="table table-bordered table-modal" id="adv-create-table">
<colgroup>
<col style="width:30%;">
<col style="width:30%;">
<col style="width:40%;">
</colgroup>
<thead>
<tr>
<th scope="col">타입</th>
<th scope="col">소속대행사</th>
<th scope="col">이름</th>
</tr>
</thead>
<tbody>
<tr>
<td id="type">
<select name="type" id="" class="form-select">
<option value="광고대행사">광고대행사</option>
<option value="광고주">광고주</option>
</select>
</td>
<td id="p_name">
<input type="text" name="p_name" class="form-control" id="create-p_name" autocomplete="off">
</td>
<td id="name">
<input type="text" name="name" class="form-control">
</td>
</tr>
</tbody>
</table>
<div class="float-end"><button class="btn btn-primary" id="create_btn" type="submit">생성</button></div>
</form>
</div>
</div>
</div>
</div>
</div>
<!--생성-->
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('script');?>
<script>
let data = {};
let dataTable;
let userTable;
let adaccountTable;
let companyId;
getCompanyList();
function setData() {
data = {
'stx': $('#stx').val(),
};
return data;
}
function getCompanyList(){
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#deviceTable').DataTable({
"dom": '<r<t>ip>',
"autoWidth": true,
"fixedHeader": true,
"order": [[5, 'desc']],
"columnDefs": [
{ targets: [0], orderable: false},
],
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": true,
"scrollX": true,
"deferRender": false,
"lengthMenu": [
[ 25, 10, 50, -1 ],
[ '25개', '10개', '50개', '전체' ]
],
"ajax": {
"url": "<?=base_url()?>/company/get-companies",
"data": function(d) {
d.searchData = setData();
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columns": [
{ "data": null },
{ "data": "p_name"},
{ "data": "type"},
{ "data": "name" },
{ "data": "nickname" },
{
"data": "created_at",
"render": function(data){
return data.substr(0, 10);
}
},
],
"createdRow": function(row, data, dataIndex) {
$(row).attr("data-id", data.id);
$(row).attr("data-bs-toggle", "modal");
$(row).attr("data-bs-target", "#adv-show");
},
"language": {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
function getBelongUsers(){
userTable = $('#userTable').DataTable({
"destroy": true,
"autoWidth": true,
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": false,
"deferRender": false,
"paging": false,
"info": false,
"ajax": {
"url": "<?=base_url()?>/company/get-belong-users",
"data": {"company_id": companyId},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
return res;
}
},
"columns": [
{ "data": null, "width": "10%"},
{ "data": "username", "width": "30%"},
{ "data": "nickname", "width": "30%"},
{
"data": "created_at",
"width": "20%",
"render": function(data){
return data.substr(0, 10);
}
},
{
"data": "null",
"width": "10%",
"render": function(){
return '<button class="btn btn-danger" id="exceptUserBelongBtn">제외</button>';
}
},
],
"createdRow": function(row, data, dataIndex) {
$(row).attr("data-id", data.id);
},
"language": {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
},
});
}
function getCompanyAdAccounts(){
adaccountTable = $('#adAccountListTable').DataTable({
"destroy": true,
"autoWidth": true,
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": false,
"deferRender": false,
"paging": false,
"info": false,
"ajax": {
"url": "<?=base_url()?>/company/get-company-adaccounts",
"data": {"company_id": companyId},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
"dataSrc": function(res){
return res;
}
},
"columns": [
{ "data": null, "width": "8%"},
{ "data": "accountId", "width": "30%"},
{
"data": "media",
"width": "20%",
"render": function(data){
switch (data) {
case 'facebook':
media = '페이스북';
break;
case 'google':
media = '구글';
break;
case 'kakao':
media = '카카오';
break;
default:
break;
}
return media;
}
},
{ "data": "name", "width": "20%"},
{ "data": "status", "width": "10%"},
{
"data": "null",
"width": "10%",
"render": function(){
return '<button class="btn btn-danger" id="exceptAdAccountBtn">제외</button>';
}
},
],
"createdRow": function(row, data, dataIndex) {
$(row).attr("data-accountid", data.media+"_"+data.accountId);
},
"language": {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
},
});
}
function setCompanyShow(data) {
$('#adv-show-title').text(data.name);
$('#adv-show-table #p_name input[name="id"]').val(data.id);
$('#adv-show-table #p_name input[type="text"]').val(data.p_name);
$('#adv-show-table #type span').text(data.type);
$('#adv-show-table #name input').val(data.name);
$('#adv-show-table #nickname span').text(data.nickname);
$('#adv-show-table #created_at span').text(data.created_at.substr(0, 10));
$('#adv-show-table #btns #delete_btn').val(data.id);
$('#belong-user-table #username input[name="company_id"]').val(data.id);
$('#adaccount-table #adaccount input[name="company_id"]').val(data.id);
}
function updateCompany(data){
$.ajax({
url : "/company/set-company",
type : "PUT",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("변경되었습니다.");
$('#adv-show').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function createCompany(data){
$.ajax({
url : "/company/create-company",
type : "POST",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("생성되었습니다.");
$('#adv-create').modal('hide');
}else if(data === "duplicate"){
alert("중복된 이름입니다.");
}else if(data === false){
alert("생성에 실패하였습니다.\n개발팀에 문의 주세요.");
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function addBelongUser(data){
$.ajax({
url : "/company/set-belong-user",
type : "put",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
alert("추가되었습니다.");
userTable.draw();
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function addAdAccount(data){
$.ajax({
url : "/company/set-adaccounts",
type : "PUT",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
alert("추가되었습니다.");
adaccountTable.draw();
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function getAgencies(inputId){
$(inputId).autocomplete({
source : function(request, response) {
$.ajax({
url : "/company/get-search-agencies",
type : "GET",
dataType: "JSON",
data : {'stx': request.term},
contentType: 'application/json; charset=utf-8',
success : function(data){
response(
$.map(data, function(item) {
return {
label: item.name,
value: item.name,
};
})
);
}
,error : function(){
alert("에러 발생");
}
});
}
,focus : function(event, ui) {
return false;
},
minLength: 1,
autoFocus : true,
delay: 100
});
}
function getUsers(){
$('#show-user-name').autocomplete({
source : function(request, response) {
$.ajax({
url : "/company/get-search-users",
type : "GET",
dataType: "JSON",
data : {'stx': request.term},
contentType: 'application/json; charset=utf-8',
success : function(data){
response(
$.map(data, function(item) {
return {
label: item.username+"("+item.nickname+")",
value: item.username,
id: item.id
};
})
);
}
,error : function(){
alert("에러 발생");
}
});
},
select: function(event, ui) {
$(event.target).val(ui.item.value);
$(event.target).siblings('input[name="user_id"]').val(ui.item.id);
$(event.target).closest('form[name="belong-user-form"]').trigger('submit');
},
focus : function(event, ui) {
return false;
},
minLength: 1,
autoFocus : true,
delay: 100
});
}
function getAdAccounts(){
$('#show-adaccount').autocomplete({
source : function(request, response) {
$.ajax({
url : "/company/get-search-adaccounts",
type : "GET",
dataType: "JSON",
data : {'stx': request.term},
contentType: 'application/json; charset=utf-8',
success : function(data){
response(
$.map(data, function(item) {
// let media;
switch (item.media) {
case 'facebook':
media = '페이스북';
break;
case 'google':
media = '구글';
break;
case 'kakao':
media = '카카오';
break;
default:
break;
}
return {
label: media+" / "+item.account_id+" / "+item.name+" / "+item.status,
value: item.name,
id: item.media+"_"+item.account_id,
};
})
);
}
,error : function(){
alert("에러 발생");
}
});
},
select: function(event, ui) {
$(event.target).val(ui.item.value);
$(event.target).siblings('input[name="ad_account_id"]').val(ui.item.id);
$(event.target).closest('form[name="adaccount-form"]').trigger('submit');
},
focus : function(event, ui) {
return false;
},
minLength: 2,
autoFocus : true,
delay: 100
});
}
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
$('#adv-create').on('hidden.bs.modal', function(e) { //modal Reset
$('form[name="adv-create-form"]')[0].reset();
});
$('#adv-show').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
var id = $btn.data('id');
$(this).attr('data-id', id);
companyId = id;
$.ajax({
type: "get",
url: "<?=base_url()?>/company/get-company",
data: {'id': id},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setCompanyShow(data);
getBelongUsers(companyId);
getCompanyAdAccounts(companyId);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
.on('hidden.bs.modal', function(e) { //modal Reset
companyId = '';
$(this).removeAttr('data-id');
$('#userTable').DataTable().destroy();
$('#adAccountListTable').DataTable().destroy();
$('#adAccountListTable tbody').empty();
$('#userTable tbody').empty();
$('form[name="adv-show-form"]')[0].reset();
$('form[name="adaccount-form"]')[0].reset();
$('form[name="belong-user-form"]')[0].reset();
$('#adv-show-table tbody tr td span').text('');
});
$('#show-p_name').on("focus", function(){
getAgencies("#show-p_name");
})
$('#create-p_name').on("focus", function(){
getAgencies("#create-p_name");
})
$('#show-user-name').on("focus", function(){
getUsers();
})
$('#show-adaccount').on("focus", function(){
getAdAccounts();
})
$('form[name="adv-show-form"]').bind('submit', function() {
var data = $(this).serialize();
updateCompany(data);
return false;
});
$('form[name="adv-create-form"]').bind('submit', function() {
var data = $(this).serialize();
createCompany(data);
return false;
});
$('form[name="belong-user-form"]').bind('submit', function() {
var data = $(this).serialize();
addBelongUser(data);
return false;
});
$('form[name="adaccount-form"]').bind('submit', function() {
var data = $(this).serialize();
addAdAccount(data);
return false;
});
$('body').on('click', '#exceptUserBelongBtn', function(){
data = {
'company_id': $('#adv-show').attr('data-id'),
'user_id': $(this).closest('tr').attr('data-id'),
};
if(confirm('현재 소속에서 제외하시겠습니까?')){
$.ajax({
type: "delete",
url: "<?=base_url()?>/company/except-belong-user",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
getBelongUsers(companyId);
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
});
$('body').on('click', '#exceptAdAccountBtn', function(){
data = {
'company_id': $('#adv-show').attr('data-id'),
'ad_account_id': $(this).closest('tr').attr('data-accountid'),
};
if(confirm('현재 소속에서 제외하시겠습니까?')){
$.ajax({
type: "delete",
url: "<?=base_url()?>/company/except-company-adaccount",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
getCompanyAdAccounts(companyId);
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
});
$('body').on('click', '#exceptUserBelongBtn', function(){
data = {
'company_id': $('#adv-show').attr('data-id'),
'user_id': $(this).closest('tr').attr('data-id'),
};
if(confirm('현재 소속에서 제외하시겠습니까?')){
$.ajax({
type: "delete",
url: "<?=base_url()?>/company/except-belong-user",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
getBelongUsers(companyId);
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
})
$('body').on('click', '#delete_btn', function(){
let id = $(this).val();
if(confirm('정말 삭제하시겠습니까?')){
$.ajax({
type: "delete",
url: "<?=base_url()?>/company/delete-company",
dataType: "JSON",
data : {'id': id},
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
dataTable.draw();
alert("삭제되었습니다.");
$('#adv-show').modal('hide');
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
})
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+7
View File
@@ -0,0 +1,7 @@
<?php
use CodeIgniter\CLI\CLI;
CLI::error('ERROR: ' . $code);
CLI::write($message);
CLI::newLine();
+65
View File
@@ -0,0 +1,65 @@
<?php
use CodeIgniter\CLI\CLI;
// The main Exception
CLI::newLine();
CLI::write('[' . get_class($exception) . ']', 'light_gray', 'red');
CLI::newLine();
CLI::write($message);
CLI::newLine();
CLI::write('at ' . CLI::color(clean_path($exception->getFile()) . ':' . $exception->getLine(), 'green'));
CLI::newLine();
// The backtrace
if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
$backtraces = $exception->getTrace();
if ($backtraces) {
CLI::write('Backtrace:', 'green');
}
foreach ($backtraces as $i => $error) {
$padFile = ' '; // 4 spaces
$padClass = ' '; // 7 spaces
$c = str_pad($i + 1, 3, ' ', STR_PAD_LEFT);
if (isset($error['file'])) {
$filepath = clean_path($error['file']) . ':' . $error['line'];
CLI::write($c . $padFile . CLI::color($filepath, 'yellow'));
} else {
CLI::write($c . $padFile . CLI::color('[internal function]', 'yellow'));
}
$function = '';
if (isset($error['class'])) {
$type = ($error['type'] === '->') ? '()' . $error['type'] : $error['type'];
$function .= $padClass . $error['class'] . $type . $error['function'];
} elseif (! isset($error['class']) && isset($error['function'])) {
$function .= $padClass . $error['function'];
}
$args = implode(', ', array_map(static function ($value) {
switch (true) {
case is_object($value):
return 'Object(' . get_class($value) . ')';
case is_array($value):
return count($value) ? '[...]' : '[]';
case $value === null:
return 'null'; // return the lowercased version
default:
return var_export($value, true);
}
}, array_values($error['args'] ?? [])));
$function .= '(' . $args . ')';
CLI::write($function);
CLI::newLine();
}
}
+5
View File
@@ -0,0 +1,5 @@
<?php
// On the CLI, we still want errors in productions
// so just use the exception template.
include __DIR__ . '/error_exception.php';
+197
View File
@@ -0,0 +1,197 @@
:root {
--main-bg-color: #fff;
--main-text-color: #555;
--dark-text-color: #222;
--light-text-color: #c7c7c7;
--brand-primary-color: #E06E3F;
--light-bg-color: #ededee;
--dark-bg-color: #404040;
}
body {
height: 100%;
background: var(--main-bg-color);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
color: var(--main-text-color);
font-weight: 300;
margin: 0;
padding: 0;
}
h1 {
font-weight: lighter;
letter-spacing: 0.8;
font-size: 3rem;
color: var(--dark-text-color);
margin: 0;
}
h1.headline {
margin-top: 20%;
font-size: 5rem;
}
.text-center {
text-align: center;
}
p.lead {
font-size: 1.6rem;
}
.container {
max-width: 75rem;
margin: 0 auto;
padding: 1rem;
}
.header {
background: var(--light-bg-color);
color: var(--dark-text-color);
}
.header .container {
padding: 1rem 1.75rem 1.75rem 1.75rem;
}
.header h1 {
font-size: 2.5rem;
font-weight: 500;
}
.header p {
font-size: 1.2rem;
margin: 0;
line-height: 2.5;
}
.header a {
color: var(--brand-primary-color);
margin-left: 2rem;
display: none;
text-decoration: none;
}
.header:hover a {
display: inline;
}
.footer {
background: var(--dark-bg-color);
color: var(--light-text-color);
}
.footer .container {
border-top: 1px solid #e7e7e7;
margin-top: 1rem;
text-align: center;
}
.source {
background: #343434;
color: var(--light-text-color);
padding: 0.5em 1em;
border-radius: 5px;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: 0.85rem;
margin: 0;
overflow-x: scroll;
}
.source span.line {
line-height: 1.4;
}
.source span.line .number {
color: #666;
}
.source .line .highlight {
display: block;
background: var(--dark-text-color);
color: var(--light-text-color);
}
.source span.highlight .number {
color: #fff;
}
.tabs {
list-style: none;
list-style-position: inside;
margin: 0;
padding: 0;
margin-bottom: -1px;
}
.tabs li {
display: inline;
}
.tabs a:link,
.tabs a:visited {
padding: 0rem 1rem;
line-height: 2.7;
text-decoration: none;
color: var(--dark-text-color);
background: var(--light-bg-color);
border: 1px solid rgba(0,0,0,0.15);
border-bottom: 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
display: inline-block;
}
.tabs a:hover {
background: var(--light-bg-color);
border-color: rgba(0,0,0,0.15);
}
.tabs a.active {
background: var(--main-bg-color);
color: var(--main-text-color);
}
.tab-content {
background: var(--main-bg-color);
border: 1px solid rgba(0,0,0,0.15);
}
.content {
padding: 1rem;
}
.hide {
display: none;
}
.alert {
margin-top: 2rem;
display: block;
text-align: center;
line-height: 3.0;
background: #d9edf7;
border: 1px solid #bcdff1;
border-radius: 5px;
color: #31708f;
}
ul, ol {
line-height: 1.8;
}
table {
width: 100%;
overflow: hidden;
}
th {
text-align: left;
border-bottom: 1px solid #e7e7e7;
padding-bottom: 0.5rem;
}
td {
padding: 0.2rem 0.5rem 0.2rem 0;
}
tr:hover td {
background: #f1f1f1;
}
td pre {
white-space: pre-wrap;
}
.trace a {
color: inherit;
}
.trace table {
width: auto;
}
.trace tr td:first-child {
min-width: 5em;
font-weight: bold;
}
.trace td {
background: var(--light-bg-color);
padding: 0 1rem;
}
.trace td pre {
margin: 0;
}
.args {
display: none;
}
+116
View File
@@ -0,0 +1,116 @@
var tabLinks = new Array();
var contentDivs = new Array();
function init()
{
// Grab the tab links and content divs from the page
var tabListItems = document.getElementById('tabs').childNodes;
console.log(tabListItems);
for (var i = 0; i < tabListItems.length; i ++)
{
if (tabListItems[i].nodeName == "LI")
{
var tabLink = getFirstChildWithTagName(tabListItems[i], 'A');
var id = getHash(tabLink.getAttribute('href'));
tabLinks[id] = tabLink;
contentDivs[id] = document.getElementById(id);
}
}
// Assign onclick events to the tab links, and
// highlight the first tab
var i = 0;
for (var id in tabLinks)
{
tabLinks[id].onclick = showTab;
tabLinks[id].onfocus = function () {
this.blur()
};
if (i == 0)
{
tabLinks[id].className = 'active';
}
i ++;
}
// Hide all content divs except the first
var i = 0;
for (var id in contentDivs)
{
if (i != 0)
{
console.log(contentDivs[id]);
contentDivs[id].className = 'content hide';
}
i ++;
}
}
function showTab()
{
var selectedId = getHash(this.getAttribute('href'));
// Highlight the selected tab, and dim all others.
// Also show the selected content div, and hide all others.
for (var id in contentDivs)
{
if (id == selectedId)
{
tabLinks[id].className = 'active';
contentDivs[id].className = 'content';
}
else
{
tabLinks[id].className = '';
contentDivs[id].className = 'content hide';
}
}
// Stop the browser following the link
return false;
}
function getFirstChildWithTagName(element, tagName)
{
for (var i = 0; i < element.childNodes.length; i ++)
{
if (element.childNodes[i].nodeName == tagName)
{
return element.childNodes[i];
}
}
}
function getHash(url)
{
var hashPos = url.lastIndexOf('#');
return url.substring(hashPos + 1);
}
function toggle(elem)
{
elem = document.getElementById(elem);
if (elem.style && elem.style['display'])
{
// Only works with the "style" attr
var disp = elem.style['display'];
}
else if (elem.currentStyle)
{
// For MSIE, naturally
var disp = elem.currentStyle['display'];
}
else if (window.getComputedStyle)
{
// For most other browsers
var disp = document.defaultView.getComputedStyle(elem, null).getPropertyValue('display');
}
// Toggle the state of the "display" style
elem.style.display = disp == 'block' ? 'none' : 'block';
return false;
}
+84
View File
@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?= lang('Errors.pageNotFound') ?></title>
<style>
div.logo {
height: 200px;
width: 155px;
display: inline-block;
opacity: 0.08;
position: absolute;
top: 2rem;
left: 50%;
margin-left: -73px;
}
body {
height: 100%;
background: #fafafa;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #777;
font-weight: 300;
}
h1 {
font-weight: lighter;
letter-spacing: normal;
font-size: 3rem;
margin-top: 0;
margin-bottom: 0;
color: #222;
}
.wrap {
max-width: 1024px;
margin: 5rem auto;
padding: 2rem;
background: #fff;
text-align: center;
border: 1px solid #efefef;
border-radius: 0.5rem;
position: relative;
}
pre {
white-space: normal;
margin-top: 1.5rem;
}
code {
background: #fafafa;
border: 1px solid #efefef;
padding: 0.5rem 1rem;
border-radius: 5px;
display: block;
}
p {
margin-top: 1.5rem;
}
.footer {
margin-top: 2rem;
border-top: 1px solid #efefef;
padding: 1em 2em 0 2em;
font-size: 85%;
color: #999;
}
a:active,
a:link,
a:visited {
color: #dd4814;
}
</style>
</head>
<body>
<div class="wrap">
<h1>404</h1>
<p>
<?php if (ENVIRONMENT !== 'production') : ?>
<?= nl2br(esc($message)) ?>
<?php else : ?>
<?= lang('Errors.sorryCannotFind') ?>
<?php endif ?>
</p>
</div>
</body>
</html>
+397
View File
@@ -0,0 +1,397 @@
<?php $error_id = uniqid('error', true); ?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="robots" content="noindex">
<title><?= esc($title) ?></title>
<style>
<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?>
</style>
<script>
<?= file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.js') ?>
</script>
</head>
<body onload="init()">
<!-- Header -->
<div class="header">
<div class="container">
<h1><?= esc($title), esc($exception->getCode() ? ' #' . $exception->getCode() : '') ?></h1>
<p>
<?= nl2br(esc($exception->getMessage())) ?>
<a href="https://www.duckduckgo.com/?q=<?= urlencode($title . ' ' . preg_replace('#\'.*\'|".*"#Us', '', $exception->getMessage())) ?>"
rel="noreferrer" target="_blank">search &rarr;</a>
</p>
</div>
</div>
<!-- Source -->
<div class="container">
<p><b><?= esc(clean_path($file)) ?></b> at line <b><?= esc($line) ?></b></p>
<?php if (is_file($file)) : ?>
<div class="source">
<?= static::highlightFile($file, $line, 15); ?>
</div>
<?php endif; ?>
</div>
<div class="container">
<ul class="tabs" id="tabs">
<li><a href="#backtrace">Backtrace</a></li>
<li><a href="#server">Server</a></li>
<li><a href="#request">Request</a></li>
<li><a href="#response">Response</a></li>
<li><a href="#files">Files</a></li>
<li><a href="#memory">Memory</a></li>
</ul>
<div class="tab-content">
<!-- Backtrace -->
<div class="content" id="backtrace">
<ol class="trace">
<?php foreach ($trace as $index => $row) : ?>
<li>
<p>
<!-- Trace info -->
<?php if (isset($row['file']) && is_file($row['file'])) :?>
<?php
if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once'], true)) {
echo esc($row['function'] . ' ' . clean_path($row['file']));
} else {
echo esc(clean_path($row['file']) . ' : ' . $row['line']);
}
?>
<?php else: ?>
{PHP internal code}
<?php endif; ?>
<!-- Class/Method -->
<?php if (isset($row['class'])) : ?>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;<?= esc($row['class'] . $row['type'] . $row['function']) ?>
<?php if (! empty($row['args'])) : ?>
<?php $args_id = $error_id . 'args' . $index ?>
( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> )
<div class="args" id="<?= esc($args_id, 'attr') ?>">
<table cellspacing="0">
<?php
$params = null;
// Reflection by name is not available for closure function
if (substr($row['function'], -1) !== '}') {
$mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']);
$params = $mirror->getParameters();
}
foreach ($row['args'] as $key => $value) : ?>
<tr>
<td><code><?= esc(isset($params[$key]) ? '$' . $params[$key]->name : "#{$key}") ?></code></td>
<td><pre><?= esc(print_r($value, true)) ?></pre></td>
</tr>
<?php endforeach ?>
</table>
</div>
<?php else : ?>
()
<?php endif; ?>
<?php endif; ?>
<?php if (! isset($row['class']) && isset($row['function'])) : ?>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp; <?= esc($row['function']) ?>()
<?php endif; ?>
</p>
<!-- Source? -->
<?php if (isset($row['file']) && is_file($row['file']) && isset($row['class'])) : ?>
<div class="source">
<?= static::highlightFile($row['file'], $row['line']) ?>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ol>
</div>
<!-- Server -->
<div class="content" id="server">
<?php foreach (['_SERVER', '_SESSION'] as $var) : ?>
<?php
if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) {
continue;
} ?>
<h3>$<?= esc($var) ?></h3>
<table>
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<?php foreach ($GLOBALS[$var] as $key => $value) : ?>
<tr>
<td><?= esc($key) ?></td>
<td>
<?php if (is_string($value)) : ?>
<?= esc($value) ?>
<?php else: ?>
<pre><?= esc(print_r($value, true)) ?></pre>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endforeach ?>
<!-- Constants -->
<?php $constants = get_defined_constants(true); ?>
<?php if (! empty($constants['user'])) : ?>
<h3>Constants</h3>
<table>
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<?php foreach ($constants['user'] as $key => $value) : ?>
<tr>
<td><?= esc($key) ?></td>
<td>
<?php if (is_string($value)) : ?>
<?= esc($value) ?>
<?php else: ?>
<pre><?= esc(print_r($value, true)) ?></pre>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
<!-- Request -->
<div class="content" id="request">
<?php $request = \Config\Services::request(); ?>
<table>
<tbody>
<tr>
<td style="width: 10em">Path</td>
<td><?= esc($request->getUri()) ?></td>
</tr>
<tr>
<td>HTTP Method</td>
<td><?= esc(strtoupper($request->getMethod())) ?></td>
</tr>
<tr>
<td>IP Address</td>
<td><?= esc($request->getIPAddress()) ?></td>
</tr>
<tr>
<td style="width: 10em">Is AJAX Request?</td>
<td><?= $request->isAJAX() ? 'yes' : 'no' ?></td>
</tr>
<tr>
<td>Is CLI Request?</td>
<td><?= $request->isCLI() ? 'yes' : 'no' ?></td>
</tr>
<tr>
<td>Is Secure Request?</td>
<td><?= $request->isSecure() ? 'yes' : 'no' ?></td>
</tr>
<tr>
<td>User Agent</td>
<td><?= esc($request->getUserAgent()->getAgentString()) ?></td>
</tr>
</tbody>
</table>
<?php $empty = true; ?>
<?php foreach (['_GET', '_POST', '_COOKIE'] as $var) : ?>
<?php
if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) {
continue;
} ?>
<?php $empty = false; ?>
<h3>$<?= esc($var) ?></h3>
<table style="width: 100%">
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<?php foreach ($GLOBALS[$var] as $key => $value) : ?>
<tr>
<td><?= esc($key) ?></td>
<td>
<?php if (is_string($value)) : ?>
<?= esc($value) ?>
<?php else: ?>
<pre><?= esc(print_r($value, true)) ?></pre>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endforeach ?>
<?php if ($empty) : ?>
<div class="alert">
No $_GET, $_POST, or $_COOKIE Information to show.
</div>
<?php endif; ?>
<?php $headers = $request->headers(); ?>
<?php if (! empty($headers)) : ?>
<h3>Headers</h3>
<table>
<thead>
<tr>
<th>Header</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<?php foreach ($headers as $value) : ?>
<?php
if (empty($value)) {
continue;
}
if (! is_array($value)) {
$value = [$value];
} ?>
<?php foreach ($value as $h) : ?>
<tr>
<td><?= esc($h->getName(), 'html') ?></td>
<td><?= esc($h->getValueLine(), 'html') ?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
<!-- Response -->
<?php
$response = \Config\Services::response();
$response->setStatusCode(http_response_code());
?>
<div class="content" id="response">
<table>
<tr>
<td style="width: 15em">Response Status</td>
<td><?= esc($response->getStatusCode() . ' - ' . $response->getReasonPhrase()) ?></td>
</tr>
</table>
<?php $headers = $response->headers(); ?>
<?php if (! empty($headers)) : ?>
<?php natsort($headers) ?>
<h3>Headers</h3>
<table>
<thead>
<tr>
<th>Header</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<?php foreach ($headers as $name => $value) : ?>
<tr>
<td><?= esc($name, 'html') ?></td>
<td><?= esc($response->getHeaderLine($name), 'html') ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
<!-- Files -->
<div class="content" id="files">
<?php $files = get_included_files(); ?>
<ol>
<?php foreach ($files as $file) :?>
<li><?= esc(clean_path($file)) ?></li>
<?php endforeach ?>
</ol>
</div>
<!-- Memory -->
<div class="content" id="memory">
<table>
<tbody>
<tr>
<td>Memory Usage</td>
<td><?= esc(static::describeMemory(memory_get_usage(true))) ?></td>
</tr>
<tr>
<td style="width: 12em">Peak Memory Usage:</td>
<td><?= esc(static::describeMemory(memory_get_peak_usage(true))) ?></td>
</tr>
<tr>
<td>Memory Limit:</td>
<td><?= esc(ini_get('memory_limit')) ?></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- /tab-content -->
</div> <!-- /container -->
<div class="footer">
<div class="container">
<p>
Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
PHP: <?= esc(PHP_VERSION) ?> &mdash;
CodeIgniter: <?= esc(\CodeIgniter\CodeIgniter::CI_VERSION) ?>
</p>
</div>
</div>
</body>
</html>
+25
View File
@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="robots" content="noindex">
<title><?= lang('Errors.whoops') ?></title>
<style>
<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?>
</style>
</head>
<body>
<div class="container text-center">
<h1 class="headline"><?= lang('Errors.whoops') ?></h1>
<p class="lead"><?= lang('Errors.weHitASnag') ?></p>
</div>
</body>
</html>
+684
View File
@@ -0,0 +1,684 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 이벤트 / 광고주 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<style>
.ui-autocomplete{
z-index: 10000000;
max-height: 300px;
overflow-y: auto; /* prevent horizontal scrollbar */
overflow-x: hidden;
}
hr{
display: block !important;
}
.ui-widget{
font-family: "NanumSquareNeo", "Noto Sans", dotum, Gulim, sans-serif;
}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap eventmanage-container">
<div class="title-area">
<h2 class="page-title">광고주 관리</h2>
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
<button class="btn-special ms-2" id="createBtn" data-bs-toggle="modal" data-bs-target="#clientModal" type="button">등록</button>
</div>
</form>
</div>
<div class="section position-relative">
<div class="btn-wrap">
<a href="/eventmanage/event"><button type="button" class="btn btn-outline-danger">이벤트 관리</button></a>
<a href="/eventmanage/media"><button type="button" class="btn btn-outline-danger">매체 관리</button></a>
<a href="/eventmanage/change"><button type="button" class="btn btn-outline-danger">전환 관리</button></a>
<a href="/eventmanage/blacklist"><button type="button" class="btn btn-outline-danger">블랙리스트 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="advertiser-table">
<thead class="table-dark">
<tr>
<th scope="col">#</th>
<th scope="col">광고주명</th>
<th scope="col">매출</th>
<th scope="col">남은잔액</th>
<th scope="col">랜딩수</th>
<th scope="col">유효DB</th>
<th scope="col">사업자명</th>
<th scope="col">외부연동</th>
<th scope="col">개인정보<br>전문</th>
<th scope="col">사용여부</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<!-- 광고주 등록 -->
<div class="modal fade" id="clientModal" tabindex="-1" aria-labelledby="clientModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="clientModalLabel"></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form name="adv-register-form" id="adv-register-form">
<div class="table-responsive">
<input type="hidden" name="seq" value="">
<input type="hidden" name="checkname" value="">
<input type="hidden" name="watch_list" value="">
<table class="table table-bordered table-left-header" id="modalTable">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">광고주명</th>
<td>
<input type="hidden" name="company_id">
<input type="text" class="form-control" name="name" placeholder="광고주명을 입력하세요." id="adv-name-input" title="광고주" autocomplete="off" <?php
if(!auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){
echo "readonly disabled";
};
?>>
<p class="mt-2 text-secondary">※ 한번 등록 된 광고주는 수정이 불가능합니다. 띄어쓰기, 오타 확인 꼭 해주세요.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">수집주체(사업자명)</th>
<td>
<input type="text" class="form-control" name="agent" placeholder="수집주체(사업자명)를 입력하세요." title="수집주체(사업자명)">
</td>
</tr>
<tr>
<th scope="row" class="text-end">홈페이지 주소</th>
<td><input type="text" class="form-control" name="homepage_url" placeholder="홈페이지 주소를 입력하세요." title="홈페이지 주소"></td>
</tr>
<tr>
<th scope="row" class="text-end">외부연동 주소</th>
<td><input type="text" class="form-control" name="interlock_url" placeholder="외부연동 주소를 입력하세요." title="외부연동 주소"></td>
</tr>
<tr>
<th scope="row" class="text-end">개인정보 전문 주소</th>
<td><input type="text" class="form-control" name="agreement_url" placeholder="개인정보 전문 주소를 입력하세요." title="개인정보 전문 주소"></td>
</tr>
<tr>
<th scope="row" class="text-end">입금액</th>
<td><input type="text" class="form-control" name="account_balance" placeholder="광고주 입금액을 입력해주세요." title="광고주 입금액"></td>
</tr>
<tr>
<th scope="row" class="text-end">사용여부</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="is_stop" value="0" id="is_stop01" checked>
<label class="form-check-label" for="is_stop01">사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="is_stop" value="1" id="is_stop02">
<label class="form-check-label" for="is_stop02">사용중지</label>
</div>
</div>
<p class="text-secondary">※ 사용중지로 변경할 경우 해당 광고주의 모든 랜딩이 중지됩니다.</p>
</td>
</tr>
<tr class="ow_update">
<th scope="row" class="text-end">문자 알림 사용여부</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="sms_alert" value="1" id="sms_radio01">
<label class="form-check-label" for="sms_radio01">사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="sms_alert" value="0" id="sms_radio02">
<label class="form-check-label" for="sms_radio02">미사용</label>
</div>
</div>
</td>
</tr>
<tr class="ow_info ow_update">
<th scope="row" class="text-end">Notice</th>
<td>
<ul>
<li>* 00시 ~ 06시에는 문자를 발송하지 않습니다.</li>
<li>* 알림 문자는 매체별로 1일 1회 발송됩니다.</li>
<li>* 기타 문의사항은 [개발팀-정문숙]에게 문의 부탁드립니다.</li>
<li>* 전체값 입력시 매체별 db수량 입력과 문자발송이 비활성화됩니다.</li>
</ul>
</td>
</tr>
<tr class="ow_info ow_update">
<th scope="row" class="text-end">알림 연락처</th>
<td>
<input type="text" class="form-control mb-2" name="contact[]" id="contact_0" placeholder="숫자만 입력해주세요">
<input type="text" class="form-control mb-2" name="contact[]" id="contact_1" placeholder="숫자만 입력해주세요">
<input type="text" class="form-control" name="contact[]" id="contact_2" placeholder="숫자만 입력해주세요">
</td>
</tr>
<tr class="ow_info ow_update">
<th scope="row" class="text-end">전체</th>
<td>
<input type="text" class="form-control mb-2" name="watch_all" placeholder="숫자만 입력해주세요">
<p class="text-danger" id="watch_all_txt">전체값 입력시 매체별 db수량 입력과 문자발송이 비활성화됩니다.</p>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<div class="create-btn-wrap">
<button type="submit" class="btn btn-primary" form="adv-register-form" id="createActionBtn">생성</button>
</div>
<div class="update-btn-wrap">
<button type="submit" class="btn btn-primary" form="adv-register-form" id="updateActionBtn">수정</button>
</div>
</div>
</div>
</div>
</div>
<!-- //광고주 등록 -->
<!-- 이벤트 랜딩보기 -->
<div class="modal fade" id="agreementModal" tabindex="-1" aria-labelledby="agreementModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="agreementModalLabel">개인정보전문</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<iframe src="" id="agreementContent" width="100%" height="700"></iframe>
</div>
</div>
</div>
</div>
<!-- //이벤트 랜딩보기 -->
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
let data = {};
let dataTable;
getList();
function setData() {
data = {
'stx': $('#stx').val(),
};
return data;
}
function getList(){
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#advertiser-table').DataTable({
"dom": '<r<t>ip>',
"order": [[0,'desc']],
"fixedHeader": true,
"autoWidth": true,
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": true,
"scrollX": true,
// "scrollY": 500,
"scrollCollapse": true,
"deferRender": true,
"rowId": "seq",
"lengthMenu": [[ 25, 10, 50, -1 ],[ '25개', '10개', '50개', '전체' ]],
"ajax": {
"url": "<?=base_url()?>/eventmanage/advertiser/list",
"data": function(d) {
d.searchData = setData();
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columns": [
{ "data": null, "width": "3%" },
{
"data": "name",
"width": "15%",
"render": function(data, type, row) {
return '<button type="button" id="updateBtn" data-bs-toggle="modal" data-bs-target="#clientModal">'+data+'</button>';
}
},
{ "data": "sum_price", "width": "8%"},
{ "data": "remain_balance","width": "8%"},
{
"data": "total",
"width": "5%",
"render": function(data, type, row) {
if(data == 0 || data == null){
total = '';
}else{
total = '<button id="totalBtn" data-name="'+row.name+'">'+data+'</button>';
}
return total;
}
},
{
"data": "sum_db",
"width": "5%",
"render": function(data, type, row) {
if(data == 0 || data == null){
sum_db = '';
}else{
sum_db = '<button id="sumDB" data-name="'+row.name+'">'+data+'</button>';
}
return sum_db;
}
},
{ "data": "agent","width": "15%"},
{ "data": "interlock_url","width": "5%"},
{
"data": "agreement_url_exist",
"width": "5%",
"render": function(data, type, row) {
if(!data || data == null){
agreement_url = '';
}else{
agreement_url = '<button type="button" id="agreement_btn" data-bs-toggle="modal" data-bs-target="#agreementModal" data-link="'+row.agreement_url+'">'+data+'</button>';
}
return agreement_url;
}
},
{ "data": "is_stop","width": "5%"},
{
"data": "ea_datetime",
"width": "10%",
"render": function(data){
return data.substr(0, 10);
}
}
],
"language": {
"url": '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"initComplete": function(settings, json) {
// fadeIn 효과 적용 $('#advertiser-table')
let advTable = document.getElementById('advertiser-table');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
},
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
//테이블 페이드인 효과
function fadeIn(tableName, duration) {
let opacity = 0;
tableName.style.opacity = 0;
tableName.style.display = "table";
const jsInterval = 50;
const increment = jsInterval / duration;
const jsFade = setInterval(() => {
opacity += increment;
tableName.style.opacity = opacity;
if(opacity >= 1) {
clearInterval(jsFade)
}
}, jsInterval);
}
function createAdv(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/advertiser/create",
type : "POST",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("생성되었습니다.");
$('#clientModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function updateAdv(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/advertiser/update",
type : "PUT",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("수정되었습니다.");
$('#clientModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function setAdv(data){
console.log(data.advertiser);
$('input[name="seq"]').val(data.advertiser.seq);
$('input[name="checkname"]').val(data.advertiser.seq);
$('input[name="name"]').val(data.advertiser.name);
$('input[name="agent"]').val(data.advertiser.agent);
$('input[name="homepage_url"]').val(data.advertiser.homepage_url);
$('input[name="interlock_url"]').val(data.advertiser.interlock_url);
$('input[name="agreement_url"]').val(data.advertiser.agreement_url);
$('input[name="account_balance"]').val(data.advertiser.account_balance);
$('input[name="company_id"]').val(data.advertiser.company_seq);
$('input:radio[name="is_stop"][value="'+data.advertiser.is_stop+'"]').prop('checked', true);
if(data.ow){
$('input:radio[name="sms_alert"][value="1"]').prop('checked', true);
$('input:hidden[name="watch_list"]').val(data.ow.watch_list);
$('input[name="watch_all"]').val(data.ow.watch_all);
var contact = data.ow.contact.split(';');
for (let i = 0; i < 3; i++) {
$('#contact_'+i+'').val(contact[i]);
}
}else{
$('input:radio[name="sms_alert"][value="0"]').prop('checked', true);
}
if(data.wl){
if(data.ow){
console.log(data.ow.watch_list);
watch_list = JSON.parse(data.ow.watch_list);
}else{
watch_list = 0;
}
for (let i = 0; i < data.wl.length; i++) {
html = '<tr class="ow_info ow_update watch_list"><th scope="row" class="text-end">'+data.wl[i].media+'</th><td><input type="hidden" name="media_seq[]" value="'+data.wl[i].seq+'"><input type="text" class="form-control mb-2 wl-input" name="strain[]" value="'+(watch_list[data.wl[i].seq] ? watch_list[data.wl[i].seq] : 0)+'"></td></tr>';
$('#modalTable tbody').append(html)
}
}
}
function getAdvs(){
$('#adv-name-input').autocomplete({
source : function(request, response) {
$.ajax({
url : "/eventmanage/advertiser/company",
type : "GET",
dataType: "JSON",
data : {'stx': request.term},
contentType: 'application/json; charset=utf-8',
success : function(data){
response(
$.map(data, function(item) {
return {
label: item.name,
value: item.name,
id: item.id
};
})
);
}
,error : function(){
alert("에러 발생");
}
});
},
select: function(event, ui) {
$(event.target).val(ui.item.value);
$(event.target).siblings('input[name="company_id"]').val(ui.item.id);
},
focus : function(event, ui) {
return false;
},
classes : {
'ui-autocomplete': 'highlight'
},
minLength: 1,
autoFocus : true,
delay: 100
});
}
function chkInput() {
if($('input:radio[name="sms_alert"][value="1"]').is(':checked')){
$('.ow_info').show();
}else{
$('.ow_info').hide();
$('input[name="contact[]"]').val('');
}
}
$('input[name="sms_alert"]').bind('change', function() {
chkInput();
});
$('#adv-name-input').on("focus", function(){
getAdvs();
})
$('#clientModal').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
if ($btn.attr('id') === 'updateBtn') {
var $tr = $btn.closest('tr');
var seq = $tr.attr('id');
$('#clientModalLabel').text('광고주 수정');
$('.ow_update').show();
$('.update-btn-wrap').show();
$('.create-btn-wrap').hide();
$.ajax({
type: "GET",
url: "<?=base_url()?>/eventmanage/advertiser/view",
data: {'seq':seq},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setAdv(data);
chkInput();
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}else{
$('#clientModalLabel').text('광고주 등록');
$('.ow_update').hide();
$('.update-btn-wrap').hide();
$('.create-btn-wrap').show();
$('.watch_list').remove();
chkInput();
addDisabled();
}
})
.on('hidden.bs.modal', function(e) {
$('input[name="seq"]').val('');
$('input[name="company_id"]').val('');
$('input[name="checkname"]').val('');
$('form[name="adv-register-form"]')[0].reset();
$('.watch_list').remove();
});
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
$('form[name="adv-register-form"]').bind('submit', function(e) {
/*
if(!$('input[name="company_id"]', this).val()) {
alert('광고주가 연결되지 않았습니다.\n광고주명이 검색되지 않을 경우 "회원관리 > 광고주/광고대행사 관리"에서 광고주를 등록한 후에 검색해주세요.');
return false;
}
*/
//var clickedButton = $(document.activeElement).attr('id');
var clickedButton = e.originalEvent.submitter.id; // 변경된 부분
if(clickedButton == 'createActionBtn'){
var data = $(this).serialize();
createAdv(data);
}
if(clickedButton == 'updateActionBtn'){
var ja = {};
for(var i=0;i<$("input[name='strain[]']").length;i++){
ja[$("input[name='media_seq[]']").eq(i).val()] = Number($("input[name='strain[]']").eq(i).val());
}
$('input[name=watch_list]').val(JSON.stringify(ja));
var data = $(this).serialize();
updateAdv(data);
}
return false;
});
$('body').on('click', '#sumDB', function() {
var currentDate = new Date();
var firstDay = new Date(currentDate.getFullYear(), currentDate.getMonth(), 2);
var lastDay = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 1);
var formattedFirstDay = firstDay.toISOString().slice(0, 10);
var formattedLastDay = lastDay.toISOString().slice(0, 10);
var advertiser = $(this).data('name');
if(window.localStorage.getItem('DataTables_deviceTable_/integrate')){
var integrateStorage = window.localStorage.getItem('DataTables_deviceTable_/integrate');
var data = JSON.parse(integrateStorage);
data.searchData.advertiser = advertiser;
data.searchData.sdate = formattedFirstDay;
data.searchData.edate = formattedLastDay;
data.searchData.event = '';
data.searchData.media = '';
data.searchData.status = '';
data.searchData.stx = '';
}else{
var data = {
time: Date.now(),
start: 0,
length: 25,
order: [[12, "desc"]],
search: { search: "", smart: true, regex: false, caseInsensitive: true },
columns: [],
memoView: "modal",
searchData: {
sdate: formattedFirstDay,
edate: formattedLastDay,
advertiser: advertiser,
media: '',
event: '',
status: '',
stx: ''
}
};
}
updatedStorageValue = JSON.stringify(data);
window.localStorage.setItem('DataTables_deviceTable_/integrate', updatedStorageValue);
window.location.href = '/integrate';
});
$('#agreementModal').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
var link = $btn.data('link');
var iframeContent = $('#agreementContent');
iframeContent.attr('src', link);
})
.on('hidden.bs.modal', function(e) {
$('#agreementContent').attr('src', '');
});
$('body').on('click', '#totalBtn', function() {
var advertiser = $(this).data('name');
var data = {
advertiser: advertiser
};
storageValue = JSON.stringify(data);
window.localStorage.setItem('event_advertiser_name', storageValue);
window.location.href = '/eventmanage/event';
});
function addDisabled(){
if ($('input[name="watch_all"]').val() === "") {
$('.wl-input').prop('disabled', false);
} else {
$('.wl-input').prop('disabled', true);
}
}
$('body').on('keyup', 'input[name="watch_all"]', function() {
addDisabled();
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+349
View File
@@ -0,0 +1,349 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 이벤트 / 블랙리스트 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap eventmanage-container">
<div class="title-area">
<h2 class="page-title">블랙리스트 관리</h2>
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
<button class="btn-special ms-2" id="createBtn" data-bs-toggle="modal" data-bs-target="#blackCreateModal" type="button">등록</button>
</div>
</form>
</div>
<div class="section position-relative">
<div class="btn-wrap">
<a href="/eventmanage/event"><button type="button" class="btn btn-outline-danger">이벤트 관리</button></a>
<a href="/eventmanage/advertiser"><button type="button" class="btn btn-outline-danger">광고주 관리</button></a>
<a href="/eventmanage/media"><button type="button" class="btn btn-outline-danger">매체 관리</button></a>
<a href="/eventmanage/change"><button type="button" class="btn btn-outline-danger">전환 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="blacklist-table">
<thead class="table-dark">
<tr>
<th scope="col">전화번호/아이피</th>
<th scope="col">메모</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<!-- 등록 -->
<div class="modal fade" id="blackCreateModal" tabindex="-1" aria-labelledby="blackCreateModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="blackCreateModal">블랙리스트</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form name="black-create-form" id="black-create-form">
<div class="table-responsive">
<table class="table table-bordered table-left-header" id="modalCreateTable">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">전화번호/아이피</th>
<td><input class="form-control" type="text" name="data"></td>
</tr>
<tr>
<th scope="row" class="text-end">메모</th>
<td><textarea class="form-control" name="memo"></textarea>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<div class="create-btn-wrap">
<button type="submit" class="btn btn-primary" form="black-create-form" id="createActionBtn">생성</button>
</div>
</div>
</div>
</div>
</div>
<!-- 등록 -->
<!-- 보기/삭제 -->
<div class="modal fade" id="blackShowModal" tabindex="-1" aria-labelledby="blackShowModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="blackShowModal">블랙리스트</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form name="black-delete-form" id="black-delete-form">
<input type="hidden" name="seq" value="">
<div class="table-responsive">
<table class="table table-bordered table-left-header" id="modalShowTable">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr class="data_show">
<th scope="row" class="text-end">전화번호/아이피</th>
<td></td>
</tr>
<tr class="memo_show">
<th scope="row" class="text-end">메모</th>
<td></td>
</tr>
<tr class="datetime_show">
<th scope="row" class="text-end">생성일</th>
<td></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<div class="delete-btn-wrap">
<button type="button" class="btn btn-outline-secondary deleteActionBtn">삭제</button>
</div>
</div>
</div>
</div>
</div>
<!-- 보기/삭제 -->
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
let data = {};
let dataTable;
getList();
function setData() {
data = {
'stx': $('#stx').val(),
};
return data;
}
function getList(){
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#blacklist-table').DataTable({
"dom": '<r<t>ip>',
"order": [[2,'desc']],
"fixedHeader": true,
"autoWidth": true,
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": true,
"scrollX": true,
// "scrollY": 500,
"scrollCollapse": true,
"deferRender": true,
"rowId": "seq",
"lengthMenu": [[ 25, 10, 50, -1 ],[ '25개', '10개', '50개', '전체' ]],
"ajax": {
"url": "<?=base_url()?>/eventmanage/blacklist/list",
"data": function(d) {
d.searchData = setData();
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columns": [
{
"data": "data",
"width": "30%",
"render": function(data, type, row) {
return '<button type="button" id="deleteBtn" data-bs-toggle="modal" data-bs-target="#blackShowModal">'+data+'</button>';
}
},
{ "data": "memo", "width": "50%"},
{
"data": "datetime",
"width": "20%",
}
],
"language": {
"url": '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"initComplete": function(settings, json) {
// fadeIn 효과 적용 $('#blacklist-table')
let advTable = document.getElementById('blacklist-table');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
//테이블 페이드인 효과
function fadeIn(tableName, duration) {
let opacity = 0;
tableName.style.opacity = 0;
tableName.style.display = "table";
const jsInterval = 50;
const increment = jsInterval / duration;
const jsFade = setInterval(() => {
opacity += increment;
tableName.style.opacity = opacity;
if(opacity >= 1) {
clearInterval(jsFade)
}
}, jsInterval);
}
function createBlack(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/blacklist/create",
type : "POST",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("생성되었습니다.");
$('#blackCreateModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function deleteBlack(seq){
$.ajax({
url : "<?=base_url()?>/eventmanage/blacklist/delete",
type : "DELETE",
dataType: "JSON",
data : {'seq':seq},
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("삭제되었습니다.");
$('#blackShowModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
$('#blackCreateModal').on('show.bs.modal', function(e) {
//
})
.on('hidden.bs.modal', function(e) {
$('form[name="black-create-form"]')[0].reset();
});
$('#blackShowModal').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
var $tr = $btn.closest('tr');
var seq = $tr.attr('id');
data = {
'seq':seq
};
$.ajax({
type: "GET",
url: "<?=base_url()?>/eventmanage/blacklist/view",
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#black-delete-form input[name="seq"]').val(data.seq);
$('.data_show td').text(data.data);
$('.memo_show td').text(data.memo);
$('.datetime_show td').text(data.datetime);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
.on('hidden.bs.modal', function(e) {
$('#black-delete-form input[name="seq"]').val('');
});
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
$('form[name="black-create-form"]').bind('submit', function(e) {
var data = {
'data': $('form[name="black-create-form"] input[name="data"]').val(),
'memo': $('form[name="black-create-form"] textarea[name="memo"]').val(),
};
createBlack(data);
return false;
});
$('body').on('click', '.deleteActionBtn', function() {
seq = $('#black-delete-form input[name="seq"]').val();
deleteBlack(seq);
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+313
View File
@@ -0,0 +1,313 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 이벤트 / 전환 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap eventmanage-container">
<div class="title-area">
<h2 class="page-title">전환 관리</h2>
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
<button class="btn-special ms-2" id="createBtn" data-bs-toggle="modal" data-bs-target="#changeModal" type="button">등록</button>
</div>
</form>
</div>
<div class="section position-relative">
<div class="btn-wrap">
<a href="/eventmanage/event"><button type="button" class="btn btn-outline-danger">이벤트 관리</button></a>
<a href="/eventmanage/advertiser"><button type="button" class="btn btn-outline-danger">광고주 관리</button></a>
<a href="/eventmanage/media"><button type="button" class="btn btn-outline-danger">매체 관리</button></a>
<a href="/eventmanage/blacklist"><button type="button" class="btn btn-outline-danger">블랙리스트 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="change-table">
<thead class="table-dark">
<tr>
<th scope="col">전환ID</th>
<th scope="col">전환명</th>
</tr>
</thead>
<tbody>
<tr>
<td>12378436743535</td>
<td>전국상상 무제한카톡5</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal')?>
<!-- 전환 등록 -->
<div class="modal fade" id="changeModal" tabindex="-1" aria-labelledby="changeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="changeModalLabel"></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form name="change-register-form" id="change-register-form">
<input type="hidden" name="old_id" value="">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">전환ID</th>
<td><input type="text" name="id" class="form-control" placeholder="전환 ID를 입력하세요." title="전환 ID"></td>
</tr>
<tr>
<th scope="row" class="text-end">전환명</th>
<td><input type="text" name="name" class="form-control" placeholder="전환명 입력하세요." title="전환명"></td>
</tr>
<tr>
<th scope="row" class="text-end">Access Token</th>
<td><input type="text" name="token" class="form-control" placeholder="Access Token을 입력하세요." title="Access Token"></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<div class="create-btn-wrap">
<button type="submit" class="btn btn-primary" form="change-register-form" id="createActionBtn">생성</button>
</div>
<div class="update-btn-wrap">
<button type="submit" class="btn btn-primary" form="change-register-form" id="updateActionBtn">수정</button>
</div>
</div>
</div>
</div>
</div>
<!-- //전환 등록 -->
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
let data = {};
let dataTable;
getList();
function setData() {
data = {
'stx': $('#stx').val(),
};
return data;
}
function getList(){
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#change-table').DataTable({
"dom": '<r<t>ip>',
"autoWidth": true,
"fixedHeader": true,
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": false,
"scrollX": true,
// "scrollY": 500,
"scrollCollapse": true,
"deferRender": true,
"rowId": "id",
"lengthMenu": [[ 25, 10, 50, -1 ],[ '25개', '10개', '50개', '전체' ]],
"ajax": {
"url": "<?=base_url()?>/eventmanage/change/list",
"data": function(d) {
d.searchData = setData();
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columns": [
{
"data": "id",
"width": "20%",
"render": function(data, type, row) {
return '<button type="button" id="updateBtn" data-bs-toggle="modal" data-bs-target="#changeModal">'+data+'</button>';
}
},
{ "data": "name", "width": "80%"},
],
"language": {
"url": '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"initComplete": function(settings, json) {
// fadeIn 효과 적용 $('#change-table')
let advTable = document.getElementById('change-table');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
//테이블 페이드인 효과
function fadeIn(tableName, duration) {
let opacity = 0;
tableName.style.opacity = 0;
tableName.style.display = "table";
const jsInterval = 50;
const increment = jsInterval / duration;
const jsFade = setInterval(() => {
opacity += increment;
tableName.style.opacity = opacity;
if(opacity >= 1) {
clearInterval(jsFade)
}
}, jsInterval);
}
function setChange(data){
$('input[name="old_id"]').val(data.id);
$('input[name="id"]').val(data.id);
$('input[name="name"]').val(data.name);
$('input[name="token"]').val(data.token);
}
function createChange(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/change/create",
type : "POST",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("생성되었습니다.");
$('#changeModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function updateChange(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/change/update",
type : "PUT",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("수정되었습니다.");
$('#changeModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
$('#changeModal').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
if ($btn.attr('id') === 'updateBtn') {
var $tr = $btn.closest('tr');
var id = $tr.attr('id');
$('#changeModalLabel').text('전환 수정');
$('.update-btn-wrap').show();
$('.create-btn-wrap').hide();
$.ajax({
type: "GET",
url: "<?=base_url()?>/eventmanage/change/view",
data: {'id':id},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setChange(data);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}else{
$('#changeModalLabel').text('전환 등록');
$('.update-btn-wrap').hide();
$('.create-btn-wrap').show();
}
})
.on('hidden.bs.modal', function(e) {
$('form[name="change-register-form"]')[0].reset();
});
$('form[name="change-register-form"]').bind('submit', function(e) {
var data = $(this).serialize();
// var clickedButton = $(document.activeElement).attr('id');
var clickedButton = e.originalEvent.submitter.id; // 변경된 부분
if(clickedButton == 'createActionBtn'){
createChange(data);
}
if(clickedButton == 'updateActionBtn'){
updateChange(data);
}
return false;
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
File diff suppressed because it is too large Load Diff
+121
View File
@@ -0,0 +1,121 @@
<?=$this->extend('templates/front.php');?>
<?=$this->section('title');?>
ZENITH - 이벤트 / 엑셀 업로드
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">엑셀 업로드</h2>
</div>
<div class="section ">
<form name="eventfrm" enctype="multipart/form-data" method="POST" action="/eventmanage/excel/upload">
<?= csrf_field() ?>
<?php if(session()->getFlashdata('success')) : ?>
<div class="alert alert-success alert-dismissible">
<button type="button" class="btn-close" data-bs-dismiss="alert">&times;</button>
<?php echo session()->getFlashdata('success') ?>
</div>
<?php elseif (session()->getFlashdata('failed')) : ?>
<div class="alert alert-danger alert-dismissible">
<button type="button" class="btn-close" data-bs-dismiss="alert">&times;</button>
<?php echo session()->getFlashdata('failed') ?>
</div>
<?php endif ?>
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:20%;">
<col style="width:80%;">
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="3" class="text-end align-top pt-3">엑셀</th>
<td>
<input class="form-control <?php if($validation->getError('upload_file')): ?>is-invalid<?php endif ?>" type="file" id="formFile" name="upload_file">
<?php if ($validation->getError('upload_file')): ?>
<div class="invalid-feedback">
<?= $validation->getError('upload_file') ?>
</div>
<?php endif; ?>
</td>
</tr>
<tr>
<td>
<span class="text-primary" >
<button class="btn-show">[업로드 가이드]</button>
</span>
<table class="table table-bordered mb-0 excel_sample">
<colgroup>
<col style="width:20%;">
<col style="width:80%;">
</colgroup>
<tbody>
<tr>
<th scope="col" class="align-middle">연동가능 광고주</th>
<td>
리얼딥<br>
하늘안과의원<br>
밝은성모안과병원<br>
리얼딥<br>
하늘안과의원<br>
밝은성모안과병원<br>
리얼딥<br>
하늘안과의원<br>
</td>
</tr>
<tr>
<th scope="col" id="myElement">샘플</th>
<td><a href="https://static.hotblood.co.kr/DB_upload_sample.csv" class="text-primary">샘플 다운로드</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="excel_sample">
<td>
<b>※ 업로드 유의사항</b>
<ul>
<li>1. 반드시 지정된 양식에 맞춘 csv 파일을 업로드 부탁드립니다.</li>
<li>2. 신규 랜딩 번호로 DB 업로드 필요시 개발팀에 알림 부탁드립니다.</li>
<li>3. 등록된 연동가능 광고주 외의 연동이 필요한 DB는 업로드 전 개발팀에 알림 부탁드립니다.</li>
<li>4. 연동 시 랜딩번호, 광고주 항목 입력은 필수입니다.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn-area text-center">
<button type="submit" class="btn btn-primary">등록</button>
<a href="/eventmanage/event"><button type="button" class="btn btn-secondary">이벤트 목록</button></a>
</div>
</form>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
$(".btn-show").click(function(e) {
$(".excel_sample").toggle();
return false;
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+342
View File
@@ -0,0 +1,342 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 이벤트 / 매체 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap eventmanage-container">
<div class="title-area">
<h2 class="page-title">매체 관리</h2>
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
<button class="btn-special ms-2" id="createBtn" data-bs-toggle="modal" data-bs-target="#mediaModal" type="button">등록</button>
</div>
</form>
</div>
<div class="section position-relative">
<div class="btn-wrap">
<a href="/eventmanage/event"><button type="button" class="btn btn-outline-danger">이벤트 관리</button></a>
<a href="/eventmanage/advertiser"><button type="button" class="btn btn-outline-danger">광고주 관리</button></a>
<a href="/eventmanage/change"><button type="button" class="btn btn-outline-danger">전환 관리</button></a>
<a href="/eventmanage/blacklist"><button type="button" class="btn btn-outline-danger">블랙리스트 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="media-table">
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">매체명</th>
<th scope="col">대상</th>
<th scope="col">랜딩수</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal')?>
<!-- 매체 등록 -->
<div class="modal fade" id="mediaModal" tabindex="-1" aria-labelledby="mediaModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="mediaModalLabel"></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form name="media-register-form" id="media-register-form">
<div class="table-responsive">
<input type="hidden" name="seq" value="">
<input type="hidden" name="checkname" value="">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">매체명</th>
<td><input type="text" name="media" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">대상</th>
<td><input type="text" name="target" class="form-control"></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<div class="create-btn-wrap">
<button type="submit" class="btn btn-primary" form="media-register-form" id="createActionBtn">생성</button>
</div>
<div class="update-btn-wrap">
<button type="submit" class="btn btn-primary" form="media-register-form" id="updateActionBtn">수정</button>
</div>
</div>
</div>
</div>
</div>
<!-- //매체 등록 -->
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
let data = {};
let dataTable;
getList();
function setData() {
data = {
'stx': $('#stx').val(),
};
return data;
}
function getList(){
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#media-table').DataTable({
"dom": '<r<t>ip>',
"order": [[0,'desc']],
"fixedHeader": true,
"autoWidth": true,
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": true,
"scrollX": true,
// "scrollY": 500,
"scrollCollapse": true,
"deferRender": true,
"rowId": "seq",
"lengthMenu": [[ 25, 10, 50, -1 ],[ '25개', '10개', '50개', '전체' ]],
"ajax": {
"url": "<?=base_url()?>/eventmanage/media/list",
"data": function(d) {
d.searchData = setData();
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columns": [
{ "data": null, "width": "5%" },
{
"data": "media",
"width": "45%",
"render": function(data, type, row) {
return '<button type="button" id="updateBtn" data-bs-toggle="modal" data-bs-target="#mediaModal">'+data+'</button>';
}
},
{ "data": "target", "width": "45%"},
{
"data": "total",
"width": "10%",
"render": function(data, type, row) {
return '<button id="totalBtn" data-media="'+row.media+'">'+data+'</button>';
}
},
],
"language": {
"url": '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"initComplete": function(settings, json) {
// fadeIn 효과 적용 $('#media-table')
let advTable = document.getElementById('media-table');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
},
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
//테이블 페이드인 효과
function fadeIn(tableName, duration) {
let opacity = 0;
tableName.style.opacity = 0;
tableName.style.display = "table";
const jsInterval = 50;
const increment = jsInterval / duration;
const jsFade = setInterval(() => {
opacity += increment;
tableName.style.opacity = opacity;
if(opacity >= 1) {
clearInterval(jsFade)
}
}, jsInterval);
}
function setMedia(data){
$('input[name="seq"]').val(data.seq);
$('input[name="checkname"]').val(data.seq);
$('input[name="media"]').val(data.media);
$('input[name="target"]').val(data.target);
}
function createMedia(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/media/create",
type : "POST",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("생성되었습니다.");
$('#mediaModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
function updateMedia(data){
$.ajax({
url : "<?=base_url()?>/eventmanage/media/update",
type : "PUT",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("수정되었습니다.");
$('#mediaModal').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
$('#mediaModal').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
if ($btn.attr('id') === 'updateBtn') {
var $tr = $btn.closest('tr');
var seq = $tr.attr('id');
$('#mediaModalLabel').text('매체 수정');
$('.update-btn-wrap').show();
$('.create-btn-wrap').hide();
$.ajax({
type: "GET",
url: "<?=base_url()?>/eventmanage/media/view",
data: {'seq':seq},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setMedia(data);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}else{
$('#mediaModalLabel').text('매체 등록');
$('.update-btn-wrap').hide();
$('.create-btn-wrap').show();
}
})
.on('hidden.bs.modal', function(e) {
$('input[name="seq"]').val('');
$('input[name="checkname"]').val('');
$('form[name="media-register-form"]')[0].reset();
});
$('form[name="media-register-form"]').bind('submit', function(e) {
var data = $(this).serialize();
//var clickedButton = $(document.activeElement).attr('id');
var clickedButton = e.originalEvent.submitter.id; // 변경된 부분
if(clickedButton == 'createActionBtn'){
createMedia(data);
}
if(clickedButton == 'updateActionBtn'){
updateMedia(data);
}
return false;
});
$('body').on('click', '#totalBtn', function() {
var media = $(this).data('media');
var data = {
media: media
};
storageValue = JSON.stringify(data);
window.localStorage.setItem('event_media_name', storageValue);
window.location.href = '/eventmanage/event';
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+12
View File
@@ -0,0 +1,12 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<!--html 쓰는곳-->
<?=$this->endSection();?>
<?=$this->section('script');?>
<script>
//스크립트 쓰는곳
</script>
<?=$this->endSection();?>
+759
View File
@@ -0,0 +1,759 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 통합 DB 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.html5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.colVis.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore/js/dataTables.stateRestore.min.js"></script>
<script src="/static/js/jszip.min.js"></script>
<script src="/static/js/pdfmake/pdfmake.min.js"></script>
<script src="/static/js/pdfmake/vfs_fonts.js"></script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">자동화 목록</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
<button class="btn-special" type="button" data-bs-toggle="modal" data-bs-target="#regiModal">작성하기</button>
</div>
</form>
</div>
<div class="section">
<div class="row">
<p class="num-line">페이지당 줄수 <span>25개</span></p>
<table class="table table-striped tbl-dark">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%">
<col>
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">이름</th>
<th scope="col">작성자</th>
<th scope="col">업데이트</th>
<th scope="col">마지막 실행</th>
<th scope="col">사용</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">카카오 DB초과 OFF</td>
<td class="text-center">배익준</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">
<div class="td-inner">
<div class="ui-toggle">
<input type="checkbox" name="use01" id="use01">
<label for="use01">사용</label>
</div>
<div class="more-action">
<button type="button" class="btn-more"><span>더보기</span></button>
<ul class="action-list">
<li><a href="#">복제하기</a></li>
<li><a href="#">제거하기</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td class="text-center">카카오 DB초과 OFF</td>
<td class="text-center">배익준</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">
<div class="td-inner">
<div class="ui-toggle">
<input type="checkbox" name="use01" id="use01">
<label for="use01">사용</label>
</div>
<div class="more-action">
<button type="button" class="btn-more"><span>더보기</span></button>
<ul class="action-list">
<li><a href="#">복제하기</a></li>
<li><a href="#">제거하기</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td class="text-center">카카오 DB초과 OFF</td>
<td class="text-center">배익준</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">
<div class="td-inner">
<div class="ui-toggle">
<input type="checkbox" name="use01" id="use01">
<label for="use01">사용</label>
</div>
<div class="more-action">
<button type="button" class="btn-more"><span>더보기</span></button>
<ul class="action-list">
<li><a href="#">복제하기</a></li>
<li><a href="#">제거하기</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td class="text-center">카카오 DB초과 OFF</td>
<td class="text-center">배익준</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">
<div class="td-inner">
<div class="ui-toggle">
<input type="checkbox" name="use01" id="use01">
<label for="use01">사용</label>
</div>
<div class="more-action">
<button type="button" class="btn-more"><span>더보기</span></button>
<ul class="action-list">
<li><a href="#">복제하기</a></li>
<li><a href="#">제거하기</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td class="text-center">카카오 DB초과 OFF</td>
<td class="text-center">배익준</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">2023-09-27 12:52</td>
<td class="text-center">
<div class="td-inner">
<div class="ui-toggle">
<input type="checkbox" name="use01" id="use01">
<label for="use01">사용</label>
</div>
<div class="more-action">
<button type="button" class="btn-more"><span>더보기</span></button>
<ul class="action-list">
<li><a href="#">복제하기</a></li>
<li><a href="#">제거하기</a></li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="paging">
<a href="#" class="btn-prev">이전</a>
<a href="#" class="current">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<span>...</span>
<a href="#">291</a>
<a href="#" class="btn-next">다음</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="regiModal" tabindex="-1" aria-labelledby="memoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<div class="regi-content">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="step">
<ol class="nav nav-tabs" id="myTab" role="tablist">
<li class="tab-link" role="presentation" type="button" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="false">
<strong>일정</strong>
<p>매 2시간 마다<br>
매일 00시 30분[7일 마다 7시 정각에]<br>
매주 일요일 03시 정각에<br>
매월 [첫번째 날, 마지막 날] 09시 30분에
...</p>
</li>
<li class="tab-link" role="presentation" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">
<strong>대상</strong>
<p>광고주<br>
페이스북<br>
[전국]상상의원_광고주랜딩*
...</p>
</li>
<li class="tab-link" role="presentation" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="messages" aria-selected="false">
<strong>조건</strong>
<p>지출액 - 100,000원 초과<br>
AND<br>
유효DB - 100건 이하</p>
</li>
<li class="tab-link active" role="presentation" id="preactice-tab" data-bs-toggle="tab" data-bs-target="#preactice" type="button" role="tab" aria-controls="messages" aria-selected="true">
<strong>실행</strong>
<p>* 캠페인 - 페이스북<br>
노안라식_180509<br>
상태 OFF<br>
* 캠페인 - 구글<br>
밝은성모안과(지원자, 응답) -<br>
전국 #2000_001 *40000 &fhr<br>
예산 50,000원</p>
</li>
<li class="tab-link" role="presentation" id="detail-tab" data-bs-toggle="tab" data-bs-target="#detail" type="button" role="tab" aria-controls="messages" aria-selected="false">
<strong>상세정보</strong>
</li>
</ol>
</div>
<div class="detail-wrap">
<div class="detail" id="home" role="tabpanel" aria-labelledby="home-tab" tabindex="0">
<table class="table tbl-side">
<colgroup>
<col style="width:35%">
<col>
</colgroup>
<tr>
<th scope="row">다음 시간마다 규칙적으로 실행</th>
<td>
<input type="text" class="form-control short">
<select name="" class="form-select short">
<option value="">분</option>
<option value="">시간</option>
<option value="">일</option>
<option value="">주</option>
<option value="">월</option>
</select>
</td>
</tr>
<tr>
<th scope="row">요일</th>
<td>
<div class="week-radio">
<div class="day">
<input type="radio" name="day" id="day01">
<label for="day01">월</label>
</div>
<div class="day">
<input type="radio" name="day" id="day02">
<label for="day02">화</label>
</div>
<div class="day">
<input type="radio" name="day" id="day03">
<label for="day03">수</label>
</div>
<div class="day">
<input type="radio" name="day" id="day04">
<label for="day04">목</label>
</div>
<div class="day">
<input type="radio" name="day" id="day05">
<label for="day05">금</label>
</div>
<div class="day">
<input type="radio" name="day" id="day06">
<label for="day06">토</label>
</div>
<div class="day">
<input type="radio" name="day" id="day07">
<label for="day07">일</label>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row">다음 날짜에</th>
<td>
<select name="" class="form-select">
<option value="">매달 첫번째 날</option>
<option value="">매달 마지막 날</option>
<option value="">처음</option>
<option value="">마지막</option>
<option value="">날짜</option>
</select>
<select name="" class="form-select">
<option value="">1일</option>
<option value="">2일</option>
<option value="">3일</option>
<option value="">4일</option>
<option value="">5일</option>
</select>
<select name="" class="form-select">
<option value="">월</option>
<option value="">화</option>
<option value="">수</option>
<option value="">목</option>
<option value="">금</option>
<option value="">토</option>
<option value="">일</option>
</select>
</td>
</tr>
<tr>
<th scope="row">시간</th>
<td>
<select name="" class="form-select middle">
<option value=""></option>
</select>
</td>
</tr>
<tr>
<th scope="row">제외 시간</th>
<td>
<div class="form-flex">
<select name="" class="form-select middle">
<option value="">00:00</option>
<option value="">00:30</option>
<option value="">01:00</option>
<option value="">01:30</option>
<option value="">02:00</option>
</select>
<span>~</span>
<select name="" class="form-select middle">
<option value="">00:00</option>
<option value="">00:30</option>
<option value="">01:00</option>
<option value="">01:30</option>
<option value="">02:00</option>
</select>
</div>
</td>
</tr>
</table>
</div>
<div class="detail" id="profile" role="tabpanel" aria-labelledby="profile-tab" tabindex="1">
<ul class="tab">
<li class="active"><a href="#">광고주</a></li>
<li><a href="#">캠페인</a></li>
<li><a href="#">광고그룹</a></li>
<li><a href="#">광고</a></li>
</ul>
<div class="search">
<input type="text" placeholder="검색어를 입력하세요">
</div>
<table class="table tbl-header">
<colgroup>
<col style="width:24%">
<col style="width:28%">
<col>
<col style="width:15%">
</colgroup>
<thead>
<tr>
<th scope="col">매체</th>
<th scope="col">광고주 ID</th>
<th scope="col">광고주명</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td><b class="em">활성화</b></td>
</tr>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td>중지</td>
</tr>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td><b class="em">활성화</b></td>
</tr>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td>중지</td>
</tr>
</tbody>
</table>
</div>
<div class="detail" id="messages" role="tabpanel" aria-labelledby="messages-tab" tabindex="2">
<table class="table tbl-header">
<colgroup>
<col>
<col style="width:45%">
<col style="width:5%">
</colgroup>
<thead>
<tr>
<th scope="col">항목</th>
<th scope="col">구분</th>
<th scope="col"><button type="button" class="btn-add">추가</button></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-flex">
<select name="" class="form-select">
<option value="">조건 항목</option>
<option value="">상태</option>
<option value="">예산</option>
<option value="">DB단가</option>
<option value="">유효DB</option>
<option value="">지출액</option>
<option value="">수익</option>
<option value="">수익률</option>
<option value="">매출액</option>
<option value="">노출수</option>
<option value="">링크클릭</option>
<option value="">CPC</option>
<option value="">CTR</option>
<option value="">DB전환률</option>
</select>
<select name="" class="form-select">
<option value="">상태</option>
<option value="">ON</option>
<option value="">OFF</option>
</select>
<input type="text" class="form-control">
</div>
</td>
<td colspan="2">
<div class="form-flex">
<select name="" class="form-select">
<option value="">일치여부</option>
<option value="">초과</option>
<option value="">보다 크거나 같음</option>
<option value="">미만</option>
<option value="">보다 작거나 같음</option>
<option value="">같음</option>
<option value="">같지않음</option>
</select>
<select name="" class="form-select no-flex">
<option value="">AND / OR</option>
<option value="">AND</option>
<option value="">OR</option>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-flex">
<select name="" class="form-select">
<option value="">조건 항목</option>
<option value="">상태</option>
<option value="">예산</option>
<option value="">DB단가</option>
<option value="">유효DB</option>
<option value="">지출액</option>
<option value="">수익</option>
<option value="">수익률</option>
<option value="">매출액</option>
<option value="">노출수</option>
<option value="">링크클릭</option>
<option value="">CPC</option>
<option value="">CTR</option>
<option value="">DB전환률</option>
</select>
<select name="" class="form-select">
<option value="">상태</option>
<option value="">ON</option>
<option value="">OFF</option>
</select>
<input type="text" class="form-control">
</div>
</td>
<td colspan="2">
<div class="form-flex">
<select name="" class="form-select">
<option value="">일치여부</option>
<option value="">초과</option>
<option value="">보다 크거나 같음</option>
<option value="">미만</option>
<option value="">보다 작거나 같음</option>
<option value="">같음</option>
<option value="">같지않음</option>
</select>
<select name="" class="form-select no-flex">
<option value="">AND / OR</option>
<option value="">AND</option>
<option value="">OR</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="detail" id="preactice" role="tabpanel" aria-labelledby="preactice-tab" tabindex="3">
<ul class="tab">
<li class="active"><a href="#">캠페인</a></li>
<li><a href="#">광고그룹</a></li>
<li><a href="#">광고</a></li>
</ul>
<div class="search">
<input type="text" placeholder="검색어를 입력하세요">
</div>
<table class="table tbl-header">
<colgroup>
<col style="width:24%">
<col style="width:28%">
<col>
<col style="width:15%">
</colgroup>
<thead>
<tr>
<th scope="col">매체</th>
<th scope="col">광고주 ID</th>
<th scope="col">광고주명</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td><b class="em">활성화</b></td>
</tr>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td>중지</td>
</tr>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td><b class="em">활성화</b></td>
</tr>
<tr>
<td>페이스북</td>
<td>5897268653698510</td>
<td>[전국]상상의원_광고주랜딩*</td>
<td>중지</td>
</tr>
</tbody>
</table>
<table class="table tbl-header">
<colgroup>
<col>
<col style="width:5%">
</colgroup>
<thead>
<tr>
<th scope="col">항목</th>
<th scope="col"><button type="button" class="btn-add">추가</button></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<div class="form-flex">
<select name="" class="form-select">
<option value="">실행항목</option>
<option value="">상태</option>
<option value="">예산</option>
</select>
<select name="" class="form-select">
<option value="">상태</option>
<option value="">ON</option>
<option value="">OFF</option>
</select>
<input type="text" class="form-control">
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="detail" id="detail" role="tabpanel" aria-labelledby="detail-tab" tabindex="4">
<table class="table tbl-side">
<colgroup>
<col style="width:35%">
<col>
</colgroup>
<tr>
<th scope="row">이름*</th>
<td>
<input type="text" class="form-control bg">
</td>
</tr>
<tr>
<th scope="row">설명</th>
<td>
<textarea class="form-control"></textarea>
</td>
</tr>
</table>
<duv class="btn-area">
<button type="button" class="btn-special">저장</button>
</duv>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="logModal" tabindex="-1" aria-labelledby="memoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="memoModalLabel"><i class="ico-log"></i> 감사 로그</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table class="table tbl-dark">
<colgroup>
<col>
<col style="width:22%;">
<col style="width:18%;">
<col style="width:22%;">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">이름</th>
<th scope="col">작성자</th>
<th scope="col">업데이트</th>
<th scope="col">사용</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b class="em">성공</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b>실패</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b class="em">성공</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b>실패</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b class="em">성공</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b>실패</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b class="em">성공</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b>실패</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b class="em">성공</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b>실패</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b class="em">성공</b></td>
<td class="text-center">더보기</td>
</tr>
<tr>
<td class="text-center">2023-09-27 12:52 <span class="num">(20763687216)</span></td>
<td class="text-center">커밋 후 작업</td>
<td class="text-center"><b>실패</b></td>
<td class="text-center">더보기</td>
</tr>
</tbody>
</table>
<div class="paging">
<a href="#" class="btn-prev">이전</a>
<a href="#" class="current">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<span>...</span>
<a href="#">291</a>
<a href="#" class="btn-next">다음</a>
</div>
</div>
</div>
</div>
</div>
<script>
$('body').on('click', '.tab-link', function() {
$('.tab-link').removeClass('active');
$(this).addClass('active');
});
if($('#preactice-tab').attr('aria-selected')){
$('#preactice').addClass('active');
}
</script>
<?=$this->endSection();?>
<?=$this->section('footer');?>
<?=$this->endSection();?>
+97
View File
@@ -0,0 +1,97 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 전환 관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<body>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">전환 관리</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
<button class="btn-special ms-2" type="button" data-bs-toggle="modal" data-bs-target="#changeModal">등록</button>
</div>
</form>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<a href="/example/event_manage"><button type="button" class="btn btn-danger">이벤트 관리</button></a>
<a href="/company/list"><button type="button" class="btn btn-danger">광고주 관리</button></a>
<a href="/example/media_manage"><button type="button" class="btn btn-danger">매체 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:20%">
<col>
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">전환ID</th>
<th scope="col">전환명</th>
</tr>
</thead>
<tbody>
<tr>
<td>12378436743535</td>
<td>전국상상 무제한카톡5</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal')?>
<!-- 전환 등록 -->
<div class="modal fade" id="changeModal" tabindex="-1" aria-labelledby="changeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="changeModalLabel">등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">전환ID</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">전환명</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">Access Token</th>
<td><input type="text" class="form-control"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">확인</button>
<button type="button" class="btn btn-secondary">목록</button>
</div>
</div>
</div>
</div>
<!-- //전환 등록 -->
</body>
</html>
<?=$this->endSection();?>
+194
View File
@@ -0,0 +1,194 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 광고주 관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<body>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">광고주 관리</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
<button class="btn-special ms-2" type="button" data-bs-toggle="modal" data-bs-target="#clientModal">등록</button>
</div>
</form>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<button type="button" class="btn btn-danger">이벤트 관리</button>
<button type="button" class="btn btn-danger">매체 관리</button>
<button type="button" class="btn btn-danger">전환 관리</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:6%">
<col>
<col style="width:5%">
<col style="width:12%">
<col style="width:12%">
<col style="width:5%">
<col style="width:10%">
<col style="width:5%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">광고주명</th>
<th scope="col">유효DB</th>
<th scope="col">매출</th>
<th scope="col">남은잔액</th>
<th scope="col">랜딩수</th>
<th scope="col">사업자명</th>
<th scope="col">외부연동</th>
<th scope="col">개인정보 전문</th>
<th scope="col">사용여부</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
<tr>
<td>5054</td>
<td class="text-start">아이시티안과의원</td>
<td>0</td>
<td class="text-end">0</td>
<td class="text-end">2,342,656</td>
<td>1</td>
<td>체인지미의원</td>
<td>ㅇ</td>
<td>ㅇ</td>
<td>사용중</td>
<td>02-07</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<!-- 광고주 등록 -->
<div class="modal fade" id="clientModal" tabindex="-1" aria-labelledby="clientModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="clientModalLabel">광고주 등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">광고주명</th>
<td>
<input type="text" class="form-control">
<p class="mt-2 text-secondary">※ 한번 등록 된 광고주는 수정이 불가능합니다. 띄어쓰기, 오타 확인 꼭 해주세요.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">수집주체(사업자명)</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row" class="text-end">외부연동 주소</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">개인정보 전문 주소</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">입금액</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">사용여부</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="linkage_radio" id="linkage_radio01">
<label class="form-check-label" for="linkage_radio01">사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="linkage_radio" id="linkage_radio02">
<label class="form-check-label" for="linkage_radio02">사용중지</label>
</div>
</div>
<p class="text-secondary">※ 사용중지로 변경할 경우 해당 광고주의 모든 랜딩이 중지됩니다.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">문자 알림 사용여부</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="sms_radio" id="sms_radio01">
<label class="form-check-label" for="sms_radio01">사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="sms_radio" id="sms_radio02">
<label class="form-check-label" for="sms_radio02">미사용</label>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row" class="text-end">Notice</th>
<td>
<ul>
<li>* 00시 ~ 06시에는 문자를 발송하지 않습니다.</li>
<li>* 알림 문자는 매체별로 1일 1회 발송됩니다.</li>
<li>* 기타 문의사항은 [개발팀-정문숙]에게 문의 부탁드립니다.</li>
</ul>
</td>
</tr>
<tr>
<th scope="row" class="text-end">알림 연락처</th>
<td>
<input type="text" class="form-control mb-2">
<input type="text" class="form-control mb-2">
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row" class="text-end">페이스북</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">GDN</th>
<td><input type="text" class="form-control"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">확인</button>
<button type="button" class="btn btn-secondary">목록</button>
</div>
</div>
</div>
</div>
<!-- //광고주 등록 -->
</body>
<?=$this->endSection();?>
+359
View File
@@ -0,0 +1,359 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 기타 광고관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">기타 광고관리</h2>
<p class="title-disc">여라 매체의 광고를 확인 하세요~</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매체</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" class="active alert">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="alert">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="active">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">거무타</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">마디척병원○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[전국]상상의원_주름보톡스2*</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
</div>
</div>
<div class="section">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 이벤트 번호</h3>
<div>
</div>
</div>
<div class="section event-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 이벤트 구분</h3>
<div class="table-responsive">
<table class="table table-striped table-hover table-event">
<colgroup>
<col style="width:2%;">
<col style="width:7%;">
<col style="width:7%;">
<col style="width:5%">
<col>
<col style="width:5%">
<col>
<col style="width:5%;">
<col style="width:5%;">
<col style="width:5%;">
<col style="width:6%;">
<col style="width:5.5%;">
<col style="width:5%;">
<col style="width:5.5%;">
<col style="width:5.5%;">
<col style="width:5%;">
<col style="width:3%;">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col" rowspan="2"></th>
<th scope="col" rowspan="2">날짜</th>
<th scope="col" rowspan="2">이벤트 번호</th>
<th scope="col" rowspan="2">site</th>
<th scope="col" rowspan="2">광고주</th>
<th scope="col" rowspan="2">목표수량</th>
<th scope="col" rowspan="2">이벤트 구분</th>
<th scope="col" colspan="3">DB 수량</th>
<th scope="col" rowspan="2">정산DB단가</th>
<th scope="col" rowspan="2">소진금액(vat포함)</th>
<th scope="col" rowspan="2">vat별도</th>
<th scope="col" rowspan="2">현재DB단가</th>
<th scope="col" rowspan="2">수익</th>
<th scope="col" rowspan="2">수익률</th>
<th scope="col" rowspan="2">확인</th>
</tr>
<tr>
<th scope="col">총 DB</th>
<th scope="col">유효 DB</th>
<th scope="col" class="r-border">무효 DB</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="text-center"></td>
<td class="text-center"></td>
<td class="text-center" class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0%</td>
<td class="text-center"></td>
</tr>
<tr>
<td class="text-center"><input class="form-check-input" type="checkbox"></td>
<td><input type="text" class="form-control" value="20230314" disabled></td>
<td><input type="text" class="form-control" value="evt_3498" disabled></td>
<td><input type="text" class="form-control" value="2" disabled></td>
<td><input type="text" class="form-control" value="강남그랜드안과의원" disabled></td>
<td><input type="text" class="form-control"></td>
<td>라식라섹 의료법 최대 할인</td>
<td class="text-center">2</td>
<td class="text-center">2</td>
<td class="text-center" class="text-center">0</td>
<td><input type="text" class="form-control"></td>
<td><input type="text" class="form-control"></td>
<td>0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0%</td>
<td class="text-center"><input class="form-check-input" type="checkbox"></td>
</tr>
<tr>
<td class="text-center"><input class="form-check-input" type="checkbox"></td>
<td><input type="text" class="form-control" value="20230314" disabled></td>
<td><input type="text" class="form-control" value="evt_3498" disabled></td>
<td><input type="text" class="form-control" value="2" disabled></td>
<td><input type="text" class="form-control" value="강남그랜드안과의원" disabled></td>
<td><input type="text" class="form-control"></td>
<td>라식라섹 의료법 최대 할인</td>
<td class="text-center">2</td>
<td class="text-center">2</td>
<td class="text-center" class="text-center">0</td>
<td><input type="text" class="form-control"></td>
<td><input type="text" class="form-control"></td>
<td>0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0%</td>
<td class="text-center"><input class="form-check-input" type="checkbox"></td>
</tr>
<tr>
<td class="text-center"><input class="form-check-input" type="checkbox"></td>
<td><input type="text" class="form-control" value="20230314" disabled></td>
<td><input type="text" class="form-control" value="evt_3498" disabled></td>
<td><input type="text" class="form-control" value="2" disabled></td>
<td><input type="text" class="form-control" value="강남그랜드안과의원" disabled></td>
<td><input type="text" class="form-control"></td>
<td>라식라섹 의료법 최대 할인</td>
<td class="text-center">2</td>
<td class="text-center">2</td>
<td class="text-center" class="text-center">0</td>
<td><input type="text" class="form-control"></td>
<td><input type="text" class="form-control"></td>
<td>0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0%</td>
<td class="text-center"><input class="form-check-input" type="checkbox"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
+432
View File
@@ -0,0 +1,432 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 이벤트 관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">이벤트 관리</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
<button class="btn-special ms-2" type="button" data-bs-toggle="modal" data-bs-target="#regiModal">등록</button>
</div>
</form>
</div>
<div class="section">
<div class="btn-wrap text-end mb-2">
<a href="/company/list"><button type="button" class="btn btn-danger">광고주 관리</button></a>
<a href="/example/media_manage"><button type="button" class="btn btn-danger">매체 관리</button></a>
<a href="/example/change_manage"><button type="button" class="btn btn-danger">전환 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:6%">
<col style="width:10%">
<col style="width:5%">
<col>
<col style="width:12%">
<col style="width:5%">
<col style="width:5%">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">이벤트번호</th>
<th scope="col">광고주</th>
<th scope="col">매체</th>
<th scope="col">브라우저 타이틀</th>
<th scope="col">이벤트 구분</th>
<th scope="col">외부연동</th>
<th scope="col">사용여부</th>
<th scope="col">유입수</th>
<th scope="col">유효DB</th>
<th scope="col">DB단가</th>
<th scope="col">작성자</th>
<th scope="col">작업자</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
<tr>
<td><i class="ico red"></i> 5054</td>
<td>아이시티안과의원</td>
<td>페이스북</td>
<td>아이시티안과 라식라섹 최대 할인</td>
<td>라식라섹 최대 할인</td>
<td></td>
<td>사용중</td>
<td>0</td>
<td>0</td>
<td>50,000</td>
<td>전유빈</td>
<td></td>
<td>02-14</td>
</tr>
<tr>
<td><i class="ico green"></i> 5054</td>
<td>아이시티안과의원</td>
<td>페이스북</td>
<td>아이시티안과 라식라섹 최대 할인</td>
<td>라식라섹 최대 할인</td>
<td>ㅇ</td>
<td>사용중</td>
<td>0</td>
<td>0</td>
<td>50,000</td>
<td>전유빈</td>
<td>서지희</td>
<td>02-14</td>
</tr>
<tr>
<td><i class="ico"></i> 5054</td>
<td>아이시티안과의원</td>
<td>페이스북</td>
<td>아이시티안과 라식라섹 최대 할인</td>
<td>라식라섹 최대 할인</td>
<td>ㅇ</td>
<td>사용중</td>
<td>0</td>
<td>0</td>
<td>50,000</td>
<td>전유빈</td>
<td>서지희</td>
<td>02-14</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<!-- 이벤트 등록 -->
<div class="modal fade" id="regiModal" tabindex="-1" aria-labelledby="regiModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="regiModalLabel">이벤트 등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h2 class="body-title">이벤트 정보</h2>
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">랜딩번호</th>
<td>6124</td>
</tr>
<tr>
<th scope="row" class="text-end">랜딩주소</th>
<td>
<a href="#">https://event.asdkljad.com</a>
<button type="button" class="btn btn-secondary btn-sm">복사하기</button>
</td>
</tr>
<tr>
<th scope="row" class="text-end">광고주</th>
<td><input type="text" class="form-control" value="예쁨주의상상의원" disabled></td>
</tr>
<tr>
<th scope="row" class="text-end">매체</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">이벤트 구분</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">DB 단가</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">랜딩구분</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="landing_radio" id="landing_radio01">
<label class="form-check-label" for="landing_radio01">일반</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="landing_radio" id="landing_radio02">
<label class="form-check-label" for="landing_radio02">잠재고객</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="landing_radio" id="landing_radio03">
<label class="form-check-label" for="landing_radio03">비즈폼</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="landing_radio" id="landing_radio04">
<label class="form-check-label" for="landing_radio04">엑셀업로드</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="landing_radio" id="landing_radio05">
<label class="form-check-label" for="landing_radio05">API수신</label>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row" class="text-end">외부연동 사용여부</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="linkage_radio" id="linkage_radio01">
<label class="form-check-label" for="linkage_radio01">사용</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="linkage_radio" id="linkage_radio02">
<label class="form-check-label" for="linkage_radio02">미사용</label>
</div>
</div>
<div class="d-flex mb-2">
<input type="text" class="form-control me-2">
<input type="text" class="form-control">
</div>
<div class="d-flex">
<input type="text" class="form-control me-2">
<input type="text" class="form-control">
</div>
</td>
</tr>
<tr>
<th scope="row" class="text-end">랜딩 고정값</th>
<td>
<div class="d-flex mb-2">
<select class="form-select me-2" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<input type="text" class="form-control">
</div>
<div class="d-flex mb-2">
<select class="form-select me-2" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<input type="text" class="form-control">
</div>
<button type="button" class="btn btn-primary btn-sm float-end">추가</button>
</td>
</tr>
<tr>
<th scope="row" class="text-end">브라우저 제목(타이틀)</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">키워드</th>
<td>
<input type="text" class="form-control">
<p class="mt-2 text-secondary">※ 이벤트의 핵심 키워드를 입력해주세요.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">설명</th>
<td><input type="text" class="form-control" placeholder="이벤트를 구체적으로 설명해주세요. (약 40자내외, 최대 100자이내)"></td>
</tr>
<tr>
<th scope="row" class="text-end">수집목적</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">수집항목</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">페이스북 Pixel ID</th>
<td><input type="text" class="form-control" placeholder="페이스북 픽셀을 사용하는 경우 체인쏘우에 등록된 픽셀ID를 입력해 주세요."></td>
</tr>
<tr>
<th scope="row" class="text-end">View Script</th>
<td><textarea placeholder="추적스크립트(View)"></textarea></td>
</tr>
<tr>
<th scope="row" class="text-end">Complete Script</th>
<td><textarea placeholder="추적스크립트(Complete)"></textarea></td>
</tr>
<tr>
<th scope="row" class="text-end">사용여부</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="linkage_radio" id="linkage_radio01">
<label class="form-check-label" for="linkage_radio01">사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="linkage_radio" id="linkage_radio02">
<label class="form-check-label" for="linkage_radio02">미사용</label>
</div>
</div>
<p class="text-secondary">※ 광고주가 사용중지로 되어있을 경우 랜딩은 노출되지 않습니다.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2 class="body-title">이벤트 정보</h2>
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">성별</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="gender_radio" id="gender_radio01">
<label class="form-check-label" for="gender_radio01">무관</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="gender_radio" id="gender_radio02">
<label class="form-check-label" for="gender_radio02">남</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="gender_radio" id="gender_radio03">
<label class="form-check-label" for="gender_radio03">여</label>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row" class="text-end">나이</th>
<td>
<div class="d-flex align-items-center">
<input type="text" class="form-control">
<span class="m-2">~</span>
<input type="text" class="form-control">
</div>
</td>
</tr>
<tr>
<th scope="row" class="text-end">중복기간</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio01">
<label class="form-check-label" for="term_radio01">1일</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio02">
<label class="form-check-label" for="term_radio02">1주</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio03">
<label class="form-check-label" for="term_radio03">1개월</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio04">
<label class="form-check-label" for="term_radio04">2개월</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio05">
<label class="form-check-label" for="term_radio05">3개월</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio06">
<label class="form-check-label" for="term_radio06">4개월</label>
</div>
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio07">
<label class="form-check-label" for="term_radio07">5개월</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="term_radio" id="term_radio08">
<label class="form-check-label" for="term_radio08">전체</label>
</div>
</div>
<p class="text-secondary">※ 중복기간 변경이후 시점의 DB부터 적용됩니다.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">전화번호 중복</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="phone_radio" id="phone_radio01">
<label class="form-check-label" for="phone_radio01">미사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="phone_radio" id="phone_radio02">
<label class="form-check-label" for="phone_radio02">사용</label>
</div>
</div>
<p class="text-secondary">※ 전화번호 중복 사용/미사용 변경이후 시점의 DB부터 적용됩니다.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">이름 중복</th>
<td>
<div class="d-flex radio-wrap">
<div class="form-check me-3">
<input class="form-check-input" type="radio" name="name_radio" id="name_radio01">
<label class="form-check-label" for="name_radio01">미사용</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="name_radio" id="name_radio02">
<label class="form-check-label" for="name_radio02">사용</label>
</div>
</div>
<p class="text-secondary">※ 이름 중복 사용/미사용 변경이후 시점의 DB부터 적용됩니다.</p>
</td>
</tr>
<tr>
<th scope="row" class="text-end">사전 중복 체크</th>
<td>
<select class="form-select me-2" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">복사</button>
<button type="button" class="btn btn-danger">삭제</button>
<button type="button" class="btn btn-secondary">목록</button>
<button type="button" class="btn btn-primary">목록 수정하기</button>
</div>
</div>
</div>
</div>
<!-- //이벤트 등록 -->
<?=$this->endSection();?>
+221
View File
@@ -0,0 +1,221 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>페이스북 광고관리_연습</title>
</head>
<body>
<div class="wrap d-flex">
<div class="left-side">
<h1 class="logo"><a href="/"><img src="/img/logo.png" alt="ZENITH"></a></h1>
<ul class="nav flex-column">
<li>
<button data-bs-toggle="collapse" data-bs-target="#ad" aria-expanded="true">광고 관리</button>
<div class="collapse show" id="ad">
<ul class="btn-toggle-nav">
<li><a href="#" class="active">페이스북</a></li>
<li><a href="#">카카오 모먼트</a></li>
<li><a href="#">구글 애드워즈</a></li>
<li><a href="#">기타</a></li>
</ul>
</div>
</li>
<li>
<button>통합 DB 관리</button>
</li>
<li>
<button data-bs-toggle="collapse" data-bs-target="#accounting" aria-expanded="false">회계 관리</button>
<div class="collapse" id="accounting">
<ul class="btn-toggle-nav">
<li><a href="#">출금요청</a></li>
<li><a href="#">세금계산서 요청</a></li>
<li><a href="#">미수금 관리</a></li>
</ul>
</div>
</li>
<li>
<button>인사 관리</button>
</li>
<li>
<button data-bs-toggle="collapse" data-bs-target="#event" aria-expanded="false">이벤트</button>
<div class="collapse" id="event">
<ul class="btn-toggle-nav">
<li><a href="#">이벤트 관리</a></li>
<li><a href="#">광고주 관리</a></li>
<li><a href="#">매체 관리</a></li>
<li><a href="#">전환 관리</a></li>
<li><a href="#">엑셀 업로드</a></li>
</ul>
</div>
</li>
</ul>
<div class="util-nav">
<a href="#">마이페이지</a>
<a href="#">로그아웃</a>
</div>
</div>
<main class="contents-wrap">
<form class="ad-management text-center">
<div class="row">
<div class="title">
<h1>페이스북 광고관리</h1>
<p>숫자 중심의 퍼포먼스 마케팅에 집중! 사람들이 어떤 콘텐츠에 반응하는가? 비용 대비 얼만큼의 성과가 있는가?</p>
</div>
<div class="type">
<div class="summary">
<div class="search d-flex">
<input class="form-control me-2" type="search" placeholder="검색어를 입력하세요" aria-label="Search">
<button class="btn btn-primary" type="submit">조회</button>
</div>
</div>
<div class="detail">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
</div>
<article class="row menu account">
<div class="title">
<i class="check-circle"></i><strong>비지니스 계정</strong>
<span class="line"></span>
</div>
<div class="btn-tab d-flex">
<a href="#" class="btn-management active btn-primary"><span>열혈 패밀리</span></a>
<a href="#" class="btn-management btn-primary"><span>케어랩스5</span></a>
<a href="#" class="btn-management btn-primary"><span>케어랩스7케어랩스7케어랩스</span></a>
</div>
</article>
<article class="row menu advertiser">
<div class="title">
<i class="check-circle"></i><strong>광고주</strong>
<span class="line"></span>
</div>
<div class="btn-tab d-flex">
<a href="#" class="btn-management active btn-primary"><span>[대전]상상의원_가나다라마바</span></a>
<a href="#" class="btn-management btn-primary"><span>플란치과_임플</span></a>
<a href="#" class="btn-management btn-primary"><span>비결뷰티센터</span></a>
</div>
</article>
<section class="row">
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-selected="true">캠페인</button>
</li>
<li class="nav-item">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-selected="false">광고세트</button>
</li>
<li class="nav-item">
<button class="nav-link" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-selected="false">광고</button>
</li>
</ul>
<div class="tab-content">
<div class="btn-tab d-flex">
<a href="#" class="btn btn-outline-primary"><span>수동 업데이트</span></a>
<a href="#" class="btn btn-outline-primary"><span>데이터 비교</span></a>
<a href="#" class="btn btn-outline-primary"><span>메모확인</span></a>
</div>
<div class="tab-pane active" id="home" aria-labelledby="home-tab">캠페인</div>
<div class="tab-pane" id="profile" aria-labelledby="profile-tab">광고세트</div>
<div class="tab-pane" id="messages" aria-labelledby="messages-tab">광고</div>
</div>
</section>
<!-- <div class="row">
<div class="type">
<div class="summary">
<strong><i class="google"></i>구글 애드워즈</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd>46.51</dd>
</dl>
<dl>
<dt>수익</dt>
<dd>953,458</dd>
</dl>
</div>
<div class="detail row">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<a href="#" class="btn-more btn-primary"><span>더보기</span></a>
</div> -->
</form>
</main>
</div>
<script>
var firstTabEl = document.querySelector('#myTab li:last-child button')
var firstTab = new bootstrap.Tab(firstTabEl)
firstTab.show()
</script>
</body>
</html>
<?=$this->endSection();?>
+76
View File
@@ -0,0 +1,76 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 엑셀 업로드
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">엑셀 업로드</h2>
</div>
<div class="section ">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:20%;">
<col style="width:80%;">
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="3" class="text-end align-top pt-3">엑셀</th>
<td>
<input class="form-control" type="file" id="formFile">
</td>
</tr>
<tr>
<td>
<span class="text-primary">[업로드 가이드]</span>
<table class="table table-bordered mb-0">
<colgroup>
<col style="width:20%;">
<col style="width:80%;">
</colgroup>
<tbody>
<tr>
<th scope="col" class="align-middle">연동가능 광고주</th>
<td>
리얼딥<br>
하늘안과의원<br>
밝은성모안과병원<br>
리얼딥<br>
하늘안과의원<br>
밝은성모안과병원<br>
리얼딥<br>
하늘안과의원<br>
</td>
</tr>
<tr>
<th scope="col">샘플</th>
<td><a href="#">샘플 다운로드</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<b>※ 업로드 유의사항</b>
<ul>
<li>1. 반드시 지정된 양식에 맞춘 csv 파일을 업로드 부탁드립니다.</li>
<li>2. 신규 랜딩 번호로 DB 업로드 필요시 개발팀에 알림 부탁드립니다.</li>
<li>3. 등록된 연동가능 광고주 외의 연동이 필요한 DB는 업로드 전 개발팀에 알림 부탁드립니다.</li>
<li>4. 연동 시 랜딩번호, 광고주 항목 입력은 필수입니다.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn-area text-center">
<button type="button" class="btn btn-primary">확인</button>
<a href="/example/event_manage"><button type="button" class="btn btn-secondary">이벤트 목록</button></a>
</div>
</div>
</div>
<?=$this->endSection();?>
+446
View File
@@ -0,0 +1,446 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 페이스북 광고관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">페이스북 광고관리</h2>
<p class="title-disc">숫자 중심의 퍼포먼스 마케팅에 집중! 사람들이 어떤 콘텐츠에 반응하는가? 비용 대비 얼만큼의 성과가 있는가?</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매체</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 비즈니스 계정</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" class="active alert">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="alert">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="active">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">거무타</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">마디척병원○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[전국]상상의원_주름보톡스2*</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" type="button" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" type="button" role="tab" aria-controls="set-tab-pane" aria-selected="false">광고 세트</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" type="button" role="tab" aria-controls="advertisement-tab-pane" aria-selected="false">광고</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:10%">
<col style="width:5.5%">
<col style="width:5%">
<col style="width:5%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">예산 <br>ai</th>
<th scope="col">목표 <br>ai</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="col" class="text-center">캠페인 11건 결과</th>
<td></td>
<td></td>
<td></td>
<td>₩22,345,222</td>
<td>₩30,342</td>
<td>515</td>
<td>₩18,345,342</td>
<td>₩6,235,666</td>
<td>29.45%</td>
<td>₩21,345,678</td>
<td>654,345</td>
<td>9,457</td>
<td>₩1,778</td>
<td>1.13%</td>
<td>6.34%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<button type="button" class="btn btn-outline-secondary btn-sm">활성</button>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>ON</td>
<td>ON</td>
<td>₩100,000
<div class="btn-area d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-up-short"></i></button>
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-down-short"></i></button>
</div>
</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<button type="button" class="btn btn-outline-secondary btn-sm">활성</button>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>ON</td>
<td>ON</td>
<td>₩100,000
<div class="btn-area d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-up-short"></i></button>
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-down-short"></i></button>
</div>
</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<button type="button" class="btn btn-outline-secondary btn-sm">활성</button>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>ON</td>
<td>ON</td>
<td>₩100,000
<div class="btn-area d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-up-short"></i></button>
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-down-short"></i></button>
</div>
</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
광고 세트
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
광고
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
+355
View File
@@ -0,0 +1,355 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 구글 애드워즈 광고관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">구글 애드워즈 광고관리</h2>
<p class="title-disc">광고주별 매체의 기본적인 광고 합성/종료/수정의 기능을 제공하고 있으며, 추가적으로 CHAIN에서 개발한 스마트하게 광고를 최적화 시켜주는 기능도 함께 이용할 수 있습니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>수익</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>수익율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매니저 계정</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" class="active alert">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="alert">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="active">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">거무타</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">마디척병원○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[전국]상상의원_주름보톡스2*</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" type="button" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" type="button" role="tab" aria-controls="set-tab-pane" aria-selected="false">광고 그룹</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" type="button" role="tab" aria-controls="advertisement-tab-pane" aria-selected="false">소재</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col>
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">입찰 <br>유형</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="col" class="text-center">캠페인 11건 결과</th>
<td></td>
<td></td>
<td>₩22,345,222</td>
<td>₩30,342</td>
<td>515</td>
<td>₩18,345,342</td>
<td>₩6,235,666</td>
<td>29.45%</td>
<td>₩21,345,678</td>
<td>654,345</td>
<td>9,457</td>
<td>₩1,778</td>
<td>1.13%</td>
<td>6.34%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<select name="" class="form-select">
<option value="">활성</option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select>
</td>
<td></td>
<td>₩100,000</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
광고 그룹
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
소재
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
+169
View File
@@ -0,0 +1,169 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>ZENITH</title>
</head>
<body>
<div class="main-contents-wrap">
<div class="ad-list text-center">
<div class="row">
<div class="type">
<div class="summary">
<strong><i class="facebook"></i>페이스북</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd>46.51</dd>
</dl>
<dl>
<dt>수익</dt>
<dd>953,458</dd>
</dl>
</div>
<div class="ad-detail-info row">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<a href="#" class="btn-more btn-primary"><span>더보기</span></a>
</div>
<div class="row">
<div class="type">
<div class="summary">
<strong><i class="kakao"></i>카카오 모먼트</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd>46.51</dd>
</dl>
<dl>
<dt>수익</dt>
<dd>953,458</dd>
</dl>
</div>
<div class="ad-detail-info row">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<a href="#" class="btn-more"><span>더보기</span></a>
</div>
<div class="row">
<div class="type">
<div class="summary">
<strong><i class="google"></i>구글 애드워즈</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd>46.51</dd>
</dl>
<dl>
<dt>수익</dt>
<dd>953,458</dd>
</dl>
</div>
<div class="ad-detail-info row">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<a href="#" class="btn-more btn-primary"><span>더보기</span></a>
</div>
</div>
</div>
</body>
</html>
<?=$this->endSection();?>
+344
View File
@@ -0,0 +1,344 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 카카오 모먼트 광고관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">카카오 모먼트 광고관리</h2>
<p class="title-disc">광고주별 매체의 기본적인 광고 합성/종료/수정의 기능을 제공하고 있으며, 추가적으로 CHAIN에서 개발한 스마트하게 광고를 최적화 시켜주는 기능도 함께 이용할 수 있습니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>매체비</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>수익율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" class="active alert">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="alert">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="active">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">거무타</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">마디척병원○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[전국]상상의원_주름보톡스2*</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" type="button" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" type="button" role="tab" aria-controls="set-tab-pane" aria-selected="false">광고 그룹</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" type="button" role="tab" aria-controls="advertisement-tab-pane" aria-selected="false">소재</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col>
<col style="width:7%">
<col style="width:7%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">목표 <br>ai</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="col" class="text-center">캠페인 11건 결과</th>
<td></td>
<td></td>
<td>₩22,345,222</td>
<td>₩30,342</td>
<td>515</td>
<td>₩18,345,342</td>
<td>₩6,235,666</td>
<td>29.45%</td>
<td>₩21,345,678</td>
<td>654,345</td>
<td>9,457</td>
<td>₩1,778</td>
<td>1.13%</td>
<td>6.34%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td class="align-top">
<select name="" class="form-select">
<option value="">활성</option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>
<select name="" class="form-select">
<option value="">활성</option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select>
</td>
<td>₩100,000</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
광고 그룹
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
소재
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
+102
View File
@@ -0,0 +1,102 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.login') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container-fluid exam-container" id="login">
<div class="card col-10 col-md-5">
<div class="card-body">
<h5 class="card-title"></h5>
<?php if (session('error') !== null) : ?> <!-- 패스워드, alert -->
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if (session('message') !== null) : ?>
<div class="alert alert-success" role="alert"><?= session('message') ?></div>
<?php endif ?>
<form action="<?= url_to('login') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="fa fa-envelope-o"></i>
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Email') ?>" value="<?= old('email') ?>"/>
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<i class="bi bi-lock"></i>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="current-password" placeholder="<?= lang('Auth.password') ?>" />
<?php if (setting('Auth.allowMagicLinkLogins')) : ?>
<p class="text-center forgot"><a href="<?= url_to('magic-link') ?>"><?= lang('Forgot?') ?></a></p>
<?php endif ?>
</div>
<!-- Remember me -->
<?php if (setting('Auth.sessionConfig')['allowRemembering']): ?>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')): ?> checked<?php endif ?>>
<span><?= lang('Auth.rememberMe') ?></span>
</label>
</div>
<?php endif; ?>
<div class="m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.login') ?></button>
</div>
<?php if (setting('Auth.allowRegistration')) : ?>
<div class="text-start"><?= lang('Auth.needAccount') ?> <a href="<?= url_to('register') ?>"><?= lang('Auth.register') ?></a></div>
<?php endif ?>
</form>
</div>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.exam-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},200);
// 타이핑 효과
let typingTxt = 'Login';
let typingIdx = 0;
let tyInt = setInterval(typing,250);
typingTxt=typingTxt.split("");
function typing(){
if(typingIdx < typingTxt.length){
$('h5.card-title').append(typingTxt[typingIdx]);
typingIdx++;
}else{
clearInterval(tyInt);
}
}
</script>
<?= $this->endSection() ?>
+131
View File
@@ -0,0 +1,131 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.login') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="wrap">
<div class="container-fluid exam02-container">
<div class="btn btn-outline-primary">
<button type="button" class="drag box" id="drag" draggable="true">Not a member? Sign up
<div class="item" id="item" draggable="true"></div>
</button>
<!-- <?php if (setting('Auth.allowRegistration')) : ?>
<div class="text-start"><?= lang('Auth.needAccount') ?> <a href="<?= url_to('register') ?>"><?= lang('Auth.register') ?></a></div>
<?php endif ?> -->
</div>
<div class="card col-10 col-md-5">
<div class="card-body">
<h5 class="card-title">SIGN IN</h5>
<?php if (session('error') !== null) : ?> <!-- 패스워드, alert -->
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if (session('message') !== null) : ?>
<div class="alert alert-success" role="alert"><?= session('message') ?></div>
<?php endif ?>
<form action="<?= url_to('login') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2 position-relative">
<p>EMAIL ADDRESS</p>
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Email') ?>" value="<?= old('email') ?>"/>
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<p>PASSWORD</p>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="current-password" placeholder="<?= lang('Auth.password') ?>" />
</div>
<!-- Remember me -->
<?php if (setting('Auth.sessionConfig')['allowRemembering']): ?>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')): ?> checked<?php endif ?>>
<span><?= lang('Auth.rememberMe') ?></span>
</label>
</div>
<?php endif; ?>
<button type="submit" class="btn btn-primary btn-block"><?= lang('SIGN IN') ?></button>
<?php if (setting('Auth.allowMagicLinkLogins')) : ?>
<p class="text-center forgot"><a href="<?= url_to('magic-link') ?>"><?= lang('Forgot password') ?></a></p>
<?php endif ?>
</form>
</div>
</div>
</div>
</div>
<script>
const item = document.querySelector('.item');
const boxes = document.querySelectorAll('.box');
const target = document.querySelector('.target');
item.addEventListener('dragstart', dragStart);
boxes.forEach(box => {
box.addEventListener('dragenter', dragEnter)
box.addEventListener('dragover', dragOver);
box.addEventListener('dragleave', dragLeave);
box.addEventListener('drop', drop);
});
function dragStart(e) {
e.dataTransfer.setData('text/plain', e.target.id);
setTimeout(() => {
e.target.classList.add('hide');
}, 0);
}
function dragEnter(e) {
e.preventDefault();
e.target.classList.add('drag-over'); //
console.log('dragEnter')
}
function dragOver(e) {
e.preventDefault();
e.target.classList.add('drag-over');
console.log('dragOver')
}
function dragLeave(e) {
e.target.classList.remove('drag-over');
item.classList.remove('hide');
console.log('dragLeave')
}
function drop(e) {
e.target.classList.remove('drag-over');
console.log('drop')
const id = e.dataTransfer.getData('text/plain');
const draggable = document.getElementById(id);
e.target.appendChild(draggable);
draggable.classList.remove('hide');
location.href = "https://zenith.chainsaw.co.kr/example/signUP";
}
</script>
<?= $this->endSection() ?>
+67
View File
@@ -0,0 +1,67 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.login') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<!-- ===================================================== -->
<div class="row container-fluid register-container">
<div class="card col-lg-6 col-12">
<form action="<?= url_to('login') ?>" method="post">
<?= csrf_field() ?>
<h1 class="card-title">로그인</h1>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="bi bi-person-check"></i>
<input type="text" class="form-control" name="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" />
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<i class="fa fa-envelope-o"></i>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="current-password" placeholder="<?= lang('Auth.password') ?>" />
</div>
<!-- Remember me -->
<?php if (setting('Auth.sessionConfig')['allowRemembering']): ?>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')): ?> checked<?php endif ?>>
<?= lang('Auth.rememberMe') ?>
</label>
</div>
<?php endif; ?>
<div class="my-5">
<button type="submit" class="btn btn-outline-primary btn-block"><?= lang('Auth.login') ?></button>
</div>
<?php if (setting('Auth.allowMagicLinkLogins')) : ?>
<p class="text-start"><a href="<?= url_to('magic-link') ?>"><?= lang('Auth.forgotPassword') ?> </a></p>
<?php endif ?>
<?php if (setting('Auth.allowRegistration')) : ?>
<p class="text-start"><a href="<?= url_to('register') ?>"><?= lang('Auth.register') ?></a></p>
<?php endif ?>
</form>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.register-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
</script>
<!-- ======================================================== -->
<?= $this->endSection() ?>
+218
View File
@@ -0,0 +1,218 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 시간차 관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">시간차 관리</h2>
<button type="button" class="btn btn-dark ms-3" data-bs-toggle="modal" data-bs-target="#totalModal">전체조회</button>
</div>
<div class="row mt-5">
<div class="col half">
<h3 class="content-title">결재내역</h3>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:10%">
<col>
<col style="width:20%">
<col style="width:17%">
<col style="width:15%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">작성자</th>
<th scope="col">작성일</th>
<th scope="col">문서번호</th>
<th scope="col">연차차감</th>
<th scope="col">발급쿠폰</th>
<th scope="col">결과</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6" class="none">검색된 데이터가 없습니다.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col half">
<h3 class="content-title">신청현황</h3>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:20%">
<col>
<col style="width:30%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">날짜</th>
<th scope="col">쿠폰사용</th>
<th scope="col">사용시간</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="d-flex">
<input type="text" class="form-control">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
</td>
<td></td>
<td>
<div class="d-flex align-items-center">
<select class="form-select" aria-label="시간 선택">
<option selected>-선택-</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<span class="m-1">시</span>
<select class="form-select" aria-label="분 선택">
<option selected>-선택-</option>
<option value="1">00</option>
<option value="2">10</option>
<option value="3">20</option>
</select>
<span class="ms-1">분</span>
</div>
</td>
<td>
<button type="button" class="btn btn-danger">등록</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:15%">
<col>
<col style="width:20%">
<col style="width:15%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">사용자</th>
<th scope="col">쿠폰사용</th>
<th scope="col">사용일자</th>
<th scope="col">시간</th>
<th scope="col">결과</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="5" class="none">검색된 데이터가 없습니다.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<div class="modal fade" id="totalModal" tabindex="-1" aria-labelledby="totalModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="totalModalLabel">전체 조회</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="d-flex justify-content-between align-items-center">
<form class="row g-1">
<div class="col-5 d-flex align-items-center">
<input type="text" class="form-control">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span class="me-2"> ~ </span>
<input type="text" class="form-control">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="col-7 d-flex">
<input type="password" class="form-control">
<button type="submit" class="btn btn-primary w-25 ms-2">조회</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-bordered table-modal">
<colgroup>
<col>
<col style="width:11%;">
<col style="width:8%;">
<col style="width:10%;">
<col style="width:10%;">
<col style="width:8%;">
</colgroup>
<thead>
<tr>
<th scope="col" rowspan="2" class="align-middle">사용자</th>
<th scope="col" colspan="2">검색기간</th>
<th scope="col" colspan="3">전체</th>
</tr>
<tr>
<th scope="col">발급</th>
<th scope="col">사용</th>
<th scope="col">발급</th>
<th scope="col">사용</th>
<th scope="col">잔여</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6" class="none">검색된 데이터가 없습니다.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
+533
View File
@@ -0,0 +1,533 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<div class="sub-contents-wrap container-user-management">
<div class="modal fade" id="modalUpdate" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">사용자 수정</h5>
</div>
<div class="modal-body">
<form id="frm">
<input type="hidden" name="id" id="hidden_id">
<div class="form-group">
<label for="username">이름</label>
<input type="text" name="username" id="username" class="form-control">
<span id="username_error" class="text-danger"></span>
</div>
<?php if(auth()->user()->inGroup('superadmin', 'admin', 'developer')){?>
<div class="form-group">
<label for="group">권한</label>
<select name="group" class="form-control" multiple="multiple" id="userGroup">
<option value="superadmin">최고관리자</option>
<option value="admin">관리자</option>
<option value="developer">개발자</option>
<option value="agency">광고대행사</option>
<option value="advertiser">광고주</option>
<option value="user">사용자</option>
<option value="guest">게스트</option>
</select>
<span id="groups_error" class="text-danger"></span>
</div>
<div class="form-group">
<label for="permission">세부 권한</label>
<select name="permission" class="form-control" multiple="multiple" id="userPermission">
<option value="admin.access">관리자만 가능한 페이지 접근 가능</option>
<option value="admin.settings">관리자만 가능한 설정 접근 가능</option>
<option value="users.create">회원 생성</option>
<option value="users.edit">회원 수정</option>
<option value="users.delete">회원 삭제</option>
<option value="agency.access">대행사 목록 페이지</option>
<option value="agency.advertisers">대행사 하위 광고주 관리</option>
<option value="agency.create">대행사 생성</option>
<option value="agency.edit">대행사 수정</option>
<option value="agency.delete">대행사 삭제</option>
<option value="advertiser.access">광고주 목록 페이지</option>
<option value="advertiser.create">광고주 생성</option>
<option value="advertiser.edit">광고주 수정</option>
<option value="advertiser.delete">광고주 삭제</option>
</select>
<span id="permission_error" class="text-danger"></span>
</div>
<?php }?>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="userUpdateBtn">저장</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalView" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal">
<div class="modal-content">
<div class="modal-header justify-content-start">
<h5 class="modal-title"><i class="bi bi-person-fill"></i>사용자</h5>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th scope="col">이름</th>
<th>소속</th>
<th>권한</th>
<th>가입일</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="viewName"></span></td></td>
<td><span id="viewCompany"></span></td>
<td><span id="viewGroup"></span></td>
<td><span id="viewDate"></span></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<?php if(auth()->user()->inGroup('superadmin', 'admin', 'developer')){
echo '<a href="/users/belong" class="btn btn-primary" id="userBelong">소속 수정</a>';
}?>
<button type="button" class="btn btn-primary" id="userUpdateModal">수정</button>
<button type="button" class="btn btn-danger" id="userDelete">삭제</button>
</div>
</div>
</div>
</div>
<div class="title-area">
<h2 class="page-title">사용자 관리</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text" class="form-control" id="fromDate" name="fromDate" placeholder="날짜 선택" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text" class="form-control" id="toDate" name="toDate" placeholder="날짜 선택" readonly="readonly">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input type="text" class="form-control" id="search" name="search" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
<div class="row d-flex justify-content-between align-items-center filter-btn-wrap">
<!-- <dl class="col">
<dt>
<select name="sort" id="sort" class="form-control text-center">
<option value="정렬">정렬</option>
<option value="recent">최근순</option>
<option value="old">오래된 순</option>
</select>
</dt>
</dl> -->
<!-- <dl class="col">
<dt>
<select name="pageLimit" id="pageLimit" class="form-control text-center">
<option value="게시물수">게시물수</option>
<option value="10">10개</option>
<option value="50">50개</option>
<option value="100">100개</option>
</select>
</dt>
</dl> -->
<div class="btn-wrap">
<button type="button" class="btn btn-danger"><input type="radio" name="sort" vlaue="recent">최근순</button>
<button type="button" class="btn btn-danger"><input type="radio" name="sort" vlaue="old">오래된 순</button>
<button type="button" class="btn btn-danger"><input type="radio" name="pageLimit" vlaue="10">10개</button>
<button type="button" class="btn btn-danger"><input type="radio" name="pageLimit" vlaue="50">50개</button>
<button type="button" class="btn btn-danger"><input type="radio" name="pageLimit" vlaue="100">100개</button>
</div>
<div class="col">
<button id="DataResetBtn" class="btn btn-reset">초기화</button>
</div>
</div>
</div>
<div class="section client-list">
<h3 class="content-title"><i class="bi bi-chevron-up"></i>검색결과:<span id="allCount"></span></h3>
</div>
<div class="table-wrap">
<div class="table-content">
<div class="table-responsive">
<table class="table table-striped table-hover table-default" id="user">
<colgroup>
<col style="width:10%">
<col style="width:*">
<col style="width:*">
<col style="width:*">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">이름</th>
<th scope="col">권한</th>
<th scope="col">가입일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="row pagination-container m-4">
<ul class="pagination justify-content-center"></ul>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('script');?>
<script>
$('input[name="sort"]').bind('click', function(){
console.log($('input[name="sort"]').val());
});
var alertMessage = "<?php echo session('message'); ?>";
if(alertMessage) {
alert(alertMessage);
}
$(document).ready(function(){
getUserList();
function getUserList(page, limit, search, sort, startDate, endDate){
data = {
'page': page ? page : 1,
'limit': limit ? limit : 10,
'search': search ? search : '',
'sort': sort ? sort : 'recent',
'startDate': startDate ? startDate : '',
'endDate': endDate ? endDate : '',
}
console.log(data);
$.ajax({
type: "get",
url: "<?=base_url()?>/users",
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(xhr){
setTable(xhr);
setPaging(xhr);
setAllCount(xhr);
setDate(xhr);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setPaging(xhr){
if(xhr.pager.pageCount == 0){
xhr.pager.pageCount = 1;
}
$('.pagination').twbsPagination('destroy');
$('.pagination').twbsPagination({
totalPages: xhr.pager.pageCount, // 총 페이지 번호 수
visiblePages: 5, // 하단에서 한번에 보여지는 페이지 번호 수
startPage : xhr.pager.currentPage, // 시작시 표시되는 현재 페이지
initiateStartPageClick: false, // 플러그인이 시작시 페이지 버튼 클릭 여부 (default : true)
first : "첫 페이지", // 페이지네이션 버튼중 처음으로 돌아가는 버튼에 쓰여 있는 텍스트
prev : "이전 페이지", // 이전 페이지 버튼에 쓰여있는 텍스트
next : "다음 페이지", // 다음 페이지 버튼에 쓰여있는 텍스트
last : "마지막 페이지", // 페이지네이션 버튼중 마지막으로 가는 버튼에 쓰여있는 텍스트
nextClass : "page-item next", // 이전 페이지 CSS class
prevClass : "page-item prev", // 다음 페이지 CSS class
lastClass : "page-item last", // 마지막 페이지 CSS calss
firstClass : "page-item first", // 첫 페이지 CSS class
pageClass : "page-item", // 페이지 버튼의 CSS class
activeClass : "active", // 클릭된 페이지 버튼의 CSS class
disabledClass : "disabled", // 클릭 안된 페이지 버튼의 CSS class
anchorClass : "page-link", //버튼 안의 앵커에 대한 CSS class
onPageClick: function (event, page) {
console.log(xhr.pager.limit);
getUserList(page, xhr.pager.limit, xhr.pager.search, xhr.pager.sort, xhr.pager.startDate, xhr.pager.endDate)
}
});
}
function setTable(xhr){
$('#user tbody').empty();
console.log(xhr);
$.each(xhr.result, function(index, item){
index++
item.groups = item.groups.map(function(group) {
group = group.replace('superadmin', '최고관리자');
group = group.replace('admin', '관리자');
group = group.replace('developer', '개발자');
group = group.replace('user', '사용자');
group = group.replace('agency', '광고대행사');
group = group.replace('advertiser', '광고주');
group = group.replace('guest', '게스트');
return group;
});
$('<tr id="userView" data-id="'+item.id+'">').append('<td>'+item.id+'</td>')
.append('<td>'+item.username+'</td>')
.append('<td>'+item.groups+'</td>')
.append('<td>'+item.created_at.date.substr(0, 16)+'</td>')
.appendTo('#user');
});
}
function setAllCount(xhr){
console.log(xhr.pager.total);
if(xhr.pager.total == 0){
$total = 0;
}else{
$total = xhr.pager.total;
}
$('#allCount').text("총 "+$total+"개");
}
function setDate(xhr){
if($('#fromDate, #toDate').length){
var currentDate = moment().format("YYYY-MM-DD");
$('#fromDate, #toDate').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
"alwaysShowCalendars": true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function(start, end, label) {
// console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $('#fromDate');
$checkoutInput = $('#toDate');
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
getUserList(1, $('#pageLimit').val(), $('#search').val(), $('#sort').val(), startDate, endDate);
});
}
}
//페이지 게시글 갯수
$('body').on('change', '#pageLimit', function(){
getUserList(
1,
$(this).val(),
$('#search').val(),
$('#sort').val(),
$('#fromDate').val(),
$('#toDate').val(),
console.log(`이것은`, $('#sort').val())
);
})
//검색
$('body').on('keyup', '#search', function(){
getUserList(
1,
$('#pageLimit').val(),
$(this).val(),
$('#sort').val(),
$('#fromDate').val(),
$('#toDate').val(),
);
})
//분류
$('body').on('change', '#sort', function(){
getUserList(
1,
$('#pageLimit').val(),
$('#search').val(),
$(this).val(),
$('#fromDate').val(),
$('#toDate').val(),
);
})
$('#dateRange').on('cancel.daterangepicker', function (ev, picker) {
$(this).val('');
getUserList(1, $('#pageLimit').val(), $('#search').val(), $('#sort').val());
});
//유저보기
$('body').on('click', '#userView', function(){
let id = $(this).attr('data-id');
$.ajax({
type: "get",
url: "<?=base_url()?>/users/"+id,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
data.result.groups = data.result.groups.map(function(group) {
group = group.replace('superadmin', '최고관리자');
group = group.replace('admin', '관리자');
group = group.replace('developer', '개발자');
group = group.replace('user', '사용자');
group = group.replace('agency', '광고대행사');
group = group.replace('advertiser', '광고주');
group = group.replace('guest', '게스트');
return group;
});
$('#modalView .modal-body #viewName').html(data.result.username);
$('#modalView .modal-body #viewCompany').html(data.result.companyType+" "+data.result.companyName);
$('#modalView .modal-body #viewGroup').html(data.result.groups.join(","));
$('#modalView .modal-body #viewDate').html(data.result.created_at.substr(0, 16));
$('#modalView #userBelong').attr('href', '/user/belong/'+data.result.id);
$('#modalView #userUpdateModal').attr('data-id', data.result.id);
$('#modalView #userDelete').attr('data-id', data.result.id);
var myModal = new bootstrap.Modal(document.getElementById('modalView'))
myModal.show()
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
//유저 수정
$('body').on('click', '#userUpdateModal', function(){
$('#modalView').modal('hide');
let id = $(this).attr('data-id');
$.ajax({
type: "get",
url: "<?=base_url()?>/users/"+id,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
console.log(data.result.groups);
$('#userGroup').val('');
$('#modalUpdate #username').val(data.result.username);
for (let i = 0; i < data.result.groups.length; i++) {
$('#userGroup option[value="' + data.result.groups[i] + '"]').prop('selected', true);
}
for (let i = 0; i < data.result.permission.length; i++) {
$('#userPermission option[value="' + data.result.permission[i] + '"]').prop('selected', true);
}
$('#modalUpdate #hidden_id').val(data.result.id);
$('#modalUpdate #frm span').text('');
var myModal = new bootstrap.Modal(document.getElementById('modalUpdate'))
myModal.show()
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
//글수정
$('body').on('click', '#userUpdateBtn', function(){
let id = $("#modalUpdate input:hidden[name=id]").val();
data = {
username: $('#modalUpdate input:text[name=username]').val(),
groups: $('#modalUpdate #userGroup').val(),
permission: $('#modalUpdate #userPermission').val()
};
console.log(data);
$.ajax({
type: "put",
url: "<?=base_url()?>/users/"+id,
data: data,
dataType: "json",
contentType: 'application/json; charset=utf-8',
headers:{'X-Requested-With':'XMLHttpRequest'},
success: function(response){
$('#modalUpdate').modal('hide');
$('#modalUpdate').find('input').val('');
$('#modalUpdate #frm span').text('');
getUserList();
},
error: function(error){
var errorText = error.responseJSON.messages;
$.each(errorText, function(key, val){
$("#modalUpdate #" + key + "_error").text(val);
})
}
});
})
//글삭제
$('body').on('click', '#userDelete', function(){
let id = $(this).attr('data-id');
if(confirm('정말 삭제하시겠습니까?')){
$.ajax({
type: "delete",
url: "<?=base_url()?>/users/"+id,
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$('#modalView').modal('hide');
getUserList();
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
})
$('body').on('keyup', '#username', function(){
$(this).siblings('span').text("");
});
$('body').on('change', '#userGroup', function(){
$(this).siblings('span').text("");
});
//reset 버튼
$('body').on('click', '#DataResetBtn', function(){
$('#sort option:first').prop('selected',true);
$('#pageLimit option:first').prop('selected',true);
$('#fromDate').val('');
$('#toDate').val('');
$('#search').val('');
getUserList();
})
});
</script>
<?=$this->endSection();?>
+107
View File
@@ -0,0 +1,107 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>매체 관리</title>
</head>
<body>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">매체 관리</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
<button class="btn-special ms-2" type="button" data-bs-toggle="modal" data-bs-target="#mediaModal">등록</button>
</div>
</form>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<a href="/example/event_manage"><button type="button" class="btn btn-danger">이벤트 관리</button></a>
<a href="/company/list"><button type="button" class="btn btn-danger">광고주 관리</button></a>
<a href="/example/change_manage"><button type="button" class="btn btn-danger">전환 관리</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:6%">
<col>
<col style="width:12%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">매체명</th>
<th scope="col">대상</th>
<th scope="col">랜딩수</th>
</tr>
</thead>
<tbody>
<tr>
<td>5054</td>
<td class="text-start">아이시티안과의원</td>
<td>본 메일 수신자</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
<?=$this->endSection();?>
<?=$this->section('modal')?>
<!-- 매체 등록 -->
<div class="modal fade" id="mediaModal" tabindex="-1" aria-labelledby="mediaModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="mediaModalLabel">매체 등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row" class="text-end">매체명</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row" class="text-end">대상</th>
<td><input type="text" class="form-control"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">확인</button>
<button type="button" class="btn btn-secondary">목록</button>
</div>
</div>
</div>
</div>
<!-- //매체 등록 -->
<?=$this->endSection();?>
+690
View File
@@ -0,0 +1,690 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
모달 전체
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">모달</h2>
</div>
<!-- 메모 확인 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#memoModal">메모 확인</button>
<div class="modal fade" id="memoModal" tabindex="-1" aria-labelledby="memoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="memoModalLabel"><i class="bi bi-file-text"></i> 메모 확인</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<textarea></textarea>
</div>
</div>
</div>
</div>
<!-- //메모 확인 -->
<!-- 개별 메모 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#memoModal2">개별 메모</button>
<div class="modal fade" id="memoModal2" tabindex="-1" aria-labelledby="memoModalLabel2" aria-hidden="true">
<div class="modal-dialog modal-sm sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="memoModalLabel2"><i class="bi bi-file-text"></i> 개별 메모</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="regi-form">
<fieldset>
<legend>메모 작성</legend>
<textarea></textarea>
<button type="button" class="btn-regi">작성</button>
</fieldset>
</form>
<ul class="memo-list m-2">
<li class="d-flex justify-content-between align-items-start">
<div class="detail d-flex align-items-start">
<input type="checkbox" value="" id="check01">
<p class="ms-1" aria-labelledby="check01">오후 4시 라이브</p>
</div>
<div class="info">
<span>김민정</span>
<span>2023-03-03 10:40:30</span>
</div>
</li>
<li class="d-flex justify-content-between align-items-start">
<div class="detail d-flex align-items-start">
<input type="checkbox" value="" id="check02">
<p class="ms-1" aria-labelledby="check02">오후 4시 라이브 2줄 <br>메모내용 테스트 입니다.</p>
</div>
<div class="info">
<span>김민정</span>
<span>2023-03-03 10:40:30</span>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- //개별 메모 -->
<!-- 광고 변경 내역 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#changeModal">광고 변경 내역</button>
<div class="modal fade" id="changeModal" tabindex="-1" aria-labelledby="changeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="changeModalLabel"><i class="bi bi-arrow-counterclockwise"></i> 광고 변경 내역</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="ad-status">진행 상태</p>
<ul class="status-type">
<li class="d-flex justify-content-between">
<div>비활성 <b class="text-danger">→ 활성</b> 으로 변경</div>
<div class="info">
<span>김민정</span>
<span>2023-03-03 10:40:30</span>
</div>
</li>
<li class="d-flex justify-content-between">
<div>활성 <b class=text-dark">→ 비활성</b> 으로 변경</div>
<div class="info">
<span>김민정</span>
<span>2023-03-03 10:40:30</span>
</div>
</li>
<li class="d-flex justify-content-between">
<div>비활성 <b class="text-danger">→ 활성</b> 으로 변경</div>
<div class="info">
<span>김민정</span>
<span>2023-03-03 10:40:30</span>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- //광고 변경 내역 -->
<br><br><br>
<!-- 데이터 비교 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#dataModal">데이터 비교</button>
<div class="modal fade" id="dataModal" tabindex="-1" aria-labelledby="dataModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="dataModalLabel">데이터 비교</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="sorting d-flex justify-content-between align-items-end">
<div class="d-flex">
<button type="button" class="active">최근 7일</button>
<button type="button">최근 14일</button>
<button type="button">최근 30일</button>
<button type="button">지난달</button>
</div>
<p class="term">2023.02.11~ 2023.02.18</p>
</div>
<div class="table-responsive">
<table class="table table-bordered table-data">
<colgroup>
<col style="width:calc(100% / 6);">
<col style="width:calc(100% / 6);">
<col style="width:calc(100% / 6);">
<col style="width:calc(100% / 6);">
<col style="width:calc(100% / 6);">
<col style="width:calc(100% / 6);">
</colgroup>
<thead>
<tr>
<th scope="col"></th>
<th scope="col">DB 단가</th>
<th scope="col">DB 수</th>
<th scope="col">수익률</th>
<th scope="col">CPC</th>
<th scope="col">전환률</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="col">오늘</th>
<td>9,326</td>
<td>140</td>
<td>93.26</td>
<td>9,326.50</td>
<td>93.26</td>
</tr>
<tr>
<th scope="col">어제</th>
<td>9,326</td>
<td>140</td>
<td>93.26</td>
<td>9,326.50</td>
<td>93.26</td>
</tr>
<tr>
<th scope="col" class="text-danger">최근 7일</th>
<td>9,326</td>
<td>140</td>
<td>93.26</td>
<td>9,326.50</td>
<td>93.26</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- //데이터 비교 -->
<br><br><br>
<!-- AI 작동내역 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#aiModal">AI 작동내역</button>
<div class="modal fade" id="aiModal" tabindex="-1" aria-labelledby="aiModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="aiModalLabel">AI 작동내역</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-modal">
<colgroup>
<col style="width:15%;">
<col style="width:25%;">
<col style="width:25%;">
<col style="width:20%;">
<col style="width:15%;">
</colgroup>
<thead>
<tr>
<th scope="col">광고주</th>
<th scope="col">캠페인명</th>
<th scope="col">광고그룹명</th>
<th scope="col">내역</th>
<th scope="col">실행일시</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
<tr>
<th scope="col">패밀리유</th>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td>1887_402 (남여, 카서, 네트워크 40~59)</td>
<td>Level 1 (210 => 180)</td>
<td>2023-02-19 05:38:50</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- //AI 작동내역 -->
<br><br><br>
<!-- 광고 코드 추가 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addModal">광고 코드 추가</button>
<div class="modal fade" id="addModal" tabindex="-1" aria-labelledby="addModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="addModalLabel">광고 코드 추가</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h2 class="body-title">[병원] 유로스메디컬의원</h2>
<div class="table-responsive">
<table class="table table-bordered table-modal">
<colgroup>
<col style="width:15%;">
<col style="width:15%;">
<col style="width:30%;">
<col style="width:40%;">
</colgroup>
<thead>
<tr>
<th scope="col">광고명</th>
<th scope="col">광고그룹</th>
<th scope="col">타입</th>
<th scope="col">인식코드</th>
</tr>
</thead>
<tbody>
<tr>
<td><i class="ico green"></i> 5054</td>
<td>5054</td>
<td>VIDEO_RESPONSIVE_AD</td>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<td colspan="4">
<a href="#">https://event.asdjk.co.kr/asdjk?asduw=asd</a>
<button type="button" class="btn btn-dark">코드입력</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- //광고 코드 추가 -->
<br><br><br>
<!-- 계정 예산 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#budgetModal">계정 예산</button>
<div class="modal fade" id="budgetModal" tabindex="-1" aria-labelledby="budgetModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="budgetModalLabel">계정 예산</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="d-flex justify-content-between align-items-center">
<h2 class="body-title">[패밀리유] 비즈보드 X 룰렛</h2>
<button type="button" class="btn btn-primary btn-list">광고주 잔여예산 부족 목록</button>
</div>
<div class="table-responsive">
<table class="table table-bordered table-modal">
<colgroup>
<col style="width:60%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th scope="col">광고주명</th>
<th scope="col">계정예산</th>
<th scope="col">잔여예산</th>
</tr>
</thead>
<tbody>
<tr>
<td>[패밀리유] 비즈보드 X 룰렛</td>
<td class="text-end">50,000,000</td>
<td class="text-end">50,000,000</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- //계정 예산 -->
<!-- 계정 통계 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#statisticstModal">계정 통계</button>
<div class="modal fade" id="statisticstModal" tabindex="-1" aria-labelledby="statisticstModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="statisticstModalLabel">계정 통계</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="d-flex justify-content-between align-items-center">
<h2 class="body-title">계정별 통계 (2023-02-18 ~ 2023-02-23)</h2>
<form class="row g-1">
<div class="col-auto">
<input type="password" class="form-control">
</div>
<div class="col-auto">
<button type="submit" class="btn btn-primary">검색</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-bordered table-modal">
<colgroup>
<col style="width:15%;">
<col>
<col style="width:11%;">
<col style="width:8%;">
<col style="width:10%;">
<col style="width:10%;">
<col style="width:8%;">
<col style="width:9%;">
<col style="width:9%;">
</colgroup>
<thead>
<tr>
<th scope="col">계정ID</th>
<th scope="col">광고주명</th>
<th scope="col">현재DB단계</th>
<th scope="col">유효DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">매출비중</th>
</tr>
</thead>
<tbody>
<tr>
<td>302-934-2394</td>
<td class="text-end">W2_랜덤팡_2</td>
<td class="text-end">0</td>
<td class="text-end">0</td>
<td class="text-end">25,234</td>
<td class="text-end">0</td>
<td class="text-end">%</td>
<td class="text-end">0</td>
<td class="text-end">0.00%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- //계정 통계 -->
<br><br><br>
<!-- 업체 등록 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#bizModal">업체 등록</button>
<div class="modal fade" id="bizModal" tabindex="-1" aria-labelledby="bizModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="bizModalLabel">업체 등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row">거래처명(입금자명)</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">은행명</th>
<td>
<select class="form-select" aria-label="은행명 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">계좌번호</th>
<td><input type="text" class="form-control"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">작성완료</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
<!-- //업체 등록 -->
<br><br><br>
<!-- 지출결의서 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#disbursementModal">지출결의서</button>
<div class="modal fade" id="disbursementModal" tabindex="-1" aria-labelledby="disbursementModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="disbursementModalLabel">지출결의서</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="approval">
<ol class="d-flex">
<li>
<span>담당자</span>
<div></div>
</li>
<li>
<span>경영지원실장</span>
<div></div>
</li>
<li>
<span>사업부대표</span>
<div></div>
</li>
</ol>
</div>
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row">담당자</th>
<td>
<select class="form-select" aria-label="담당자 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">문서번호</th>
<td>
<textarea></textarea>
</td>
</tr>
<tr>
<th scope="row">거래처명(예금주명)</th>
<td>
</td>
</tr>
<tr>
<th scope="row">은행명</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">계좌번호</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">구분</th>
<td>
<select class="form-select" aria-label="구분 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">내역(자세히)</th>
<td>
<textarea></textarea>
</td>
</tr>
<tr>
<th scope="row">총금액(VAT 포함)</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">비고</th>
<td>
<textarea></textarea>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">작성완료</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
<!-- //업체 등록 -->
<br><br><br>
<!-- 전체화면 모달 -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#fullModal">전체화면 모달</button>
<div class="modal fade" id="fullModal" tabindex="-1" aria-labelledby="fullModalLabel" aria-hidden="true">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="fullModalLabel">전체화면 모달</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
...
</div>
</div>
</div>
</div>
<!-- //전체화면 모달 -->
</div>
<?=$this->endSection();?>
+68
View File
@@ -0,0 +1,68 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 마이 페이지
<?=$this->endSection();?>
<?=$this->section('content');?>
<body>
<div class="sub-contents-wrap myPage-container">
<div class="title-area">
<h2 class="page-title">마이 페이지</h2>
</div>
<main class="container my-5">
<h1 class="text-center">Nick Name</h1>
<div class="row justify-content-center mt-4">
<div class="col-md-6">
<div class="card">
<div class="card-header bg-dark text-white">
<h3 class="card-title mb-0">Profile</h3>
</div>
<div class="card-body">
<dl><dt>아이디:</dt><dd>John Doe</dd> </dl>
<dl><dt>이메일:</dt><dd>john.doe@example.com</dd> </dl>
<dl><dt>기존 비밀번호:</dt><dd></dd></dl>
<dl><dt>신규 비밀번호:</dt><dd></dd></dl>
<dl><dt>비밀번호 확인:</dt><dd></dd></dl>
<dl><dt>전화번호:</dt><dd>010-0000-0000</dd> </dl>
<button type="button" class="btn btn-primary">작성완료</button>
</div>
</div>
</div>
</div>
</main>
</div>
</body>
<?=$this->endSection();?>
<!-- <!DOCTYPE html>
<html lang="en">
<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>My Account</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body> -->
+62
View File
@@ -0,0 +1,62 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="row container-fluid register-container">
<div class="card col-lg-6 col-12">
<form action="<?= url_to('register') ?>" method="post">
<?= csrf_field() ?>
<h1 class="card-title">가입하기</h1>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="fa fa-envelope-o"></i>
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
</div>
<!-- Username -->
<div class="mb-2 position-relative">
<i class="bi bi-person-check"></i>
<input type="text" class="form-control" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" required />
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<i class="bi bi-lock"></i>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" required />
</div>
<!-- Password (Again) -->
<div class="mb-2 position-relative">
<i class="bi bi-check-circle"></i>
<input type="password" class="form-control" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" required />
</div>
<div class="text-start"
>
<?= lang('Auth.haveAccount') ?> <a href="<?= url_to('login') ?>"><?= lang('Auth.login') ?></a>
</div>
<div class="mt-5">
<button type="submit" class="btn btn-outline-primary btn-block"><?= lang('Auth.register') ?></button>
</div>
</form>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.register-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
</script>
<?= $this->endSection() ?>
+94
View File
@@ -0,0 +1,94 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="container-fluid exam-container" id="register">
<div class="card col-10 col-md-5">
<div class="card-body">
<h5 class="card-title"></h5>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<form action="<?= url_to('register') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2 position-relative">
<i class="fa fa-envelope-o"></i>
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
</div>
<!-- Username -->
<div class="mb-4">
<i class="bi bi-person-check"></i>
<input type="text" class="form-control" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" required />
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<i class="bi bi-lock"></i>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" required />
</div>
<!-- Password (Again) -->
<div class="mb-5">
<i class="bi bi-check-circle"></i>
<input type="password" class="form-control" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" required />
</div>
<div class="m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.register') ?></button>
</div>
<div class="text-start"
>
<?= lang('Auth.haveAccount') ?> <a href="<?= url_to('login') ?>"><?= lang('Auth.login') ?></a>
</div>
</form>
</div>
</div>
</div>
<script>
//slide up 효과
let account = document.querySelector('.exam-container form');
let effect = account.querySelectorAll('form > div');
let i=0;
let timer = setInterval(function(){
effect[i].classList.add('effect');
i++;
if(i >= effect.length){
clearInterval(timer);
}
},150);
// 타이핑 효과
let typingTxt = 'Register';
let typingIdx = 0;
let tyInt = setInterval(typing,250);
typingTxt=typingTxt.split("");
function typing(){
if(typingIdx < typingTxt.length){
$('h5.card-title').append(typingTxt[typingIdx]);
typingIdx++;
}else{
clearInterval(tyInt);
}
}
</script>
<?= $this->endSection() ?>
+122
View File
@@ -0,0 +1,122 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('guestContent') ?>
<div class="wrap">
<div class="container-fluid exam02-container toggle">
<div class="btn btn-outline-primary">
<button type="button" class="drag box">Have an account? Sign in
<div class="item" id="item" draggable="true"></div>
</button>
<!-- <p class="text-center site"><?= lang('Auth.haveAccount') ?><a href="<?= url_to('login') ?>"><?= lang('Auth.login') ?></a></p> -->
</div>
<div class="card col-10 col-md-5">
<div class="card-body">
<h5 class="card-title"><?= lang('SIGN UP') ?></h5>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<form action="<?= url_to('register') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2 position-relative">
<p>EMAIL ADDRESS</p>
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
</div>
<!-- Username -->
<div class="mb-4 position-relative">
<p>username</p>
<input type="text" class="form-control" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" required />
</div>
<!-- Password -->
<div class="mb-2 position-relative">
<p>PASSWORD</p>
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" required />
</div>
<!-- Password (Again) -->
<div class="mb-5">
<p>PASSWORD CONFIRM</p>
<input type="password" class="form-control" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" required />
</div>
<button type="submit" class="btn btn-primary btn-block"><?= lang('SIGN IN') ?></button>
</form>
</div>
</div>
</div>
</div>
<script>
const item = document.querySelector('.item');
const boxes = document.querySelectorAll('.box');
const target = document.querySelector('.target');
item.addEventListener('dragstart', dragStart);
boxes.forEach(box => {
box.addEventListener('dragenter', dragEnter)
box.addEventListener('dragover', dragOver);
box.addEventListener('dragleave', dragLeave);
box.addEventListener('drop', drop);
});
function dragStart(e) {
e.dataTransfer.setData('text/plain', e.target.id);
setTimeout(() => {
e.target.classList.add('hide');
}, 0);
}
function dragEnter(e) {
e.preventDefault();
e.target.classList.add('drag-over'); //
console.log('dragEnter')
}
function dragOver(e) {
e.preventDefault();
e.target.classList.add('drag-over');
console.log('dragOver')
}
function dragLeave(e) {
e.target.classList.remove('drag-over');
item.classList.remove('hide');
console.log('dragLeave')
}
function drop(e) {
e.target.classList.remove('drag-over');
console.log('drop')
const id = e.dataTransfer.getData('text/plain');
const draggable = document.getElementById(id);
e.target.appendChild(draggable);
draggable.classList.remove('hide');
location.href = "https://zenith.chainsaw.co.kr/example/login_02";
}
</script>
<?= $this->endSection() ?>
+326
View File
@@ -0,0 +1,326 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('content') ?>
<div class="row container-fluid agree-container">
<div class="card col-lg-6 col-12">
<form action="" method="post">
<h1 class="card-title">이용 약관 동의</h1>
<!-- 모두 동의 버튼 -->
<button type="buttton">네, 모두 동의합니다.
<input type="checkbox" name="chk_all" id="chk_all">
<label for="chk_all"><i class="bi bi-check2"></i></label>
</button>
<!-- agree-box -->
<div class="card-body">
<div class="row agree-box">
<div class="title d-flex">
<input type="checkbox" name="termsService" id="termsService">
<label for="termsService"><i class="bi bi-check2"></i></label>
<h2>이용약관<span>&nbsp;&#40;필수&#41;</span></h2>
</div>
<div class="info">
<textarea readonly>
체인소우 서비스 이용 약관
본 이용약관의 목차는 아래와 같습니다.
제 1조 목적
제 2조 용어의 정의
제 3조 약관의 게시와 개정
제 4조 약관의 해석
제 5조 "이용계약" 체결
제 6조 서비스의 내용
제 7조 서비스 이용요금
제 8조 "회원" 정보의 변경
제 9조 개인정보보호 의무
제 10조 "회원"의 "아이디" 및 "비밀번호"의 관리에 대한 의무
제 11조 "회사"의 의무
제 12조 "회원"의 의무
제 13조 "서비스"의 제공 등
제 14조 "서비스"의 변경
제 15조 정보의 제공 및 광고의 게재
제 16조 게시물의 삭제
제 17조 게시물에 대한 저작권
제 18조 개인위치정보의 이용 또는 제공
제 19조 개인위치정보주체의 권리
제 20조 법정대리인의 권리
제 21조 8세 이하의 아동 등의 보호의무자의 권리
제 22조 위치정보관리책임자의 지정
제 23조 손해배상
제 24조 이용제한 등
제 25조 책임제한
제 26조 준거법 및 재판관할
--
제1조(목적)
이 약관은 바이브알씨(주식회사 케어랩스 바이브알씨 사업부) (이하 “회사” 및 “바이브알씨”이라 함)이 제공하는 체인소우 서비스(이하 "서비스" 및 "체인소우"이라 함)의 이용과 관련하여 "회사"와 "회원"과의 권리, 의무 및 책임사항, 이용조건 및 절차 등 기본적인 사항을 규정함을 목적으로 합니다.
제2조(용어의 정의)
이 약관에서 사용하는 용어의 정의는 다음과 같습니다.
(1) "회원"이라 함은 "회사"의 "서비스"에 접속하여 이 약관에 따라 "회사"와 "이용계약"을 체결하고 "회사"가 제공하는 "서비스"를 이용하는 고객을 말합니다.
(2) "아이디(ID)"라 함은 "회원"의 식별과 "서비스" 이용을 위하여 "회원"이 정하고 "회사"가 승인하는 문자와 숫자의 조합을 의미합니다.
(3) "비밀번호"라 함은 "회원"이 부여 받은 "아이디"와 일치되는 "회원"임을 확인하고 비밀보호를 위해 "회원" 자신이 정한 문자 또는 숫자의 조합을 의미합니다.
(4) "이용계약"이라 함은 이 약관을 포함하여 서비스 이용과 관련하여 "회사"와 "회원 간에 체결하는 모든 계약을 말합니다.
(5) "해지"라 함은 "회사" 또는 "회원"이 "이용계약"을 해약하는 것을 말합니다.
(6) "이용자"라 함은 "회사"에서 제공하는 "서비스" 또는 관련 제반 서비스를 이용하는 "회원"과 "비회원"을 말합니다.
이 약관에서 사용하는 용어 중 제 2조에서 정하지 아니한 것은 관계 법령 및 서비스별 안내에서 정하는 바에 따르며, 그 외에는 일반 관례에 따릅니다.
제3조(약관의 게시와 개정)
(1) "회사"는 이 약관의 내용을 "회원" 또는 개인위치정보주체가 쉽게 알 수 있도록 서비스 내 환경설정에 게시합니다.
(2) "회사"는 "약관의 규제에 관한 법률", "정보통신망이용촉진 및 정보보호 등에 관한 법률(이하 "정보통신망법")" 등 관련법을 위배하지 않는 범위에서 이 약관을 개정할 수 있습니다.
(3) "회사"가 약관을 개정할 경우에는 적용일자 및 개정사유를 명시하여 현행약관과 함께 제1항의 방식에 따라 그 개정약관의 적용일자 7일 전부터 적용일자 전 일까지 공지합니다. 다만, "회원"에게 불리한 약관의 개정의 경우에는 그 적용일자 30일 전부터 공지하고, 공지 외에 일정기간 서비스 내 로그인 시 동의창 등의 전자적 수단을 통해 따로 명확히 통지하도록 합니다.
(4) "회사"가 전항에 따라 개정약관을 공지 또는 통지하면서 "회원"에게 7일 또는30일 기간 내에 의사표시를 하지 않으면 의사표시가 표명된 것으로 본다는 뜻을 명확하게 공지 또는 통지하였음에도 "회원"이 명시적으로 거부의 의사표시를 하지 아니한 경우 "회원"이 개정약관에 동의한 것으로 봅니다.
(5) "회원"이 개정약관의 적용에 동의하지 않는 경우 "회사"는 개정 약관의 내용을 적용할 수 없으며, 이 경우 "회원"은 "이용계약"을 해지할 수 있습니다. 또한, 기존 약관을 적용할 수 없는 특별한 사정이 있는 경우에 "회사"는 "이용계약"을 해지할 수 있습니다.
제4조(약관의 해석)
(1) "회사"는 개별 서비스에 대해서는 별도의 이용약관 및 정책(이하 서비스 별 이용약관 또는 정책)을 둘 수 있으며, 해당 내용이 이 약관과 상충할 경우에는 "서비스 별 이용약관 또는 정책"을 우선하여 적용합니다.
(2) 이 약관에서 정하지 아니한 사항이나 해석에 대해서는 관계법령 또는 상관례에 따릅니다.
제5조("이용계약" 체결)
(1) "이용계약"은 "회원"이 되고자 하는 자(이하 가입신청자)가 약관의 내용에 대하여 동의를 한 다음 회원가입신청을 하고 "회사"가 이러한 신청에 대하여 승낙함으로써 체결됩니다.
(2) "회사"는 "가입신청자"의 신청에 대하여 "서비스" 이용을 승낙함을 원칙으로 합니다. 다만, "회사"는 다음 각 호에 해당하는 신청에 대하여는 승낙을 하지 않거나 사후에 "이용계약"을 해지할 수 있습니다.
가) 가입신청자가 이 약관에 의하여 이전에 회원자격을 상실한 적이 있는 경우, 단 "회사"의 회원 재가입 승낙을 얻는 경우에는 예외로 함.
나) 타인의 명의를 이용한 경우
다) 허위의 정보를 기재하거나, "회사"가 제시하는 내용을 기재하지 않은 경우
라) "회원"의 귀책사유로 인하여 승인이 불가능하거나 기타 규정한 제반 사항을 위반하며 신청하는 경우
마) 사회의 안녕질서 또는 미풍양속을 저해하거나, 저해할 목적으로 신청한 경우
(3) "회사"는 서비스 관련 설비의 여유가 없거나, 기술상 또는 업무상 문제가 있는 경우에는 승낙을 유보할 수 있습니다.
(4) 제 2항과 제 3항에 따라 회원가입신청의 승낙을 하지 아니하거나 유보한 경우, "회사"는 원칙적으로 이를 가입신청자에게 알리도록 합니다.
(5) "이용계약"의 성립 시기는 "회사"가 가입완료를 신청절차 상에서 표시한 시점으로 합니다.
(6) "회사"는 "가입신청자"가 관계 법령에서 규정하는 미성년자일 경우에 서비스별 안내에서 정하는 바에 따라 승낙을 보류할 수 있습니다.
(7) "회사"는 "회원"에 대해 "회사" 정책에 따라 등급별로 구분하여 이용시간, 이용횟수, 서비스 메뉴 등을 세분하여 이용에 차등을 둘 수 있습니다.
(8) "회사"는 "회원"에 대하여 "청소년보호법" 등에 따른 등급 및 연령 준수를 위해 이용제한이나 등급별 제한을 할 수 있습니다.
제6조(서비스의 내용)
회사가 제공하는 서비스는 아래와 같습니다.
(1) 서비스명: 체인소우
(2) 서비스 내용: 이벤트 신청자 조회 및 안심채팅 기능 제공
제7조(서비스 이용요금)
(1) "회사"가 제공하는 서비스는 회원제 무료입니다.
(2) “회원”의 개인정보도용 등 법적분쟁으로 인한 정보 요구는 법률이 정한 경우 외에는 거절될 수 있습니다.
(3) 무선 서비스 이용 시 발생하는 데이터 통신료는 별도이며 가입한 각 이동통신사의 정책에 따릅니다.
제8조("회원" 정보의 변경)
(1) "회원"은 개인정보관리화면을 통하여 언제든지 본인의 개인정보를 열람하고 수정할 수 있습니다. 다만, 서비스 관리를 위해 필요한 이메일 등은 수정이 불가능합니다.
(2) "회원"은 회원가입신청 시 기재한 사항이 변경되었을 경우 온라인으로 수정을 하거나 전자우편 등 기타 방법으로 "회사"에 대하여 그 변경사항을 알려야 합니다.
(3) 제2항의 변경사항을 "회사"에 알리지 않아 발생한 불이익에 대하여 "회사"는 책임지지 않습니다.
제9조(개인정보보호 의무)
(1) "회사"는 "정보통신망법" 등 관계 법령이 정하는 바에 따라 "회원"의 개인정보를 보호하기 위해 노력합니다. 개인정보의 보호 및 사용에 대해서는 관련법 및 "회사"의 개인정보처리방침이 적용됩니다. 다만, "회사"의 공식 사이트 이외의 링크된 사이트에서는 "회사"의 개인정보 처리방침이 적용되지 않습니다.
제10조("회원"의 "아이디" 및 "비밀번호"의 관리에 대한 의무)
(1) "회원"의 "아이디"와 "비밀번호"에 관한 관리책임은 "회원"에게 있으며, 이를 제3자가 이용하도록 하여서는 안 됩니다.
(2) "회원"은 "아이디" 및 "비밀번호"가 도용되거나 제3자가 사용하고 있음을 인지한 경우에는 이를 즉시 "회사"에 통지하고 "회사"의 안내에 따라야 합니다.
(3) 제2항의 경우에 해당 "회원"이 "회사"에 그 사실을 통지하지 않거나, 통지한 경우에도 "회사"의 안내에 따르지 않아 발생한 불이익에 대하여 "회사"는 책임지지 않습니다.
(4) "회원"의 "아이디"는 원칙적으로 변경이 불가하며 부득이한 사유로 인하여 변경하고자 하는 경우에는 해당 "아이디"를 해지하고 재가입해야 합니다.
(5) "서비스"의 회원 아이디는 "회원" 본인의 동의 하에 "회사" 또는 자회사가 운영하는 사이트의 회원 아이디와 연결될 수 있습니다.
(6) "회원"의 "아이디"는 다음 각 호에 해당하는 경우에는 "회원"의 요청 또는 "회사"의 직권으로 변경 또는 이용을 정지할 수 있습니다.
가) "회사"는 "회원"의 "아이디"가 전화번호 등으로 등록되어 개인정보 유출이 우려되는 경우
나) 타인에게 혐오감을 주거나 반사회적 미풍양속에 어긋나는 경우
다) "회사" 및 "회사"의 운영자로 오인할 우려가 있는 경우
라) 기타 합리적인 사유가 있는 경우
제11조("회사"의 의무)
(1) "회사"는 "회원"이 희망한 "서비스" 제공 개시일에 특별한 사정이 없는 한 "서비스"를 이용할 수 있도록 하여야 합니다.
(2) "회사"는 "회원"이 안전하게 "서비스"를 이용할 수 있도록 개인정보 보호를 위해 보안시스템을 갖추어야 하며 개인정보처리방침을 공시하고 준수합니다.
(3) "회사"는 서비스 이용과 관련하여 발생하는 "이용자"의 불만 또는 피해구제요청을 적절하게 처리할 수 있도록 필요한 인력 및 시스템을 구비합니다.
(4) "회사"는 서비스 이용과 관련하여 "회원"으로부터 제기되는 의견이나 불만이 정당하다고 객관적으로 인정될 경우에는 적절한 절차를 거쳐 이를 처리하여야 합니다. "회원"이 제기한 의견이나 불만사항에 대해서는 게시판을 활용하거나 전자우편 등을 통하여 "회원"에게 처리과정 및 결과를 전달합니다.
제12조("회원"의 의무)
(1) "회원"은 회원가입 신청 또는 회원정보 변경 시 모든 사항을 사실에 근거하여 본인의 진정한 정보로 작성하여야 하며, 허위 또는 타인의 정보를 등록할 경우 이와 관련된 모든 권리를 주장할 수 없습니다.
(2) "회원"은 약관에서 규정하는 사항과 기타 "회사"가 정한 "운영정책" 등의 제반 규정, 공지사항 등 "회사"가 공지하는 사항 및 관계 법령을 준수하여야 하며, 기타 "회사"의 업무에 방해가 되는 행위, "회사"의 명예를 손상시키는 행위, 타인에게 피해를 주는 행위를 해서는 안 됩니다.
(3) "회원"은 "회사"의 사전 승낙 없이 서비스를 이용하여 영업활동을 할 수 없으며, 그 영업활동의 결과에 대해 "회사"는 책임을 지지 않습니다. 또한 "회원"은 이와 같은 영업활동으로 "회사"가 손해를 입은 경우, "회원"은 "회사"에 대해 손해배상의무를 지며, "회사"는 해당 "회원"에 대해 서비스 이용제한 및 적법한 절차를 거쳐 손해배상 등을 청구할 수 있습니다.
(4) "회원"은 "회사"의 명시적 동의가 없는 한 서비스의 이용권한, 기타 이용계약상의 지위를 타인에게 양도, 증여할 수 없으며 이를 담보로 제공할 수 없습니다.
(5) "회원"은 "회사" 및 기타 제3자의 지적 재산권을 포함한 제반 권리를 침해하는 행위를 해서는 안 됩니다.
제13조("서비스"의 제공 등)
(1) "회사"는 "회원"에게 제공하는 일체의 서비스 등 "회원"이 인터넷과 웹사이트를 이용할 수 있는 다양한 서비스를 제공합니다.
(2) 서비스 이용은 "회사"의 업무상 또는 기술상 특별한 지장이 없는 한 연중무휴, 1일 24시간 운영을 원칙으로 합니다. 단, "회사"는 시스템 정기점검, 증설 및 교체를 위해 "회사"가 정한 날이나 시간에 "서비스"를 일시 중단할 수 있으며, 예정되어 있는 작업으로 인한 서비스 일시 중단은 "서비스" 내 공지사항 등을 통해 사전에 공지합니다.
(3) "회사"는 컴퓨터 등 정보통신설비의 보수점검, 교체 및 고장, 통신두절 또는 운영상 상당한 이유가 있는 경우 사전 예고 없이 일시적으로 "서비스"의 전부 또는 일부를 중단할 수 있습니다. 이 경우 "회사"는 "회원"이 "서비스"에 등록한 전자우편 주소 또는 "회사"의 게시판, "서비스"의 공지사항에 게시하여 "회원"에게 통지합니다. 다만, "회사"가 사전에 통지할 수 없는 부득이한 사유가 있는 경우 사후에 통지할 수 있습니다.
제14조("서비스"의 변경)
(1) "회사"는 상당한 이유가 있는 경우에 운영상, 기술상의 필요에 따라 제공하고 있는 전부 또는 일부 "서비스"를 변경할 수 있습니다.
(2) "서비스"의 내용, 이용방법, 이용시간에 대하여 변경이 있는 경우에는 변경사유, 변경될 서비스의 내용 및 제공일자 등은 그 변경 전에 해당 서비스 초기화면에 게시하여야 합니다.
(3) "회사"는 무료로 제공되는 서비스의 일부 또는 전부를 "회사"의 정책 및 운영의 필요상 수정, 중단, 변경할 수 있으며, 이에 대하여 관련법에 특별한 규정이 없는 한 "회원"에게 별도의 보상을 하지 않습니다.
제15조(정보의 제공 및 광고의 게재)
(1) "회사"는 "서비스"를 운영함에 있어 각종 정보를 서비스화면에 게재하거나 문자메시지, 전자우편, 어플리케이션 Push 알림 등의 방법으로 "이용자"에게 제공할 수 있습니다.
(2) "회사"는 서비스의 운영과 관련하여 홈페이지, 서비스화면, 문자메시지, 전자우편, 어플리케이션 Push 알림 등에 광고 등을 게재할 수 있습니다. 다만, "회사"가 광고 등을 문자메시지, 전자우편, 어플리케이션 Push 알림 등을 이용하여 발송하는 경우 수신 동의 여부를 확인한 후 수신 동의한 "이용자"에 한하여 이를 발송합니다.
(3) "이용자"는 "회사"가 제공하는 서비스와 관련하여 게시물 또는 기타 정보를 변경, 수정, 제한하는 등의 조치를 취하지 않습니다.
(4) "이용자"가 서비스상에 게재되어 있는 광고를 이용하거나 서비스를 통한 광고주의 판촉활동에 참여하는 등의 방법으로 교신 또는 거래를 하는 것은 전적으로 "이용자"와 광고주 간의 문제입니다. 만약 "이용자"와 광고주간에 문제가 발생할 경우에도 "이용자"와 광고주가 직접 해결하여야 하며, 이와 관련하여 “회사”가 광고주의 위법행위에 적극 가담하였다거나, 위법행위를 고의 또는 중과실로 방치하였다는 등의 사정이 없는 한 "회사"는 어떠한 책임도 부담하지 않습니다.
제16조(게시물의 삭제)
(1) "회사"는 "회원"이 게시하거나 전달하는 서비스 내의 모든 "게시물"(텍스트, 이미지, 동영상, 각종 파일, 링크, 댓글 등을 모두 포함)이 다음 각 호의 어느 하나에 해당한다고 판단되는 경우 사전 통지 없이 삭제할 수 있으며, 이에 대해 "회사"는 어떠한 책임도 부담하지 않습니다.
가) 사회 질서 및 기타 선량한 풍속 위반 게시물
ㄱ) 국가 이념을 훼손하거나 자유민주적 기본질서를 현저히 위태롭게 할 우려가 있는 정보를 게시한 경우
ㄴ) 성별, 종교, 장애, 연령, 사회적 신분, 인종, 지역, 직업 등을 차별하거나 이에 대한 편견을 조정하는 내용을 작성하는 경우
ㄷ) 장애인, 노인, 임산부, 아동 등 사회적인 약자 또는 부모, 스승에 대한 살상, 폭행, 협박, 학대행위 등을 구체적으로 묘사하는 경우
ㄹ) 무기 또는 흉기 등을 사용하여 과도하게 신체 또는 시체를 손상하는 등 생명을 경시하는 잔혹한 내용을 작성한 경우
ㅁ) 자살을 목적으로 하거나 이를 미화, 방조 또는 권유아혀 자살 충동을 일으킬 우려가 있는 정보를 작성한 경우
ㅂ) 타인에게 불쾌감을 유발할 수 있는 거친 언어 또는 욕설과 저속한 비어, 은어, 속어를 사용한 경우
ㅅ) 근거 없는 비방을 하거나 허위사실을 유포 또는 선동하는 글을 게시한 경우
ㅇ) 도박 등 사행심을 조장하는 내용을 작성한 경우
나) 음란성 게시물
ㄱ) 외설적인 내용으로 성적 수치심과 불쾌감을 유발하고 일반인의 성 관념에 위배되는 경우
ㄴ) 과도한 신체노출, 남녀의 성기를 저속하게 표현한 내용이나 음란한 성행위 등을 묘사한 경우
ㄷ) 일반인이 보기에 혐오감을 유발하는 사진, 그래픽, 비디오 및 내용을 작성한 경우(인간/동물의 사체 또는 훼손된 모습, 방뇨/배설/살인/자살의 장면 등)
ㄹ) 음란성 소프트웨어, 음악, 사진, 그래픽, 비디오 등을 광고하는 내용을 작성하거나 음란한 게시물을 게재하고 있는 타 사이트의 링크를 제공하는 경우
ㅁ) 윤락행위를 알선하거나 성행위를 목적으로 만남을 유도하는 경우
ㅂ) 아동 또는 청소년을 성적 유희의 대상으로 직접적이고 구체적으로 묘사한 경우
다) 개인정보 침해 및 명예훼손 게시물
ㄱ) 개인정보 유포 등 사생활의 비밀과 자유를 침해할 우려가 현저한 내용을 작성한 경우
ㄴ) 정당한 권한 없이 타인의 사진, 영상 등을 게재하여 타인의 인격권을 현저히 침해하는 내용을 작성한 경우
ㄷ) 비방할 목적으로 공연히 타인을 모욕하거나 사실 또는 허위의 사실을 적시하여 타인의 명예를 훼손하는 경우
라) 저작권 침해 게시물
ㄱ) 저작권자의 동의 없이 방송, 음원, 영화, 소설, 모바일 게임, 만화 등의 타인의 지적 활동으로 창출된 결과물 등을 복제, 배포, 전송하는 경우
ㄴ) 저작권자의 권리에 속하는 상표권, 의장권 등을 무단으로 침해하는 경우
ㄷ) 저작권이 걸려있는 소프트웨어 등을 동의 없이 무료로 다운로드 할 수 있게 하거나, CD 키 자동생성 프로그램 등을 공유하는 경우
ㄹ) 정당한 권한 없이 타인의 상표 또는 저작물 등을 사용, 실시 또는 매개하는 등 특허권, 상표권, 디자인권, 저작권 등 지적재산권을 침해하는 경우
마) 기타 제재 게시물
ㄱ) 동일한 내용을 여러개 나열, 혹은 각 게시판 마다 같은 내용을 반복적으로 등록하는 경우
ㄴ) 관리자 사칭 등 커뮤니티 서비스를 본 목적에 어긋나게 사용하는 경우
ㄷ) 여러 차례에 걸쳐 제한사유에 해당하지 않는 내용에 대해 신고한 것이 악의적이라고 판단되는 경우 게시물 제재 기준 및 이용자 제재 기준/종류는 "서비스" 내 "운영정책"을 따릅니다.
(2) "회원"이 "서비스"에 등록하는 "게시물" 등으로 인하여 본인 또는 타인에게 손해나 기타 문제가 발생하는 경우 "회원"은 이에 대한 책임을 지게 되며, "회사"는 특별한 사정이 없는 한 이에 대하여 책임을 지지 않습니다.
(3) "회사"는 "게시물"에 대하여 제3자로부터 명예훼손, 지적재산권 등의 권리침해를 이유로 게시중단 요청을 받은 경우 이를 임시로 게시중단(전송중단)할 수 있으며, 게시중단 요청자와 게시물 등록자 간에 소송, 합의 기타 이에 준하는 관련기관의 결정 등이 이루어져 "회사"에 접수된 경우 이에 따릅니다.
제17조(게시물에 대한 저작권)
(1) "회원"이 "서비스" 내에 게시한 게시물은 저작권법에 의해 보호를 받습니다. 다만 "회사"가 작성한 게시물에 대한 저작권 등 제 권리는 "회사"에 귀속됩니다.
(2) "회원"은 자신의 게시물을 "회사"가 국내외에서 다음 각 호의 어느 하나의 목적으로 사용하는 것을 허락합니다.
가) "회사"의 "서비스" 또는 "회사"의 공식 사이트 이외의 "회사"의 업무와 연계된 사이트 내에서 "회원"의 "게시물"의 복제, 전송, 전시 및 우수 게시물을 "회사"의 "서비스" 또는 "회사"의 공식 사이트 이외의 "회사"의 업무와 연계된 사이트 화면 등에 노출하기 위하여 "회원" 게시물의 크기를 변환하거나 이미지 변경, 단순화하는 등의 방식으로 수정하는 것
나) "회사"의 "서비스"를 홍보하기 위한 목적으로 미디어, 언론기관 등에게 "회원"의 "게시물" 내용을 보도, 방영하게 하는 것. 단, 이 경우 "회사"는 "회원"의 개별 동의 없이 미디어, 언론기관 등에게 개인정보를 제공하지 않습니다.
(3) 전항의 규정에도 불구하고 "회사"가 "회원"의 게시물을 전항 각 호의 어느 하나에 기재된 목적 이외의 방법으로 사용하는 경우에는 사전에 해당 "회원"으로부터 동의를 얻어야 합니다. 게시물에 대한 "회사"의 사용 요청, "회원"의 동의 및 동의철회는 전화, 전자우편 등 "회사"가 요청하는 방식에 따릅니다. 이 경우 "회사"는 "게시물"의 출처를 표시합니다.
(4) "회원"이 "서비스"의 "이용계약"을 "해지" 하더라도 "회원"의 명의로 "서비스"에 등록한 게시물을 삭제되지 않습니다. "회원"은 자신의 게시물이 회원 탈퇴 후 "서비스"에서 이용되는 것을 원하지 않는 경우 회원 탈퇴 전에 직접 "게시물"을 삭제하여야 합니다.(단, 제3자가 다시 게시하거나 저장…
</textarea>
</div>
</div>
<div class="row agree-box">
<div class="title d-flex">
<input type="checkbox" name="termsPrivacy" id="termsPrivacy">
<label for="termsPrivacy"><i class="bi bi-check2"></i></label>
<h2>개인정보 처리방침<span>&nbsp;&#40;필수&#41;</span></h2>
</div>
<div class="info">
<textarea name="name" cols="3" rows="3" readonly="">개인정보처리(취급)방침
바이브알씨(주식회사 케어랩스 바이브알씨 사업부) (이하 “회사” 및 “바이브알씨”이라 함)은 이용자의 개인정보를 매우 중요하게 생각하며, 정보통신 서비스 제공자가 준수하여야 하는 관련 법령 및 규정을 준수하고 있습니다. 본 개인정보처리방침은 회사의 웹사이트 및 모바일 웹 등에 적용되며, 다음과 같은 내용을 담고 있습니다.
(1) 바이브알씨가 수집하고 있는 회원의 개인정보
(2) 개인정보의 수집 및 이용 목적
(3) 개인정보의 제 3자 제공
(4) 개인정보의 처리 위탁
(5) 개인정보 보유 및 이용 기간
(6) 개인정보 파기절차 및 방법
(7) 이용자 및 법정 대리인의 권리
(8) 쿠키의 운영 및 수집 거부 방법
(9) 개인정보 보호를 위한 기술적/권리적 보호 대책
(10) 개인정보 보호책임자 및 담당부서
(11) 링크 사이트에 대한 책임
(12) 개인정보처리방침의 고지 의무
--
(1) 바이브알씨가 수집하고 있는 회원의 개인정보
가. 수집하는 개인정보의 항목 필수항목: ID(이메일 또는 SNS 계정), 비밀번호, 성명, 휴대전화 번호, 성별, 나이 등의 정보는 회원가입 시 바이브알씨의 개인정보 수집이용취급 방침에 동의하는 경우에 수집됩니다. 바이브알씨에서는 또한 아래의 항목들에 대해서도 안정된 서비스 제공을 위해 합법적인 절차로 수집할 수 있습니다.
ㄱ) IP Address, 쿠키, 방문 일시, 서비스 이용 기록, 불량 이용 기록, 광고식별자
ㄴ) 사용 이동통신사
나. 개인정보 수집방법 회사는 다음과 같은 방법으로 개인정보를 수집하고 있습니다.
- 모바일 앱, 홈페이지 내 이벤트 신청 페이지
다. 개인정보 보관방법 회사는 아래의 서버 호스팅 서비스를 이용해, “1조 가”항에 해당하는 개인정보를 보관하고 있습니다.
- 회원의 개인정보는 하나로 호스팅 서버에 저장됩니다
(2) 개인정보의 수집 및 이용 목적 회사는 아래와 같은 목적으로 서비스 제공을 위한 최소한의 개인정보만을 수집하며, 수집한 정보를 목적 외로 사용하거나, 이용자의 동의 없이 외부에 공개하지 않습니다.
가) 회원관리: 서비스 제공에 따른 개인식별, 가입의사 확인, 이용약관 등 위반 회원에 대한 이용제한 조치, 가입 및 가입횟수 제한, 서비스 부정 이용 제재, 비인가 사용 방지, 법정대리인 동의 없는 만 14세 미만 아동의 가입 방지(추후 법정 대리인 본인 확인), 고충 처리 및 분쟁 조정을 위한 기록 보존, 고지사항 전달, 회원탈퇴 의사의 확인
나) 신규 서비스 개발 및 마케팅 광고에의 활용: 신규 서비스 개발 및 맞춤 서비스 제공, 인구통계학적 특성에 따른 서비스 제공 및 광고 게재, 서비스의 유효성 확인, 이벤트/광고성 정보 및 참여 기회 제공, 접속빈도 파악, 회원의 서비스 이용에 대한 통계
(3) 개인정보의 제 3자 제공
회사는 회원의 개인정보를 동의 없이 제3자에게 제공하지 않습니다. 다만, 법령의 규정에 의한 경우는 예외로 합니다.
(4) 개인정보의 처리 위탁
회사는 향상된 서비스 제공을 위하여 전문업체에 일부 서비스를 위탁 처리하고 있습니다. 회사는 위탁 시 관련법령에 따라 개인정보가 안전하게 관리될 수 있도록 필요한 조치를 취하고 있으며, 위탁 처리기관의 해당 업무에 필요한 최소한의 개인정보만 전달됩니다.
(5) 개인정보 보유 및 이용 기간
회사는 원칙적으로 이용자의 개인정보 수집/이용 목적이 달성되면 지체 없이 파기합니다. 단, 다음의 경우는 예외로 합니다.
보존근거: 통신비밀보호법
보존기록 / 보유기간: 방문기록 / 3개월
보존근거: 회사 내부 방침(부정가입 및 이용 방지, 사법기관 수사의뢰 시 증거자료)
보존기록 / 보유기간: 개인정보 및 부정이용기록(불량 혹은 비정상 이용 기록): 이름, 휴대전화번호, 이메일주소, IP, 로그기록 / 6개월
보존근거: 회사 내부 방침(이벤트 신청 이용에 따른 소비자의 불만 또는 분쟁처리에 관한 기록 보존)
보존기록 / 보유기간: 이벤트 신청 등 서비스 이용 기록(이름, 휴대전화번호, 성별, 생년, 문의사항) / 3년
보존근거: 정보통신망법
보존기록 / 보유기간: 1년 간 서비스를 이용하지 않은 회의원 개인정보 / 1년
(6) 개인정보 파기절차 및 방법
회사는 원칙적으로 개인정보 처리목적이 달성된 경우 지체없이 해당 개인정보를 파기하며, 파기절차 및 파기방법은 다음과 같습니다.
가. 파기절차 이용자가 회원가입 등을 위해 입력한 정보는 수집 목적이 달성된 후 별도의 DB에 옮겨져(종이의 경우 별도의 서류) 내부 방침 및 기타 관련 법령에 따라 일정기간 저장된 후 혹은 즉시 파기됩니다. 이 때, 별도의 DB로 옮겨진 개인정보는 법률에 의한 경우 외에는 다른 목적으로 이용되지 않습니다.
나. 파기방법 전자적 파일 형태의 정보는 기록을 재생할 수 없는 기술적 방법을 사용하여 삭제하며, 종이에 출력된 정보는 분쇄기로 분쇄하거나 소각하여 파기합니다.
(7) 이용자 및 법정대리인의 권리
이용자 또는 법정대리인은 회사에 대해 언제든지 자신 혹은 만 14세 미만 아동의 개인정보보호 관련 권리를 행사할 수 있습니다. 이용자 또는 법정대리인은 회사의 개인정보 처리에 동의하지 않는 경우 동의 철회 혹은 회원 탈퇴를 요청할 수 있습니다. 단, 이경우 서비스의 일부 또는 전부의 이용이 어려울 수 있습니다.
가. 개인정보 조회, 수정을 위해서는 서비스 내 "기본정보 수정"을, 회원탈퇴를 위해서는 회사의 전자우편 또는 전화를 통해 탈퇴 신청을 한 후 본인 확인 절차를 걸치고 직접 열람, 정정 또는 탈퇴가 가능합니다.
나. 개인정보 보호책임자에게 서면, 전화 또는 이메일로 연락한 경우에도 지체 없이 조치합니다.
다. 이용자가 개인정보의 오류에 대한 정정을 요청하는 경우에는 정정을 완료하기 전까지 당해 개인정보를 이용 또는 제공하지 않습니다. 또한 잘못된 개인정보를 제 3자에게 이미 제공한 경우에는 정정 처리결과를 제 3자에게 지체 없이 통지하여 정정이 이루어지도록 하겠습니다.
라. 회사는 이용자 또는 법정 대리인의 요청에 의해 해지 또는 삭제된 개인정보를 "(5) 개인정보의 보유 및 이용기간"에 명시된 바에 따라 처리하고 그 외의 용도로 열람 또는 이용할 수 없도록 처리하고 있습니다.
(8) 쿠키의 운영 및 수집 거부 방법
가. 회사는 이용자에게 맞춤형 서비스를 제공하고, 보다 신속한 서비스 제공을 위해 이용자에 대한 정보를 저장하고 수시로 불러오는 ‘쿠키(Cookie)’를 사용합니다. 쿠키란 웹사이트 방문 시, 서버가 이용자의 하드디스크에 저장하는 작은 기록 정보 파일을 말합니다. 이후 이용자가 웹사이트에 방문할 경우 웹사이트 서버는 이용자의 하드디스크에 저장되어 있는 쿠키의 내용을 읽어 이용자의 환경설정을 유지하고 맞춤화된 서비스를 제공합니다. 쿠키는 개인을 식별하는 정보를 자동적•능동적으로 수집하지 않으며, 이용자는 언제든지 이러한 쿠키의 저장을 거부하거나 삭제할 수 있습니다. 단, 쿠키 저장을 거부하는 경우에는 일부 서비스 이용이 어려울 수 있습니다.
나. 쿠키의 설치 / 운용 및 거부 방법 안내 이용자는 사용하는 웹 브라우저의 옵션을 설정함으로써 모든 쿠키를 허용 혹은 거부하거나, 쿠키가 저장될 때마다 확인을 거치도록 지정할 수 있습니다. - Internet Explorer 의 경우 [도구] 메뉴에서 [인터넷 옵션]을 선택합니다. [개인정보 탭]에서 설정합니다. [개인정보취급 수준]을 설정합니다. - Chrome의 경우 [설정] 하단 [고급설정 표시]를 클릭합니다. [개인정보] 컨텐츠 설정 -&gt; [쿠키] 영역에서 원하시는 정책을 선택합니다.
(9) 개인정보 보호를 위한 기술적/권리적 보호 대책
“회사”는 이용자들의 개인정보 보호를 위해 다음과 같은 기술적∙관리적 노력을 하고 있습니다.
가. 개인정보 암호화 이용자의 비밀번호 등 중요정보는 암호화되어 저장, 관리되고 있으며, 개인정보의 확인 및 변경은 본인에 의해서만 가능합니다.
나. 해킹 등에 대비한 대책 회사는 해킹이나 악성코드에 의하여 이용자들의 개인정보가 유출• 훼손되는 것을 방지하기 위하여 침입차단 시스템을 24시간 운영하여 외부로부터의 무단접근을 통제하고 있으며, 백신 프로그램을 설치하여 시스템이 악성코드나 바이러스에 감염되지 않도록 노력하고 있습니다. 또한 개인정보의 훼손에 대비하여 자료를 수시로 백업하고 있고, 암호화통신 등을 통하여 네트워크 상에서 개인정보를 안전하게 전송할 수 있도록 하고 있습니다. 더불어 회사는 더욱 안전한 개인정보 처리를 위해 최대한의 기술적 방법을 구비하기 위해 노력하고 있습니다.
다. 개인정보 처리 직원의 최소화 및 교육 회사는 개인정보를 처리하는 직원을 최소한으로 제한하고 있으며, 관련 직원들에 대한 수시 교육을 실시하여 개인정보처리방침의 중요성을 인지시키고 있습니다.
(10) 개인정보 보호책임자 및 담당부서
이용자는 회사의 서비스를 이용하는 중 발생하는 모든 개인정보 관련 문의, 불만처리 등에 관한 사항을 개인정보 보호책임자 혹은 담당부서로 문의할 수 있습니다. 회사는 이용자의 문의에 대한 신속하고 성실한 답변 및 처리를 위해 노력하고 있습니다.
[개인정보 보호 책임자]
- 개인정보 보호책임자: 김창기
- 담당부서/직위: 바이브알씨 본부/본부장
- 전화번호: 02-6247-1001
- 이메일 주소: kimcg@carelabs.co.kr
기타 개인정보침해에 대한 신고나 상담이 필요하신 경우에는 아래 기관으로 문의하시기 바랍니다.
- 개인정보침해신고센터, 개인정보 분쟁조정위원회(privacy.kisa.or.kr / 국번없이 118)
- 대검찰청 사이버수사과(www.spo.go.kr / 02-3480-3571)
- 경찰청 사이버테러대응센터(www.ctrc.go.kr / 1566-0112)
(11) 링크 사이트에 대한 책임
회사는 이용자에게 다른 웹사이트에 대한 링크를 제공할 수 있습니다. 그러나 링크 웹사이트들은 회사의 개인정보처리방침이 적용되지 않을 수 있으므로 해당 링크를 통해 외부 웹사이트로 이동하는 경우, 해당 서비스의 정책을 검토하시기 바랍니다.
(12) 개인정보처리방침의 고지 의무
회사는 개인정보처리방침에 대한 변경이 있을 경우에는 개정 개인정보처리방침의 시행일로부터 최소 7일 전에 홈페이지/모바일 앱의 공지사항 또는 이메일을 통해 고지합니다. 또한, 필요 시 이용자 동의를 다시 받을 수도 있습니다.
부 칙
가) 본 개인정보취급방침은 2018년 1월 1일부터 적용됩니다.
나) 시행되던 종전의 개인정보취급방침은 본 방침으로 대체됩니다
- 개인정보 처리방침 제정일자: 2013. 5. 24
- 개인정보 처리방침 최종 변경 개정일자: 2018. 1. 1</textarea>
</div>
</div>
</div>
<!--가입 확인버튼 -->
<div class="row">
<a href="#" id="btnAgree" role="button" class="confirm_agree">확인</a>
</div>
</form>
</div>
</div>
<?= $this->endSection() ?>
+219
View File
@@ -0,0 +1,219 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 사이트 맵
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap siteMap-container">
<div class="title-area">
<h2 class="page-title">사이트 맵</h2>
</div>
<div class="sitemap-wrap">
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고관리</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/facebook">페이스북</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/kakao">카카오 모먼트</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/google">구글 에드워즈</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/etc">기타 광고관리</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 통합 DB관리</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/db">통합 DB관리</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 회계관리</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/unpaid">미수금 관리</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/withdraw">출금요청</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/withdraw_list">업체목록</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/tax">세금계산서 요청</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/tax_list">업체목록<br>(세금 계산서)</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i>인사관리</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/manage">시간차 관리</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 이벤트</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/event_manage">이벤트 관리</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/client_manage">광고주 관리</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/media_manage">매체 관리</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/change_manage">전환 관리</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/exel">엑셀 업로드</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i>백엔드 작업</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/user/belong/1">사용자 소속 변경</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/board/list">게시판</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/company/list">광고주,대행사 관리</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/guest">회원가입 승인 대기</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i>가이드 페이지</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/modal">모달 전체</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/index">main 페이지</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/sub">sub 페이지</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i>account</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/register_agree">이용 약관 동의</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/login_A">로그인 A타입</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/login_B">로그인 B타입</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/register_A">회원가입 A타입</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/register_B">회원가입 B타입</a></button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button"><a href="/example/register">회원가입 C타입</a></button>
</div>
</div>
</div>
</div>
<div class="section client-list advertiser">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i>기타 페이지</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button"><a href="/example/siteMap">사이트 맵</a></button>
</div>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
+432
View File
@@ -0,0 +1,432 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>ZENITH</title>
</head>
<body>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">페이스북 광고관리</h2>
<p class="title-disc">숫자 중심의 퍼포먼스 마케팅에 집중! 사람들이 어떤 콘텐츠에 반응하는가? 비용 대비 얼만큼의 성과가 있는가?</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
<div class="detail row d-flex justify-content-center">
<dl class="col">
<dt>노출수</dt>
<dd>34,456</dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd>809</dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd>1.09</dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd>1,234,123</dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd>61</dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd>45,234</dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd>7.34</dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd>23,456,900</dd>
</dl>
</div>
</div>
<div class="client-list biz">
<h3><i class="bi bi-chevron-down"></i> 비즈니스 계정</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="client-list advertiser">
<h3><i class="bi bi-chevron-down"></i> 광고주</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button" class="active alert">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="alert">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button" class="active">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">거무타</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">마디척병원○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[전국]상상의원_주름보톡스2*</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">[대전]상상의원_가나다라마마다먀라</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">플란치과_임플○</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">비결뷰티센터</button>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width:calc(14 / 170 * 100%)"></div>
<div class="txt">14/170</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-wrap">
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="campaign-tab" data-bs-toggle="tab" data-bs-target="#campaign-tab-pane" type="button" role="tab" aria-controls="campaign-tab-pane" aria-selected="true">캠페인</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="set-tab" data-bs-toggle="tab" data-bs-target="#set-tab-pane" type="button" role="tab" aria-controls="set-tab-pane" aria-selected="false">광고 세트</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="advertisement-tab" data-bs-toggle="tab" data-bs-target="#advertisement-tab-pane" type="button" role="tab" aria-controls="advertisement-tab-pane" aria-selected="false">광고</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="campaign-tab-pane" role="tabpanel" aria-labelledby="campaign-tab">
<div class="btn-wrap">
<button type="button" class="btn btn-outline-danger active">수동 업데이트</button>
<button type="button" class="btn btn-outline-danger">데이터 비교</button>
<button type="button" class="btn btn-outline-danger"><i class="bi bi-file-text"></i> 메모확인</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover">
<colgroup>
<col style="width:10%">
<col style="width:5.5%">
<col style="width:5%">
<col style="width:5%">
<col style="width:7%">
<col style="width:6%">
<col style="width:4%">
<col style="width:7.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:7.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:5.5%">
<col style="width:6.5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">캠페인명</th>
<th scope="col">상태</th>
<th scope="col">예산 <br>ai</th>
<th scope="col">목표 <br>ai</th>
<th scope="col">예산</th>
<th scope="col">현재 <br>DB단가</th>
<th scope="col">유효 <br>DB</th>
<th scope="col">지출액</th>
<th scope="col">수익</th>
<th scope="col">수익률</th>
<th scope="col">매출액</th>
<th scope="col">노출수</th>
<th scope="col">링크클릭</th>
<th scope="col">CPC</th>
<th scope="col">CTR</th>
<th scope="col">DB <br>전환률</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="col" class="text-center">캠페인 11건 결과</th>
<td></td>
<td></td>
<td></td>
<td>₩22,345,222</td>
<td>₩30,342</td>
<td>515</td>
<td>₩18,345,342</td>
<td>₩6,235,666</td>
<td>29.45%</td>
<td>₩21,345,678</td>
<td>654,345</td>
<td>9,457</td>
<td>₩1,778</td>
<td>1.13%</td>
<td>6.34%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<button type="button" class="btn btn-outline-secondary btn-sm">활성</button>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>ON</td>
<td>ON</td>
<td>₩100,000
<div class="btn-area d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-up-short"></i></button>
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-down-short"></i></button>
</div>
</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<button type="button" class="btn btn-outline-secondary btn-sm">활성</button>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>ON</td>
<td>ON</td>
<td>₩100,000
<div class="btn-area d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-up-short"></i></button>
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-down-short"></i></button>
</div>
</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
<tr>
<th scope="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="check01">
<label class="form-check-label" for="check01">[02.22][케랩7_마디척병원_부위별통증] evt_5721 @15 진선_주말OFF_규칙</label>
</div>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-paper"><i class="bi bi-file-text"></i></button>
</div>
</th>
<td>
<button type="button" class="btn btn-outline-secondary btn-sm">활성</button>
<div class="btn-area">
<button type="button" class="btn btn-outline-secondary btn-reflesh"><i class="bi bi-arrow-counterclockwise"></i>새로고침</button>
</div>
</td>
<td>ON</td>
<td>ON</td>
<td>₩100,000
<div class="btn-area d-flex justify-content-between">
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-up-short"></i></button>
<button type="button" class="btn btn-secondary btn-arrow"><i class="bi bi-arrow-down-short"></i></button>
</div>
</td>
<td>0</td>
<td>0</td>
<td>₩15,345</td>
<td>₩-15,678</td>
<td>0%</td>
<td>₩0</td>
<td>631</td>
<td>3</td>
<td>₩5,345</td>
<td>0.48%</td>
<td>0%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="set-tab-pane" role="tabpanel" aria-labelledby="set-tab">
광고 세트
</div>
<div class="tab-pane" id="advertisement-tab-pane" role="tabpanel" aria-labelledby="advertisement-tab">
광고
</div>
</div>
</div>
</div>
</body>
</html>
<?=$this->endSection();?>
+170
View File
@@ -0,0 +1,170 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 세금계산서 요청
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">세금계산서 요청</h2>
<p class="title-disc">세금계산서 발행을 경영지원실에 요청하세요~ 나연님, 서진님 고생이 많으십니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<select class="form-select" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 담당자</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 결과</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 구분</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<a href="/example/tax_list"><button type="button" class="btn btn-danger">업체목록(세금계산서)</button></a>
<a href="/example/withdraw"><button type="button" class="btn btn-danger">글쓰기(세금계산서)</button></a>
<a href="/example/exel"><button type="button" class="btn btn-danger">엑셀백업</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:3%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
<col style="width:15%">
<col style="width:10%">
<col style="width:5%">
<col style="">
<col style="width:8%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">발행일자</th>
<th scope="col">작성자</th>
<th scope="col">구분</th>
<th scope="col">사업자명</th>
<th scope="col">사업자등록번호</th>
<th scope="col">대표자명</th>
<th scope="col">내역</th>
<th scope="col">공급가액</th>
<th scope="col">총금액(VAT 포함)</th>
<th scope="col">비고</th>
<th scope="col">결과</th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-0">845</td>
<td>2023-03-13</td>
<td>김혜린</td>
<td>입금완료</td>
<td>우주마켓_MOBON</td>
<td>234-45-12456</td>
<td>이주옥</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td>1,100,000</td>
<td></td>
<td>완료</td>
</tr>
<tr>
<td class="p-0">845</td>
<td>2023-03-13</td>
<td>김혜린</td>
<td>입금완료</td>
<td>우주마켓_MOBON</td>
<td>234-45-12456</td>
<td>이주옥</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td>1,100,000</td>
<td>2/28 재발행 예정</td>
<td>완료</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
+322
View File
@@ -0,0 +1,322 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 세금계산서 요청
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">세금계산서 요청</h2>
<p class="title-disc">세금계산서 발행을 경영지원실에 요청하세요~ 나연님, 서진님 고생이 많으십니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<select class="form-select" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#bizModal">업체등록(세금계산서)</button>
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#taxModal">리스트(세금계산서)</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:15%">
<col style="width:10%">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
<col style="">
<col style="width:12%">
<col style="width:12%">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">사업자명</th>
<th scope="col">사업자등록번호</th>
<th scope="col">대표자명</th>
<th scope="col">업태</th>
<th scope="col">종목</th>
<th scope="col">주소</th>
<th scope="col">메일주소1</th>
<th scope="col">메일주소2</th>
<th scope="col">작성자</th>
<th scope="col">담당자</th>
<th scope="col">작성일</th>
</tr>
</thead>
<tbody>
<tr>
<td>우주마켓_MOBON</td>
<td>234-45-12456</td>
<td>김혜린</td>
<td>도소매</td>
<td>화장품</td>
<td>서울특별시 강남구 테헤란로 123길 22, b동 3층(신사동, 케이티타워신사)</td>
<td>b-uwqej@nave.rcom</td>
<td></td>
<td>고영석</td>
<td>고영석</td>
<td>2023-01-23 14:14:34</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('modal');?>
<!-- 업체 등록 -->
<div class="modal fade" id="bizModal" tabindex="-1" aria-labelledby="bizModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="bizModalLabel">업체 등록</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row">사업자명</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">사업자등록번호</th>
<td>
<div class="d-flex">
<input type="text" class="form-control">
<button type="button" class="btn btn-secondary btn-sm">중복확인</button>
</div>
</td>
</tr>
<tr>
<th scope="row">대표자</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">업태</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">종목</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">주소</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">이메일1</th>
<td><input type="text" class="form-control"></td>
</tr>
<tr>
<th scope="row">당당자</th>
<td><input type="text" class="form-control"></td>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-danger btn-sm">이메일 추가</button>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">작성완료</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
<!-- //업체 등록 -->
<!-- 세금계산서 -->
<div class="modal fade" id="taxModal" tabindex="-1" aria-labelledby="taxModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="taxModalLabel">세금계산서 발행 요청서</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="approval">
<ol class="d-flex">
<li>
<span>담당자</span>
<div></div>
</li>
<li>
<span>경영지원실장</span>
<div></div>
</li>
<li>
<span>사업부대표</span>
<div></div>
</li>
</ol>
</div>
<div class="table-responsive">
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:25%;">
<col style="width:75%;">
</colgroup>
<tbody>
<tr>
<th scope="row">담당자</th>
<td>
<select class="form-select" aria-label="담당자 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">사업자명</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">사업자 등록번호</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">대표자</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">업태</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">종목</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">주소</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">이메일1</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">이메일2</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">발행일자</th>
<td>
<input type="text" class="form-control">
</td>
</tr>
<tr>
<th scope="row">구분</th>
<td>
<select class="form-select" aria-label="구분 선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</td>
</tr>
<tr>
<th scope="row">내역</th>
<td>
<div class="d-flex align-items-center">
<span class="me-2">1.</span>
<input type="text" class="form-control" placeholder="내역">
<input type="text" class="form-control ms-2 me-2 w-50" placeholder="공급가액">
<input type="text" class="form-control w-50" placeholder="부가세">
</div>
<div class="d-flex justify-content-end mt-2">
<button type="button">- 헹 제거</button>
<button type="button">+ 행 추가</button>
</div>
</td>
</tr>
<tr>
<th scope="row">총금액(VAT포함)</th>
<td>
<div class="d-flex">
<button type="button" class="btn btn-dark btn-sm me-2">자동계산</button>
<input type="text" class="form-control">
</div>
</td>
</tr>
<tr>
<th scope="row">공급가액</th>
<td>
<div class="d-flex">
<button type="button" class="btn btn-dark btn-sm me-2">자동계산</button>
<input type="text" class="form-control">
</div>
</td>
</tr>
<tr>
<th scope="row">비고</th>
<td>
<textarea></textarea>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">작성완료</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
<!-- //세금계산서 -->
<?=$this->endSection();?>
+117
View File
@@ -0,0 +1,117 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 미수금 관리
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">미수금 관리</h2>
</div>
<div class="row mt-5">
<div class="col half">
<h3 class="content-title">미수금 내역</h3>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<p class="mb-4">* 2019년 9월 1일부터 세부내역 조회가 가능하며, 문의사랑이 있을 경우 경영지원실로 문의하시기 바랍니다.</p>
<div class="table-responsive">
<table class="table table-striped table-hover table-default caption-top">
<caption class="text-end">[단위: 원, 부가세포함]</caption>
<colgroup>
<col style="width:10%">
<col>
<col style="width:20%">
<col style="width:17%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">담당자</th>
<th scope="col">업체명</th>
<th scope="col">사업자 번호</th>
<th scope="col">최근 세금계산서</th>
<th scope="col">미수금</th>
</tr>
</thead>
<tbody>
<tr>
<td>김혜린</td>
<td>우주마켓_MOBON</td>
<td>114-02-34856</td>
<td class="text-end">+865일</td>
<td class="text-end">2,345,789</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col half">
<h3 class="content-title">입금 내역</h3>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="regi-wrap">
<form class="search d-flex justify-content-center">
<input type="text" class="form-control">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<input type="text" class="form-control" placeholder="광고주">
<input type="text" class="form-control" placeholder="사업자등록번호">
<input type="text" class="form-control" placeholder="입금액">
<input type="text" class="form-control" placeholder="적요/비고">
<button class="btn btn-dark ms-2" type="submit">등록</button>
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:15%">
<col>
<col style="width:20%">
<col style="width:15%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">날짜</th>
<th scope="col">업체명</th>
<th scope="col">사업자 번호</th>
<th scope="col">입금액</th>
<th scope="col">비고</th>
</tr>
</thead>
<tbody>
<tr>
<td>2023-3-24</td>
<td>우주마켓_MOBON</td>
<td>114-02-34856</td>
<td class="text-end">34,4567,324</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
+174
View File
@@ -0,0 +1,174 @@
a<?=$this->extend('templates/front_example.php');?>
<?=$this->section('title');?>
ZENITH - 출금요청
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">출금요청</h2>
<p class="title-disc">출금이 필요한 거래처를 경영지원실에 요청하세요~ 나연님, 서진님 고생이 많으십니다.</p>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<select class="form-select" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 담당자</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 결과</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 구분</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<a href="/example/withdraw_list"><button type="button" class="btn btn-danger">업체목록(출금요청)</button></a>
<a href="/example/tax"/><button type="button" class="btn btn-danger">글쓰기(출금요청)</button></a>
<a href="/example/exel"/><button type="button" class="btn btn-danger">엑셀백업</button></a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default table-sm">
<colgroup>
<col style="width:3%">
<col style="width:8%">
<col style="width:5%">
<col style="width:5%">
<col style="width:10%">
<col style="width:8%">
<col style="width:10%">
<col style="">
<col style="width:10%">
<col style="">
<col style="width:5%">
<col style="width:5%">
<col style="width:8%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">번호</th>
<th scope="col">작성일</th>
<th scope="col">작성자</th>
<th scope="col">구분</th>
<th scope="col">거래처명(예금주명)</th>
<th scope="col">은행</th>
<th scope="col">계좌번호</th>
<th scope="col">내역(자세히)</th>
<th scope="col">총금액(VAT 포함)</th>
<th scope="col">비고</th>
<th scope="col">결제현황</th>
<th scope="col">결과</th>
<th scope="col">출금완료일</th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-0">845</td>
<td>2023-03-13 18:34:39</td>
<td>김혜린</td>
<td>광고비</td>
<td>우주마켓_MOBON</td>
<td>국민은행</td>
<td>174892038457684</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td></td>
<td>진행중</td>
<td>진행중</td>
<td></td>
</tr>
<tr>
<td>845</td>
<td>2023-03-13 18:34:39</td>
<td>김혜린</td>
<td>광고비</td>
<td>우주마켓_MOBON</td>
<td>국민은행</td>
<td>174892038457684</td>
<td>인라이플_모비온_우주마켓 광고비 지출결의</td>
<td>1,100,000</td>
<td></td>
<td class="text-primary">완료</td>
<td>완료</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<?=$this->endSection();?>
+125
View File
@@ -0,0 +1,125 @@
<?=$this->extend('templates/front_example.php');?>
<?=$this->section('content');?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>출금요청 - 업체목록</title>
</head>
<body>
<div class="sub-contents-wrap">
<div class="title-area">
<h2 class="page-title">출금요청 - 업체목록</h2>
</div>
<div class="search-wrap">
<form class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
<span> ~ </span>
<input type="text">
<button type="button"><i class="bi bi-calendar2-week"></i></button>
</div>
<select class="form-select" aria-label="선택">
<option selected>-선택-</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<div class="input">
<input class="" type="text" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="section client-list biz">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 담당자</h3>
<div class="row">
<div class="col">
<div class="inner">
<button type="button">열혈 패밀리</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스5</button>
</div>
</div>
<div class="col">
<div class="inner">
<button type="button">케어랩스7</button>
</div>
</div>
</div>
</div>
<div class="section ">
<div class="btn-wrap text-end mb-2">
<button type="button" class="btn btn-danger">업체등록(출금요청)</button>
<button type="button" class="btn btn-danger">리스트(출금요청)</button>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default table-sm">
<colgroup>
<col style="">
<col style="width:8%">
<col style="width:15%">
<col style="width:5%">
<col style="width:15%">
<col style="width:5%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">거래처명(예금주명)</th>
<th scope="col">은행</th>
<th scope="col">계좌번호</th>
<th scope="col">작성자</th>
<th scope="col">작성일</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>(주)당금페이_상상의원3_21783</td>
<td>기업은행</td>
<td>0492173819374</td>
<td>윤재진</td>
<td>2023-03-02 :11:34:23</td>
<td>
<button type="button" class="btn btn-dark btn-sm">DEL</button>
</td>
</tr>
<tr>
<td>(주)당금페이_상상의원3_21783</td>
<td>기업은행</td>
<td>0492173819374</td>
<td>윤재진</td>
<td>2023-03-02 :11:34:23</td>
<td>
<button type="button" class="btn btn-dark btn-sm">DEL</button>
</td>
</tr>
<tr>
<td>(주)당금페이_상상의원3_21783</td>
<td>기업은행</td>
<td>0492173819374</td>
<td>윤재진</td>
<td>2023-03-02 :11:34:23</td>
<td>
<button type="button" class="btn btn-dark btn-sm">DEL</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
<?=$this->endSection();?>
+18
View File
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>게스트</title>
<style>
body{background-color: #f2f2f2;}
.box{display: flex;align-items: center;justify-content: center;width:300px; height:200px; background-color: #fff;position: absolute;top:50%;left: 50%;transform: translate(-50%, -50%);border-radius: 15px;}
.box p{font-size:30px;}
</style>
</head>
<body>
<div class="box">
<p>승인 대기중</p>
</div>
</body>
</html>
+786
View File
@@ -0,0 +1,786 @@
<?= $this->extend('templates/front.php'); ?>
<?= $this->section('title'); ?>
ZENITH - 인사관리 / 시간차 관리
<?= $this->endSection(); ?>
<!--헤더-->
<?= $this->section('header'); ?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<?= $this->endSection(); ?>
<!--바디-->
<?= $this->section('body'); ?>
<?= $this->endSection(); ?>
<!--컨텐츠영역-->
<?= $this->section('content'); ?>
<div class="sub-contents-wrap dayOff-contanier">
<div class="title-area">
<h2 class="page-title">시간차 관리</h2>
<button type="button" class="btn btn-dark ms-3" data-bs-toggle="modal" data-bs-target="#totalModal">전체조회</button>
</div>
<div class="row mt-5">
<div class="col half">
<h3 class="content-title">결재내역</h3>
<div class="search-wrap">
<form id="issue" name="issue" class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate1" id="sdate1" value="<?= date("Y-m-d", strtotime('-1 month')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate1" id="edate1" value="<?= date("Y-m-d") ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<div class="input">
<input type="text" name="stx1" id="stx1" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<?php
if (auth()->user()->hasPermission('humanresource.management')) {
?>
<div class="table-responsive">
<form id="approval_write" name="approval_write">
<table class="table table-striped table-hover table-default">
<input type="hidden" id="seq" name="seq" value="">
<input type="hidden" id="gw_user" name="gw_user" value="">
<input type="hidden" id="user_id" name="user_id" value="">
<input type="hidden" id="doc_id" name="doc_id" value="">
<input type="hidden" id="doc_title" name="doc_title" value="">
<input type="hidden" id="rep_datetime" name="rep_datetime" value="">
<colgroup>
<col style="width:15%">
<col style="width:10%">
<col style="width:10%">
<col style="width:12%">
<col style="width:12%">
<col style="width:10%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">문서번호</th>
<th scope="col">작성자</th>
<th scope="col">연차차감</th>
<th scope="col">요청수량</th>
<th scope="col">승인수량</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="d-flex">
<label>
<input type="text" name="doc_no" id="doc_no" required autocomplete="off" class="form-control">
</label>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-center">
<label>
<input type="text" name="user_nickname" id="user_nickname" autocomplete="off" class="form-control">
</label>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-center">
<input type="text" name="break_balance" id="break_balance" autocomplete="off" class="form-control">
<span class="ms-1">개</span>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-center">
<input type="text" name="hourticket" id="hourticket" value="0" class="form-control wid70">
<span class="ms-1">시간</span>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-center">
<input type="text" name="hourticket2" id="hourticket2" autocomplete="off" value="0" class="form-control wid70">
<span class="ms-1">시간</span>
</div>
</td>
<td>
<button type="button" id="reg_use1" name="reg_use1" class="btn btn-primary">등록
</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<?php } ?>
<div class="table-responsive dayOff-payment-table" id="dayOff-payment-table">
<table class="table table-striped table-hover table-default">
<thead class="table-dark">
<tr>
<th scope="col">작성자</th>
<th scope="col">작성일</th>
<th scope="col">문서번호</th>
<th scope="col">연차차감</th>
<th scope="col">발급쿠폰</th>
<th scope="col">결과</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="col half">
<h3 class="content-title">신청현황</h3>
<div class="search-wrap">
<form id="use" name="use" class="search d-flex justify-content-center">
<div class="term d-flex align-items-center">
<label>
<input type="text" name="sdate2" id="sdate2"
value="<?= date("Y-m-d", strtotime('-1 month')) ?>" readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
<span> ~ </span>
<label>
<input type="text" name="edate2" id="edate2" value="<?= date("Y-m-d") ?>"
readonly="readonly">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<div class="input">
<input type="text" name="stx2" id="stx2" placeholder="검색어를 입력하세요">
<button class="btn-primary" type="submit">조회</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-default">
<colgroup>
<col style="width:30%">
<col style="width:20%;">
<col style="width:35%">
<col style="width:15%">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">날짜</th>
<th scope="col">쿠폰사용</th>
<th scope="col">사용시간</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="d-flex">
<label class="d-flex align-items-center justify-content-center">
<input type="text" name="sdate3" id="sdate3" class="form-control">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-center">
<select id="hour_ticket" name="hour_ticket" class="form-select">
<option>1시간</option>
<option>2시간</option>
<option>3시간</option>
</select>
</div>
</td>
<td>
<div class="d-flex align-items-center justify-content-center">
<select id="reg_hour" name="reg_hour" class="form-select wid70" aria-label="시간 선택">
<option value="none" selected>선택</option>
<?php
for ($i = 10; $i < 19; $i++) {
echo "<option value='{$i}'>{$i}</option>";
}
?>
</select>
<span class="m-1">시</span>
<select id="reg_min" name="reg_min" class="form-select wid70" aria-label="분 선택">
<option value="none" selected>선택</option>
<?php
for ($i = 0; $i < 6; $i++) {
echo "<option value='{$i}0'>{$i}0</option>";
}
?>
</select>
<span class="ms-1">분</span>
</div>
</td>
<td>
<button type="button" id="reg_use2" name="reg_use2" class="btn btn-primary">등록</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive dayOff-application-table" id="dayOff-application-table">
<table class="table table-striped table-hover table-default">
<thead class="table-dark">
<tr>
<th scope="col">사용자</th>
<th scope="col">쿠폰사용</th>
<th scope="col">사용일자</th>
<th scope="col">시간</th>
<th scope="col">결과</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="5" class="none">검색된 데이터가 없습니다.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?= $this->endSection(); ?>
<?= $this->section('modal'); ?>
<div class="modal fade dayOffModal" id="totalModal" tabindex="-1" aria-labelledby="totalModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="totalModalLabel">전체 조회</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="d-flex justify-content-between align-items-center">
<form id="all" name="all" class="row g-1">
<div class="col-7 d-flex align-items-center">
<label>
<input type="text" name="sdate4" id="sdate4" value="<?= date("Y-01-01") ?>"
class="form-control">
<i class="bi bi-calendar2-week"></i>
</label>
<span class="me-2 pd10"> ~ </span>
<label>
<input type="text" name="edate4" id="edate4" value="<?= date("Y-m-d") ?>"
class="form-control">
<i class="bi bi-calendar2-week"></i>
</label>
</div>
<div class="col-5 d-flex">
<input type="text" id="stx4" name="stx4" class="form-control">
<button type="submit" class="btn btn-primary w-25 ms-2">조회</button>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-bordered table-modal">
<thead>
<tr>
<th scope="col" rowspan="2" class="align-middle">사용자</th>
<th scope="col" colspan="2">검색기간</th>
<th scope="col" colspan="3">전체</th>
</tr>
<tr>
<th scope="col">발급</th>
<th scope="col">사용</th>
<th scope="col">발급</th>
<th scope="col">사용</th>
<th scope="col">잔여</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade issueDetail" id="issueDetail" tabindex="-1" aria-labelledby="issueDetailLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="issueDetailLabel"> 승인처리</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-bordered table-modal">
<thead></thead>
<tbody> </tbody>
</table>
<div class="d-flex justify-content-end">
<button type="submit" id="issue_agree_btn" name="issue_agree_btn" onclick="hourticketConfirm('agree',''+this.value+'','issue')" class="btn btn-primary mt15" value="">승인</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?= $this->endSection(); ?>
<!--스크립트-->
<?= $this->section('script'); ?>
<script>
$('#doc_no').on('keyup', function () {
if (!$("#doc_no").val().match(/\(주\)케어랩스\-[0-9]+\-[0-9]{4,}/)) return;
getGwData();
});
// issue payment dataTable (결재내역)
let dataTablePayment = $('#dayOff-payment-table table').DataTable({
"dom": '<r<t>p>', // DataTables의 DOM 구조 설정 (r=처리중 t=테이블 p=페이징)
"autoWidth": true, // 자동 너비 조정 활성화
"processing" : true, // 처리 중 표시 활성화
"serverSide" : false, // 서버 사이드 처리 비활성화
"responsive": true, // 반응형 테이블 활성화
"searching": true, // 검색 기능 활성화
"ordering": true, // 정렬 기능 활성화
"orderMulti": false, // 다중 열 정렬 활성화
"orderCellsTop": false, // 열 헤더 클릭 시 정렬 활성화
"paging": true, // 페이징 비활성화
"pageLength": 10, // 페이지당 표시할 행 수
"info": false, // 정보 표시 비활성화
"scroller": false, // 스크롤러 비활성화
"scrollX": true, // 가로 스크롤 활성화
// "stateSave": true, // 상태 저장 활성화
"stateSave": false, // 상태 저장을 비활성화
"stateLoadParams": function (settings, data) {
data.start = 0;//데이터행 시작 위치
data.length = 10;//데이터행 개수
},
"deferRender": false, // 렌더링 지연 비활성화
"rowId": "seq",
"language": {"url": '/static/js/dataTables.i18n.json'}, //한글화 파일
"ajax": {
"url": "<?=base_url()?>/humanresource/hourticketissue", // AJAX URL 설정
"type": "POST", // HTTP 요청 방식 설정
"dataType": "json",
"data": function (d) {
return JSON.stringify({
"sdate": $('input[name="sdate1"]').val(),
"edate": $('input[name="edate1"]').val(),
"stx": $('#stx1').val() // 검색어 추가
});
},
"dataSrc": function (json) {
return json; // 또는 json.data 등 실제 데이터 배열을 반환
}
},
"columns": [
{"data": "nickname", "width": "15%", "className": "dt-type-center"},
{"data": "rep_datetime", "width": "20%", "className": "dt-type-center"},
{
"data": "doc_no",
"width": "20%",
"className": "dt-type-center",
"render": function (data, type, row) {
if(row.apr_user_id=="완료") {
return `<a href='http://gw.carelabs.co.kr/eap/ea/docpop/EAAppDocViewPop.do?doc_id=${row.doc_id}&form_id=18'>${data}</a>`;
} else {
return `<button id="viewdetail" name="viewdetail" data-bs-toggle="modal" data-bs-target="#issueDetail" value="${row.doc_no}">${data}</button>`;
}
}
},
{"data": "break_balance", "width": "10%", "className": "dt-type-center"},
{"data": "hour_ticket", "width": "10%", "className": "dt-type-center"},
{"data": "apr_user_id", "width": "10%", "className": "dt-type-center"}
],
});
// use application dataTable (신청현황)
let dataTableApplication = $('#dayOff-application-table table').DataTable({
"dom": '<r<t>p>', // DataTables의 DOM 구조 설정 (r=처리중 t=테이블 p=페이징)
"autoWidth": true, // 자동 너비 조정 활성화
"processing" : true, // 처리 중 표시 활성화
"serverSide" : false, // 서버 사이드 처리 비활성화
"responsive": true, // 반응형 테이블 활성화
"searching": true, // 검색 기능 활성화
"ordering": true, // 정렬 기능 활성화
"orderMulti": false, // 다중 열 정렬 활성화
"orderCellsTop": false, // 열 헤더 클릭 시 정렬 활성화
"paging": true, // 페이징 비활성화
"pageLength": 10, // 페이지당 표시할 행 수
"info": false, // 정보 표시 비활성화
"scroller": false, // 스크롤러 비활성화
"scrollX": true, // 가로 스크롤 활성화
"stateSave": true, // 상태 저장을 비활성화
"stateLoadParams": function (settings, data) {
data.start = 0;//데이터행 시작 위치
data.length = 10;//데이터행 개수
},
"deferRender": false, // 렌더링 지연 비활성화
"rowId": "seq",
"language": {"url": '/static/js/dataTables.i18n.json'}, //한글화 파일
"ajax": {
"url": "<?=base_url()?>/humanresource/hourticketuse", // AJAX URL 설정
"type": "POST", // HTTP 요청 방식 설정
"dataType": "json",
"data": function (d) {
return JSON.stringify({
"sdate": $('input[name="sdate2"]').val(),
"edate": $('input[name="edate2"]').val(),
"stx": $('#stx2').val() // 검색어 추가
});
},
"dataSrc": function (json) {
return json; // 또는 json.data 등 실제 데이터 배열을 반환
}
},
"columns": [
{"data": "nickname", "width": "15%", "className": "dt-type-center"},
{"data": "hour_ticket", "width": "15%", "className": "dt-type-center"},
{"data": "date", "width": "20%", "className": "dt-type-center"},
{"data": "time", "width": "35%", "className": "dt-type-center"},
{
"data": "seq",
"width": "15%",
"className": "dt-type-center",
"render": function (data, type, row) {
if (data === "완료") {
return data;
} else {
<?php if (auth()->user()->hasPermission('humanresource.management')) { ?>
return `<input type="button" class="btn btn-approve" value="승인" onclick="hourticketConfirm('agree','${data}','use')">
<input type="button" class="btn btn-reject" value="반려" onclick="hourticketConfirm('reject','${data}','use')">`;
<?php } else { ?>
return '진행중';
<?php } ?>
}
}
}
],
});
// use application dataTable (전체조회)
let dataTableAllSearch = $('.dayOffModal table').DataTable({
"dom": '<r<t>p>', // DataTables의 DOM 구조 설정 (r=처리중 t=테이블 p=페이징)
"autoWidth": false, // 자동 너비 조정 활성화
"processing" : true, // 처리 중 표시 활성화
"serverSide" : false, // 서버 사이드 처리 비활성화
"responsive": false, // 반응형 테이블 활성화
"ordering": true, // 정렬 기능 활성화
"orderMulti": true, // 다중 열 정렬 활성화
"paging": true, // 페이징 비활성화
"pageLength": 5, // 페이지당 표시할 행 수
"info": false, // 정보 표시 비활성화
"stateLoadParams": function (settings, data) {
data.start = 0;//데이터행 시작 위치
data.length = 10;//데이터행 개수
},
"deferRender": true, // 렌더링 지연 비활성화
"rowId": "seq",
"language": {"url": '/static/js/dataTables.i18n.json'}, //한글화 파일
"ajax": {
"url": "<?=base_url()?>/humanresource/hourticketall", // AJAX URL 설정
"type": "POST", // HTTP 요청 방식 설정
"dataType": "json",
"data": function (d) {
return JSON.stringify({
"sdate": $('input[name="sdate4"]').val(),
"edate": $('input[name="edate4"]').val(),
"stx": $('#stx4').val() // 검색어 추가
});
},
"dataSrc": function (json) {
return json; // 또는 json.data 등 실제 데이터 배열을 반환
}
},
"columns": [
{"data": "nickname", "width": "50%", "className": "dt-type-center", "orderable": true}, // 정렬 가능하도록 설정
{"data": "hourticket_issue", "width": "10%", "className": "dt-type-center"},
{"data": "hourticket_use", "width": "10%", "className": "dt-type-center"},
{"data": "issued", "width": "10%", "className": "dt-type-center"},
{"data": "used", "width": "10%", "className": "dt-type-center"},
{"data": "total", "width": "10%", "className": "dt-type-center"},
],
});
// issue submit (결재내역)
$('form[name="issue"]').on('submit', function (event) {
event.preventDefault();
dataTablePayment.ajax.reload(); // 테이블 데이터 새로고침
});
// use submit (신청현황)
$('form[name="use"]').on('submit', function (event) {
event.preventDefault();
dataTableApplication.ajax.reload(); // 테이블 데이터 새로고침
});
// all search submit (전체조회)
$('form[name="all"]').on('submit', function (event) {
event.preventDefault();
dataTableAllSearch.ajax.reload(); //신청현황데이블 새로고침
});
// 전체 조회 클릭 시 list 출력 (전체조회)
$('.ms-3').click(function () {
dataTableAllSearch.ajax.reload(); //신청현황데이블 새로고침
});
$("#reg_use1").click(function () {
issueProc();
});
//결제내역 진행중인 문서번호 클릭 시 상세 테이블 출력 start
let issueDetailTable; //전역변수로 issueDetailTable datatable 선언
$(document).on('click', '[data-bs-target="#issueDetail"]', function() {
var searchDocNo = $(this).val();
if(issueDetailTable){
issueDetailTable.destroy();
}
initIssueDetailTable(searchDocNo);// searchDocNo를 매개변수로 하여 initIssueDetailTable 함수 호출
});
function initIssueDetailTable(searchDocNo){
//datatables
issueDetailTable = $('.issueDetail table').DataTable({
"dom": '<t>',
"autoWidth": false,
"processing": true,
"serverSide": false,
"paging": false,
"info": false,
"language": {"url": '/static/js/dataTables.i18n.json'},
"ajax": {
"url": "<?=base_url()?>humanresource/getgwdata",
"type": "POST",
"dataType": "json",
"data": function (d) {
return JSON.stringify({
"doc_no": searchDocNo //매개변수로 받은 searchDocNo 전달
});
},
"contentType": "application/json; charset=utf-8",
"dataSrc": function (json) {
$("#issue_agree_btn").val(json.doc_id);
return [json]; //단일 객체를 배열로 변환
},
},
"columns": [
{"title": "작성자", "data": "nickname", "className": "dt-type-center"},
{"title": "작성일", "data": "rep_datetime", "className": "dt-type-center"},
{"title": "문서번호", "data": "doc_id", "className": "dt-type-center"},
{"title": "문서제목", "data": "doc_title", "className": "dt-type-center"},
{"title": "휴가일수", "data": "break_balance", "className": "dt-type-center"},
],
});
}
//결제내역 진행중인 문서번호 클릭 시 상세 테이블 출력 end
// reg use2 submit (쿠폰사용)
$("#reg_use2").click(function () {
// data filtering start
if ($("#sdate3").val() === "") {
alert("날짜 선택이 안되었습니다.")
return
}
if ($("#hour_ticket").val() === "") {
alert("쿠폰 사용 지정이 안되었습니다.")
return
}
if ($("#reg_hour").val() === "none" || $("#reg_min").val() === "none") {
alert("사용 시간이 올바르게 지정되지 않았습니다.")
return
}
// data filtering end
if (confirm("해당 데이터로 등록 하시겠습니까?\n" +
"날짜 : " + $("#sdate3").val() + "\n" +
"쿠폰사용 : " + $("#hour_ticket").val() + "\n" +
"사용시간 : " + $("#reg_hour").val() + "시 " + $("#reg_min").val() + "분"
)) {
let data = {
"date": $('input[name="sdate3"]').val(),
"hour_ticket": $("#hour_ticket").val().replace("시간", ""),
"time": $("#reg_hour").val() + ":" + $("#reg_min").val() + ":00"
}
$.ajax({
url: "<?=base_url()?>humanresource/hourticketreg",
type: "POST",
dataType: "json",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
success: function (data) {
if (data) {
alert("등록이 완료되었습니다.");
dataTableApplication.ajax.reload(); //신청현황데이블 새로고침
}
},
error: function (e) {
alert("error:" + e);
}
});
}
});
function issueProc() {
if(!$("#doc_no").val().match(/\(주\)케어랩스\-[0-9]+\-[0-9]{5,}/)) return;
let data = $('#approval_write').serialize()
$.ajax({
url: "<?=base_url()?>humanresource/issueproc",
type: "POST",
data: data,
contentType: "application/json; charset=utf-8",
success: function (data) {
if(data){
dataTablePayment.ajax.reload(); // 테이블 데이터 새로고침
}
},
error: function (e) {
alert("error:" + e);
}
});
}
function getGwData() {
let data = {
"doc_no": $("#doc_no").val()
}
$.ajax({
url: "<?=base_url()?>humanresource/getgwdata",
type: "POST",
dataType: "json",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
success: function (data) {
let hourticket = data.break_balance * 8;
$("#seq").val(data.seq);
$("#gw_user").val(data.gw_user);
$("#user_id").val(data.user_id);
$("#user_nickname").val(data.nickname);
$("#rep_datetime").val(data.rep_datetime);
$("#doc_id").val(data.doc_id);
$("#doc_title").val(data.doc_title);
$("#hourticket2").val(hourticket);
$("#break_balance").val(data.break_balance);
$("#hourticket").val(hourticket);
},
error: function (e) {
alert("error:" + e);
}
});
}
setDate('#sdate1, #edate1'); // 범위 날짜 선택기 - 결제내역
setDate('#sdate2, #edate2'); // 범위 날짜 선택기 - 신청현황
setDate('#sdate4, #edate4'); // 범위 날짜 선택기 - 전체조회
setDateSingle('#sdate3');//단일 날짜 선택기 - 쿠폰사용
// 신청현황 - 승인버튼
function hourticketConfirm(method,seq,type) {
let msg="";
if(method==="agree") msg="승인";
else if(method==="reject") msg="반려";
if (confirm(msg+'하시겠습니까?')) {
let data = {
"method": method,
"seq": seq,
"type": type
}
$.ajax({
url: "<?=base_url()?>humanresource/hourticketconfirm",
type: "POST",
dataType: "json",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
success: function (data) {
if (data) {
alert('승인 되었습니다.');
dataTableApplication.ajax.reload(); //신청현황데이블 새로고침
dataTablePayment.ajax.reload();
}
},
error: function (e) {
alert("error:" + e);
}
});
}
}
// 범위 날짜 선택기
function setDate(selector) {
$(selector).daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
}, function (start, end, label) {
// Lets update the fields manually this event fires on selection of range
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$checkinInput = $(selector.split(',')[0]);
$checkoutInput = $(selector.split(',')[1]);
// Updating Fields with selected dates
$checkinInput.val(startDate);
$checkoutInput.val(endDate);
// Setting the Selection of dates on calender on CHECKOUT FIELD (To get this it must be binded by Ids not Calss)
var checkOutPicker = $checkoutInput.data('daterangepicker');
checkOutPicker.setStartDate(startDate);
checkOutPicker.setEndDate(endDate);
// Setting the Selection of dates on calender on CHECKIN FIELD (To get this it must be binded by Ids not Calss)
var checkInPicker = $checkinInput.data('daterangepicker');
checkInPicker.setStartDate($checkinInput.val(startDate));
checkInPicker.setEndDate(endDate);
});
}
//단일 날짜 선택기
function setDateSingle(selector) {
$(selector).daterangepicker({
singleDatePicker: true, // 단일 날짜 선택기 활성화
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
//maxDate: new Date(),
autoUpdateInput: true,
ranges: {
'오늘': [moment(), moment()],
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'지난 일주일': [moment().subtract(6, 'days'), moment()],
'지난 한달': [moment().subtract(29, 'days'), moment()],
'이번달': [moment().startOf('month'), moment().endOf('month')],
}
});
}
</script>
<?= $this->endSection(); ?>
<!--푸터-->
<?= $this->section('footer'); ?>
<?= $this->endSection(); ?>
+306
View File
@@ -0,0 +1,306 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 통합 DB 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<!-- <style>
.search-wrap .search .input {flex:0;}
</style> -->
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap db-manage-contaniner">
<div class="title-area">
<h2 class="page-title">통합 DB 다운로드</h2>
</div>
<div class="search-wrap type-single">
<form name="search-form" autocomplete='off' class="search d-flex justify-content-center">
<div class="term term-small d-flex align-items-center">
<input type="hidden" name="sdate" id="sdate"><input type="hidden" name="edate" id="edate">
<label><input type="text" name="dates" id="dates" data="daterangepicker" autocomplete="off" aria-autocomplete="none"><i class="bi bi-calendar2-week"></i></label>
</div>
<div class="input">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="section reset-btn-wrap">
<div class="reset-btn-box">
<button type="button" class="reset-btn">필터 초기화</button>
</div>
</div>
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<div class="section client-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 분류</h3>
<div class="row" id="company-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.advertiser') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<div class="section client-list mt20">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row" id="advertiser-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<div class="section client-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매체</h3>
<div class="row" id="media-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.description') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user', 'agency')){?>
<div class="section client-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 이벤트 구분</h3>
<div class="row" id="description-list"></div>
</div>
<?php }?>
<div>
<div class="search-wrap my-5 status_wrap">
<div class="statusCount detail d-flex minWd"></div>
</div>
</div>
<!-- 메시지 입력 및 다운로드 버튼 추가 -->
<form id="download_form" class="section d-flex justify-content-center align-items-center">
<input type="text" id="message" name="message" placeholder="사유를 입력해주세요" class="form-control me-3">
<div class="d-flex align-items-center">
<select id="file_format" name="file_format" class="form-select me-3">
<option value="xlsx">Excel</option>
<option value="csv">CSV</option>
<option value="pdf">PDF</option>
</select>
<button type="submit" id="download_btn" class="btn btn-primary btn-lg d-flex align-items-center" style="white-space: nowrap;">
<i class="bi bi-file-earmark-spreadsheet me-2"></i> 다운로드
</button>
</div>
</form>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
$('#sdate, #dates').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
$('#edate').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
$('#dates').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
오늘: [moment(), moment()],
어제: [moment().subtract(1, "days"), moment().subtract(1, "days")],
최근7일: [moment().subtract(7, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
최근14일: [moment().subtract(14, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
이번주: [moment().day(1), moment()],
지난주: [moment().add(-1, "week").startOf("week").day(1), moment().add(-1, "week").startOf("week").add(7, "day")],
이번달: [moment().startOf("month"), moment().endOf("month")],
지난달: [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")],
한달전: [moment().subtract(1, "month"), moment()],
},
}, function(start, end, label) {
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$sdateInput = $('#sdate');
$edateInput = $('#edate');
$sdateInput.val(startDate);
$edateInput.val(endDate);
var dates = `${startDate} ~ ${endDate}`;
if(startDate == endDate) dates = startDate;
$('#dates').val(dates);
});
$(document).ready(function() {
function getSelectedButtonValues(selector) {
return $(selector).map(function() {
return $(this).val();
}).get().join('|');
}
function renderButtons(filters, validKeys, selectedValues) {
const hasActive = Object.values(selectedValues).some(values => values.length > 0);
validKeys.forEach(type => {
if (filters[type]) {
let $row = $(`#${type}-list`);
let html = filters[type].map(v => {
const isActive = selectedValues[type] && selectedValues[type].includes(v.label);
const isOn = !isActive && hasActive && v.count;
var count = v.count == v.total ? v.count : `${v.count}/${v.total}`;
count = count ? count : "";
$(`#${type}-list`).find('.zenith-loading').fadeOut(function(){$(this).remove();});
return `
<div class="col">
<div class="inner">
<button type="button" value="${v.label}" data-btn="${type}" class="${type}_btn filter_btn ${isActive ? 'active' : ''} ${isOn ? 'on' : ''}">
<span class="account_name">${v.label}</span>
<div class="progress">
<div class="txt">${count}</div>
</div>
</button>
</div>
</div>
`;
}).join('');
$row.html('').append(html);
}
});
}
function renderStatus(statusCountMap) {
let statusHtml = Object.keys(statusCountMap).map(status => `
<dl class="col" data-status="${status}">
<dt>${status}</dt>
<dd>${statusCountMap[status] || 0}</dd>
</dl>
`).join('');
$('.statusCount.detail').html(statusHtml);
}
function fetchData() {
const selectedValues = {
company: getSelectedButtonValues('.company_btn.active').split('|').filter(Boolean),
advertiser: getSelectedButtonValues('.advertiser_btn.active').split('|').filter(Boolean),
media: getSelectedButtonValues('.media_btn.active').split('|').filter(Boolean),
description: getSelectedButtonValues('.description_btn.active').split('|').filter(Boolean)
};
const hasActive = Object.values(selectedValues).some(values => values.length > 0);
$('.client-list .row').filter(function(i, el) {
if(!$(el).find('.zenith-loading').is(':visible')) $(el).append('<div class="zenith-loading"/>')
});
$.ajax({
url: '<?=base_url()?>/integrate/buttons',
type: 'POST',
data: {
sdate: $('#sdate').val(),
edate: $('#edate').val(),
stx: $('#stx').val(), // 검색어
company: selectedValues.company.join('|'), // 회사
advertiser: selectedValues.advertiser.join('|'), // 광고주
media: selectedValues.media.join('|'), // 미디어
description: selectedValues.description.join('|') // 설명
},
success: function(response) {
if (response) {
const filters = response;
const validKeys = ['advertiser', 'description', 'media', 'company'];
renderButtons(filters, validKeys, selectedValues);
if (filters.status) {
renderStatus(filters.status);
}
} else {
console.error('Invalid response data:', response);
}
},
error: function(xhr, status, error) {
console.error('Error fetching buttons:', error);
}
});
}
// .filter_btn 클릭 시 active 클래스 추가 및 데이터 다시 불러오기
$(document).on('click', '.filter_btn', function() {
$(this).toggleClass('active');
fetchData();
});
// 조회 버튼 클릭 시 데이터 다시 불러오기
$('#search_btn').on('click', function(event) {
event.preventDefault();
fetchData();
});
// 필터 초기화 버튼 클릭 이벤트
$('.reset-btn').on('click', function() {
window.location.reload(); // 현재 페이지를 다시 로드
});
// 초기 로드 시 선택된 버튼이 없으므로 hasActive를 false로 설정
fetchData();
// 다운로드 버튼 클릭 시 데이터 전송
$('#download_form').on('submit', function(event) {
event.preventDefault();
const message = $.trim($('#message').val());
if (message.length < 5) {
alert('사유를 5글자 이상 입력해주세요.');
return;
}
const data = {
sdate: $('#sdate').val(),
edate: $('#edate').val(),
advertiser: getSelectedButtonValues('.advertiser_btn.active'),
media: getSelectedButtonValues('.media_btn.active'),
description: getSelectedButtonValues('.description_btn.active'),
message: message,
file_format: $('#file_format').val() // 파일 형식 추가
};
// 버튼 비활성화
$('#download_btn').prop('disabled', true).text('다운로드 중...');
$.ajax({
url: '<?=base_url()?>/integrate/download-send',
type: 'POST',
data: data,
xhrFields: {
responseType: 'blob' // 바이너리 데이터로 응답 받기
},
success: function(response, status, xhr) {
const contentType = xhr.getResponseHeader('Content-Type');
if (contentType && contentType.indexOf('application/json') !== -1) {
// 응답이 JSON인 경우
if(response.status == 'error') {
alert(response.message);
}
} else {
// 응답이 Blob인 경우
const blob = new Blob([response], { type: contentType });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
const fileFormat = $('#file_format').val();
const fileExtension = fileFormat === 'xlsx' ? 'xlsx' : fileFormat === 'csv' ? 'csv' : 'pdf';
a.download = `통합DB_다운로드_<?php echo date('Y-m-d_H-i-s'); ?>.${fileExtension}`;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
$('#download_form')[0].reset();
}
},
error: function(xhr, status, error) {
console.log(xhr, status, error);
},
complete: function() {
// 요청 완료 후 버튼을 다시 활성화
$('#download_btn').prop('disabled', false).html('<i class="bi bi-file-earmark-spreadsheet me-2"></i> 다운로드');
}
});
});
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+857
View File
@@ -0,0 +1,857 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 통합 DB 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.html5.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.colVis.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore/js/dataTables.stateRestore.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.min.js"></script>
<script src="/static/node_modules/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<!-- bootstrap5 -->
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-keytable-bs5/css/keyTable.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore-bs5/js/stateRestore.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedcolumns-bs5/js/fixedColumns.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-keytable-bs5/js/keyTable.bootstrap5.min.js"></script>
<script src="/static/js/jquery.number.min.js"></script>
<script src="/static/node_modules/jszip/dist/jszip.min.js"></script>
<script src="/static/js/pdfmake/pdfmake.min.js"></script>
<script src="/static/js/pdfmake/vfs_fonts.js"></script>
<style>
.memo-all{text-align:right;}
.sub-contents-wrap table.dataTable th.dt-type-center,
.sub-contents-wrap table.dataTable td.dt-type-center {text-align:center;}
.table-responsive .dt-search {justify-content:flex-start;}
.btns-memo-style {top:5px;}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<?=$this->section('content');?>
<div class="sub-contents-wrap db-manage-contaniner">
<div class="title-area">
<h2 class="page-title">통합 DB 관리</h2>
<!-- <p class="title-disc">안하는 사람은 끝까지 할 수 없지만, 못하는 사람은 언젠가는 해 낼 수도 있다.</p> -->
</div>
<div class="search-wrap type-single">
<form name="search-form" autocomplete='off' class="search d-flex justify-content-center">
<div class="term term-small d-flex align-items-center">
<input type="hidden" name="sdate" id="sdate"><input type="hidden" name="edate" id="edate">
<label><input type="text" name="dates" id="dates" data="daterangepicker" autocomplete="off" aria-autocomplete="none"><i class="bi bi-calendar2-week"></i></label>
</div>
<div class="input">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="section reset-btn-wrap">
<div class="reset-btn-box">
<button type="button" class="reset-btn">필터 초기화</button>
</div>
</div>
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<div class="section client-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 분류</h3>
<div class="row" id="company-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.advertiser') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user', 'agency')){?>
<div class="section client-list mt20">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 광고주</h3>
<div class="row" id="advertiser-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user', 'agency')){?>
<div class="section client-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 매체</h3>
<div class="row" id="media-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.description') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user', 'agency')){?>
<div class="section client-list">
<h3 class="content-title toggle"><i class="bi bi-chevron-up"></i> 이벤트 구분</h3>
<div class="row" id="description-list"></div>
</div>
<?php }?>
<div>
<div class="search-wrap my-5 status_wrap">
<div class="statusCount detail d-flex minWd"></div>
</div>
<div class="table-responsive db-table-responsive">
<div class="btns-memo-style">
<span class="btns-title">메모 표시:</span>
<button type="button" class="btns-memo" value="modal" title="새창으로 표시"><i class="bi bi-window-stack"></i></button>
<button type="button" class="btns-memo" value="table" title="테이블에 표시"><i class="bi bi-table"></i></button>
<button type="button" class="btns-memo" value="all" title="한번에 표시"><i class="bi bi-eye"></i></button>
</div>
<table class="dataTable table table-default deviceTable" id="deviceTable">
<thead class="table-dark">
<tr>
<th class="first">#</th>
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>분류</th>
<?php }?></php>
<th>이벤트</th>
<?php if(auth()->user()->hasPermission('integrate.advertiser') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>광고주</th>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>매체</th>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.description') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>이벤트 구분</th>
<?php }?>
<th>이름</th>
<th>전화번호</th>
<th>나이</th>
<th>성별</th>
<th>기타</th>
<th>사이트</th>
<th>등록일</th>
<th>메모</th>
<th class="last">인정기준</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!-- 개별 메모 -->
<div class="modal fade" id="modal-integrate-memo" tabindex="-1" aria-labelledby="modal-integrate-memo-label" aria-hidden="true">
<div class="modal-dialog modal-sm sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="modal-integrate-memo-label"><i class="bi bi-file-text"></i> 개별 메모<span class="title"></span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="regi-form">
<fieldset>
<legend>메모 작성</legend>
<textarea></textarea>
<button type="button" class="btn-regi">작성</button>
</fieldset>
</form>
<ul class="memo-list m-2"></ul>
</div>
</div>
</div>
</div>
<!-- //개별 메모 -->
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
let active_status;
$('#sdate, #dates').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
$('#edate').val(moment().format('YYYY-MM-DD')); // 오늘 날짜를 입력 필드에 설정
jQuery.fn.dataTable.ext.type.search.select = function(data) {
// data가 select 요소인지 확인
if (typeof data === 'string' && data.indexOf('<select') !== -1) {
// jQuery를 사용하여 select 요소를 파싱하고 선택된 옵션의 텍스트를 가져옴
var select = $(data);
var selectedText = select.find('option:selected').text();
return selectedText ? selectedText : '';
}
return data;
};
var lead_status = {"1":"인정", "2":"중복", "3":"성별불량", "4":"나이불량", "5":"콜불량", "6":"번호불량", "7":"테스트", "8":"이름불량", "9":"지역불량", "10":"업체불량", "11":"미성년자", "12":"본인아님", "13":"쿠키중복", "99":"확인"};
let dataTable = $('.dataTable').DataTable({
"dom": '<fr<t>ip>', // DataTables의 DOM 구조 설정
"fixedHeader": {
"header" : true, // 헤더 고정
"footer" : true, // 푸터 고정
},
"autoWidth": true, // 자동 너비 조정 활성화
"processing" : true, // 처리 중 표시 활성화
"serverSide" : false, // 서버 사이드 처리 비활성화
"responsive": true, // 반응형 테이블 활성화
"searching": true, // 검색 기능 활성화
"order": [[0, "desc"]], // seq 항목을 역순 정렬
"ordering": true, // 정렬 기능 활성화
"orderMulti": false, // 다중 열 정렬 활성화
"orderCellsTop": false, // 열 헤더 클릭 시 정렬 활성화
"paging": true, // 페이징 비활성화
"pageLength": 25, // 페이지당 표시할 행 수
"info": false, // 정보 표시 비활성화
"scroller": false, // 스크롤러 비활성화
"scrollX": true, // 가로 스크롤 활성화
"stateSave": true, // 상태 저장 활성화
"deferRender": false, // 렌더링 지연 비활성화
"rowId": "seq",
"language": {"url": '/static/js/dataTables.i18n.json'}, //한글화 파일
"ajax": {
"url": "<?=base_url()?>/integrate/list", // AJAX URL 설정
"type": "POST", // HTTP 요청 방식 설정
"data": function(d) {
d.date = {
sdate: $('#sdate').val(), // 시작 날짜
edate: $('#edate').val() // 종료 날짜
};
},
"dataSrc": function(json) {
if (json && json.data) {
setFilter(json.data);
}
return json.data;
}
},
"columnDefs": [
<?php
$target = 10;
if(getenv('MY_SERVER_NAME') === 'resta'
&& auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')) {
++$target;
}
if(auth()->user()->hasPermission('integrate.advertiser')
|| auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){
++$target;
}
if(auth()->user()->hasPermission('integrate.media')
|| auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){
++$target;
}
if(auth()->user()->hasPermission('integrate.description')
|| auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){
++$target;
}
?>
{ type: "select", target: <?php echo $target;?> }, // 13은 status 컬럼의 인덱스입니다. 필요에 따라 조정하세요.
],
"columns": [
{ "data": "seq", "width": "4%", "className": "dt-type-center" },
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{ "data": null, "render": function(data, type, row) {
return row.company;
}
},
<?php }?>
{ "data": "info_seq","width": "4%", "className": "dt-type-center", "render": function(data, type, row) {
ico = '';
if(row.another_url == 1) ico = `<span class="another_url">🐢</span>`;
return data?ico+'<a href="'+row.event_url+'" target="event_pop">'+data+'</a>':'';
}
},
<?php if(auth()->user()->hasPermission('integrate.advertiser') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{ "data": "advertiser","width": "7%", "className": "dt-type-center"},
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{ "data": "media", "className": "dt-type-center" },
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.description') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{ "data": "description","width":"10%", "className": "dt-type-center","render": function(data) {
return `<div class="mw10">${data}</div>`
}
},
<?php }?>
{ "data": "name", "width": "5%", "className": "dt-type-center", "render": function(data) {
return '<span style="display:inline-block;width:50px;max-height:15px;overflow:hidden" title="'+$(`<span>${data}</span>`).text()+'">'+(data ? data : '')+'</span>';
}
},
{ "data": "dec_phone","width":"8%", "className": "dt-type-center","render": function(data) {
return `<div class="mw10">${data}</div>`
}
},
{ "data": "age", "width": "3%", "className": "dt-type-center" },
{ "data": "gender", "width": "3%" },
{ "data": "add","render": function(data) {
return `<div class="mw10">${data}</div>`
}
},
{ "data": "site","width":"6%", "className": "dt-type-center" },
{ "data": "reg_date","width":"6%", "className": "dt-type-center","render": function(data) {
return `<div class="mw10">${data}</div>`
}
},
{ "data": "memo_cnt", "className": "memo","width":"3%", "className": "dt-type-center", "render" : function(data) { // data-bs-toggle="modal"
var html = '<button class="btn_memo text-dark position-relative" data-bs-target="#modal-integrate-memo"><i class="bi bi-chat-square-text h4"></i>';
html += '<span class="position-absolute top--10 start-100 translate-middle badge rounded-pill bg-danger badge-'+data+'">'+data+'</span>';
html += '</button>';
return html;
}
},
{
"data": 'status',"width":"6%", "render": function (data, type, row) {
<?php if(auth()->user()->hasPermission('integrate.status') || auth()->user()->inGroup('superadmin', 'admin')) { ?>
return `
<select class="lead-status form-select form-select-sm data-del">
${Object.keys(lead_status).map(key => `
<option value="${key}" ${data == key ? "selected" : ""}>${lead_status[key]}</option>
`).join('')}
</select>
`;
<?php } else { ?>
return `${lead_status[data] || ''}`;
<?php } ?>
}
},
],
"rowCallback": function(row, data) {
},
"stateSaveParams": function(settings, data) {
// memoState를 저장 데이터에 추가
data.memoState = settings.oInit.memoState;
// folded 상태 저장
data.foldedStates = settings.oInit.foldedStates;
},
"stateLoadParams": function(settings, data) {
// 저장된 memoState를 불러와서 settings에 추가
if (data.memoState) {
settings.oInit.memoState = data.memoState;
}
if (data.foldedStates) {
settings.oInit.foldedStates = data.foldedStates;
}
},
"initComplete": function(settings, json) {
// foldedStates 복원
if (settings.oInit.foldedStates) {
$('.client-list > .content-title').each(function(index) {
if (settings.oInit.foldedStates[index]) {
$(this).addClass('folded');
} else {
$(this).removeClass('folded');
}
});
}
// memoState 복원
let savedMemoState = settings.oInit && settings.oInit.memoState ? settings.oInit.memoState : 'modal';
$(`.btns-memo[value="${savedMemoState}"]`).addClass('active');
if (savedMemoState === 'all') displayAllMemos();
updateFilterButtons.call(this);
},
"drawCallback": function(settings) {
updateFilterButtons.call(this);
updateStatusCount.call(this);
if ($('.btns-memo.active').val() === 'all') {
debouncedDisplayAllMemos();
}
//통합DB 확인 시 테스트일 경우 표기 추가 240724
$('#deviceTable td.dt-type-center span').each(function() {
if ($(this).text().includes('테스트') || $(this).text().includes('test')) {
$(this).closest('tr').addClass('on');
}
});
},
});
var windowWidth = $(window).width();
if (windowWidth >= 1024) { // 태블릿 이상의 너비에서만 fixedColumns 적용
new $.fn.dataTable.FixedColumns(dataTable, {
leftColumns: 5, // 왼쪽에서 고정할 컬럼 수
rightColumns: 0 // 오른쪽에서 고정할 컬럼 수
});
}
// Debounce 함수 정의
function debounce(func, wait) {
let timeout;
return function(...args) {
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(this, args), wait);
};
}
const debouncedDisplayAllMemos = debounce(displayAllMemos, 1000);
// 필터 버튼 업데이트 함수
function updateFilterButtons() {
var api = this.api(); // DataTables API 인스턴스를 가져옵니다.
var data = api.rows({ search: 'applied' }).data().toArray(); // 현재 페이지의 데이터를 배열로 변환합니다.
let uniqueValues = { advertiser: [], media: [], description: [] }; // 고유 값 저장을 위한 객체 초기화
var columnToListMap = {
'company': 'company-list',
'advertiser': 'advertiser-list',
'media': 'media-list',
'description': 'description-list'
};
// 필터링 상태에 따라 버튼에 active 클래스 적용
dataTable.columns().every(function() {
var column = this;
var search = column.search();
if (search) {
if(typeof search == 'function') return true;
var searchRegex = new RegExp(search.replace(/\\/g, ''));
var expectedListId = columnToListMap[column.dataSrc()];
if (expectedListId) {
$(`#${expectedListId} .filter_btn`).each(function() {
var btnValue = $.trim($(this).text());
if (searchRegex.test(btnValue)) {
$(this).addClass('active');
}
});
}
}
});
// 각 행의 데이터를 순회하면서 고유 값 배열에 추가합니다.
data.forEach(row => {
['advertiser', 'media', 'description'].forEach(key => {
if (!uniqueValues[key].includes(row[key])) { // 배열에 정확히 일치하는 값이 없으면 추가
uniqueValues[key].push(row[key]);
}
});
});
// 데이터 수량 계산 (status가 '인정'인 것만 카운트)
let countMap = { advertiser: {}, media: {}, description: {} };
api.rows({ search: 'applied' }).data().each(function(row) {
['advertiser', 'media', 'description'].forEach(key => {
let value = row[key];
if (row['status'] == '1' && typeof value === 'string') {
if(value == "") value = 'empty';
countMap[key][value] = (countMap[key][value] || 0) + 1;
}
});
});
// 수량 업데이트
Object.keys(countMap).forEach(key => {
let $list = $(`#${key}-list`);
if ($list.length) { // 요소가 존재하는지 확인
$list.find('.filter_btn').each(function() {
var btnValue = $(this).val();
if(btnValue == "") btnValue = 'empty';
var count = countMap[key][btnValue] || "";
$(this).siblings('.progress').find('.txt').text(count);
});
}
});
// 활성화된 필터 버튼이 없는 경우, 모든 필터 버튼의 'on' 클래스를 제거하고 함수를 종료합니다.
if (!$('.filter_btn.active').length) {
$('.filter_btn').removeClass('on');
return;
}
// 각 필터 유형에 대해 'on' 클래스를 토글합니다.
Object.keys(uniqueValues).forEach(key => {
let $list = $(`#${key}-list`);
if ($list.length) { // 요소가 존재하는지 확인
$list.find('.filter_btn').not('.active').each(function() {
var btnText = $(this).text().trim();
var isExactMatch = uniqueValues[key].some(function(value) { // 완전 일치 여부를 확인합니다.
return value === btnText;
});
$(this).toggleClass('on', isExactMatch); // 'on' 클래스를 토글합니다.
});
}
});
}
// 필터 버튼 세팅 함수
function setFilter(data) {
const unique = (prop) => [...new Set(data.map(item => item[prop]))];
const filters = {
media: unique('media'),
advertiser: unique('advertiser'),
description: unique('description'),
company: unique('company')
};
Object.keys(filters).forEach(type => {
let $row = $(`#${type}-list`);
let html = filters[type].map(v => `
<div class="col">
<div class="inner">
<button type="button" value="${v}" data-btn="${type}" class="${type}_btn filter_btn">
<span class="account_name">${v}</span>
</button>
<div class="progress">
<div class="txt">0</div>
</div>
</div>
</div>
`).join('');
$row.html('').append(html);
// 정렬
let buttons = $row.find('.filter_btn').toArray();
buttons.sort((a, b) => $(a).find('.account_name').text().localeCompare($(b).find('.account_name').text(), 'en', { sensitivity: 'base' }));
buttons.forEach(button => $row.append(button.parentNode.parentNode));
});
}
// statusCount 업데이트 함수
function updateStatusCount() {
var api = this.api(); // DataTables API 인스턴스를 가져옵니다.
let statusCountMap = {};
// active_status 값으로 .statusCount dl dt 텍스트 찾아서 클래스 추가
if(typeof active_status != 'undefined') {
$('.statusCount dl dt').each(function() {
if ($(this).text() === lead_status[active_status]) {
$(this).closest('dl').addClass('active');
}
});
return;
}
api.rows({ search: 'applied' }).data().each(function(row) {
let status = row['status'];
if (status) {
statusCountMap[status] = (statusCountMap[status] || 0) + 1;
}
});
let statusHtml = Object.keys(lead_status).map(status => `
<dl class="col" data-status="${status}">
<dt>${lead_status[status]}</dt>
<dd>${statusCountMap[status] || 0}</dd>
</dl>
`).join('');
$('.statusCount').html(statusHtml);
// dl 클릭 이벤트 바인딩
$('.statusCount dl').on('click', function() {
var statusColumnIndex = getColumnIndexByHeader('status');
if ($(this).hasClass('active')) {
$(this).removeClass('active');
active_status = undefined;
dataTable.column(statusColumnIndex).search('').draw();
} else {
$('.statusCount dl').removeClass('active');
$(this).addClass('active');
let status = $(this).data('status');
active_status = status;
dataTable.column(statusColumnIndex).search((d) => {return d == lead_status[status]}).draw();
}
});
}
// 컬럼 인덱스 가져오기
function getColumnIndexByHeader(dataName) {
var index = -1;
dataTable.settings().init().columns.forEach(function(column, i) {
if (column.data === dataName) {
index = i;
return false; // 반복문 종료
}
});
return index;
}
// 상태 변경 이벤트
$(document).on('change', '.lead-status', function() {
var $select = $(this);
var $row = $select.closest('tr');
var seq = $row.attr('id');
var oldStatus = dataTable.row($row).data().status;
var newStatus = $select.val();
$.ajax({
url: '<?=base_url()?>/integrate/setstatus',
type: 'POST',
data: {
seq: seq,
oldstatus: oldStatus,
status: newStatus
},
success: function(response) {
// 성공 시 처리할 내용
console.log('Status updated successfully');
// 메모 저장
var memo = `인정기준 변경(${lead_status[oldStatus]} > ${lead_status[newStatus]})`;
saveMemo(memo, seq, $row);
},
error: function(xhr, status, error) {
// 에러 시 처리할 내용
console.error('Error updating status:', error);
}
});
});
// 메모 가져오기
function fetchMemo(seq, callback) {
$.ajax({
url: '<?=base_url()?>/integrate/getmemo',
type: 'GET',
data: { seq: seq },
success: function(response) {
callback(response);
},
error: function(xhr, status, error) {
console.error('Error fetching memo:', error);
}
});
}
// 메모 표시
function displayMemo(memoList, displayType, $row = null) {
var memoContent = '';
if (Array.isArray(memoList)) {
memoContent = memoList.map(function(memo) {
return `
<div class="memo-item">
<div class="memo-body">
<p>${memo.memo}</p>
</div>
<div class="memo-header">
<strong>${memo.username}</strong>
<span class="memo-date">${memo.reg_date}</span>
</div>
</div>
`;
}).join('');
}
if (displayType === 'modal') {
var $memoListContainer = $('#modal-integrate-memo .memo-list');
$memoListContainer.empty().append(memoContent);
$('#modal-integrate-memo').data('leads-seq', $row.attr('id')); // leads_seq 저장
// 이름 컬럼의 인덱스를 동적으로 찾기
var nameColumnIndex = getColumnIndexByHeader('name');
if (nameColumnIndex !== -1) {
var name = $row.find('td').eq(nameColumnIndex).text(); // 이름이 있는 열의 인덱스를 사용하여 이름을 가져옴
$('#modal-integrate-memo-label').html(`<i class="bi bi-file-text"></i> 개별 메모 - ${name}`);
} else {
$('#modal-integrate-memo-label').html(`<i class="bi bi-file-text"></i> 개별 메모`);
}
$('#modal-integrate-memo').modal('show');
} else if ((displayType === 'table' || displayType === 'all') && $row) {
var memoForm = `
<form class="regi-form">
<fieldset>
<legend>메모 작성</legend>
<textarea></textarea>
<button type="button" class="btn-regi">작성</button>
</fieldset>
</form>
`;
if ($row.next().hasClass('memo-row')) {
$row.next().remove();
} else {
$row.after(`<tr class="memo-row"><td class="pl10 pr10" colspan="15">${memoForm}${memoContent}</td></tr>`);
}
}
}
// 모든 메모 표시
function displayAllMemos() {
$('.btn_memo').each(function() {
var $row = $(this).closest('tr');
var seq = $row.attr('id');
var badgeCount = $(this).find('.badge').text();
if (badgeCount > 0) {
fetchMemo(seq, function(memoList) {
displayMemo(memoList, 'table', $row);
});
}
});
}
// 메모 저장 함수
function saveMemo(memo, leads_seq, $form, $row) {
$.ajax({
url: '<?=base_url()?>/integrate/addmemo',
type: 'POST',
data: {
memo: memo,
leads_seq: leads_seq
},
success: function(response) {
// 메모 추가 후 폼 초기화
$form.find('textarea').val('');
// 필요 시 메모 목록 갱신
fetchMemo(leads_seq, function(memoList) {
var memoState = $('.btns-memo.active').val();
displayMemo(memoList, memoState, $row);
updateMemoBadge($row, memoList.length);
});
},
error: function(xhr, status, error) {
// 에러 시 처리할 내용
console.error('Error adding memo:', error);
}
});
}
// 메모 배지 업데이트
function updateMemoBadge($row, count) {
var $btnMemo = $row.find('.btn_memo');
$btnMemo.find('.badge').text(count);
}
// 모든 메모 업데이트
function updateAllMemos() {
$('.btn_memo').each(function() {
var $row = $(this).closest('tr');
var seq = $row.attr('id');
fetchMemo(seq, function(memoList) {
updateMemoBadge($row, memoList.length);
});
});
}
$('#dates').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
// singleDatePicker: true, // 단일 날짜 선택 활성화
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
maxSpan: {
days: 30
},
ranges: {
오늘: [moment(), moment()],
어제: [moment().subtract(1, "days"), moment().subtract(1, "days")],
최근7일: [moment().subtract(7, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
최근14일: [moment().subtract(14, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
이번주: [moment().day(1), moment()],
지난주: [moment().add(-1, "week").startOf("week").day(1), moment().add(-1, "week").startOf("week").add(7, "day")],
이번달: [moment().startOf("month"), moment().endOf("month")],
지난달: [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")],
한달전: [moment().subtract(1, "month"), moment()],
},
}, function(start, end, label) {
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$sdateInput = $('#sdate');
$edateInput = $('#edate');
$sdateInput.val(startDate);
$edateInput.val(endDate);
var dates = `${startDate} ~ ${endDate}`;
if(startDate == endDate) dates = startDate;
$('#dates').val(dates);
});
/*
* click Event List
*/
// 필터 초기화
$(document).on('click', '.reset-btn', function() {
$('.filter_btn').removeClass('active on');
dataTable.columns().search('').draw();
// DataTable 상태 초기화
dataTable.state.clear();
});
// content-title 클릭 시 folded 상태 토글 및 저장
$(document).on('click', '.client-list > .content-title', function() {
// DataTables 상태 저장
let settings = dataTable.settings();
settings[0].oInit.foldedStates = [];
$('.client-list > .content-title').each(function() {
settings[0].oInit.foldedStates.push($(this).hasClass('folded'));
});
// DataTable 상태 저장
dataTable.state.save();
});
// 메모 상태 저장 및 초기화
$(document).on('click', '.btns-memo', function() {
$('.btns-memo').removeClass('active'); // 모든 버튼에서 active 클래스 제거
$(this).addClass('active'); // 클릭된 버튼에 active 클래스 추가
// DataTables 상태 저장
let memoState = $(this).val();
let settings = dataTable.settings();
settings[0].oInit.memoState = memoState; // DataTables 상태에 memoState 추가
dataTable.state.save(); // 상태 저장
// 모달 및 테이블 초기화
$('#modal-integrate-memo .memo-list').empty();
$('.memo-row').remove();
// 메모 목록 갱신
if (memoState === 'all') {
displayAllMemos();
}
});
// 필터 버튼 클릭 시 해당 컬럼 필터링
$(document).on('click', '.filter_btn', function() {
$(this).toggleClass('active'); // 버튼 활성화/비활성화 토글
// 모든 열의 검색을 초기화
dataTable.columns().search('');
// 각 컬럼별로 활성화된 버튼의 텍스트를 배열로 수집하고 정규 표현식으로 조합
dataTable.columns().every(function() {
var column = this;
var filterType = column.dataSrc(); // 컬럼 헤더를 기반으로 필터 타입 결정
var activeFilters = $(`.filter_btn.active[data-btn="${filterType}"]`).map(function() {
return $.fn.dataTable.util.escapeRegex($(this).val());
}).get();
if (activeFilters.length) {
var regex = `^(${activeFilters.join('|')})$`; // '값1|값2|값3' 형태로 조합
column.search(regex, true, false); // 정규 표현식 검색 활성화
} else {
column.search(''); // 필터가 없는 경우 검색 초기화
}
});
dataTable.draw(); // 필터링 후 테이블 업데이트
});
// 메모 버튼 클릭 이벤트
$(document).on('click', '.btn_memo', function() {
var $row = $(this).closest('tr');
var seq = $row.attr('id');
var memoState = $('.btns-memo.active').val();
fetchMemo(seq, function(memoList) {
displayMemo(memoList, memoState, $row);
});
});
// regi-form 및 모달에서 메모 전송 이벤트 처리
$(document).on('click', '.btn-regi', function() {
var $form = $(this).closest('form');
var memo = $form.find('textarea').val();
var $row, leads_seq;
if ($form.closest('#modal-integrate-memo').length) {
// 모달에서 전송
leads_seq = $('#modal-integrate-memo').data('leads-seq');
$row = $(`[id="${leads_seq}"]`);
} else {
// 테이블에서 전송
$row = $form.closest('tr').prev();
leads_seq = $row.attr('id');
}
saveMemo(memo, leads_seq, $form, $row);
});
$('#search_btn').on('click', function(e) {
e.preventDefault(); // 폼 제출 방지
dataTable.ajax.reload(); // DataTables의 AJAX 요청을 다시 실행
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+846
View File
@@ -0,0 +1,846 @@
<!-- 통합 DB 관리 - 이전버전 사용하지 않음 -->
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 통합 DB 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.html5.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/buttons.colVis.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore/js/dataTables.stateRestore.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.min.js"></script>
<script src="/static/node_modules/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<!-- bootstrap5 -->
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-fixedcolumns-bs5/css/fixedColumns.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-keytable-bs5/css/keyTable.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-staterestore-bs5/js/stateRestore.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedheader-bs5/js/fixedHeader.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-fixedcolumns-bs5/js/fixedColumns.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-keytable-bs5/js/keyTable.bootstrap5.min.js"></script>
<script src="/static/js/jquery.number.min.js"></script>
<script src="/static/node_modules/jszip/dist/jszip.min.js"></script>
<script src="/static/js/pdfmake/pdfmake.min.js"></script>
<script src="/static/js/pdfmake/vfs_fonts.js"></script>
<style>
#advertiserBtn{display: none;}
.memo-all{text-align:right;}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<?=$this->section('content');?>
<!-- 현재 사용하지 않는 파일 2024.07.02 -->
<!-- DBintegrationDB.php 로 변경 -->
<div class="sub-contents-wrap db-manage-contaniner">
<div class="title-area">
<h2 class="page-title">통합 DB 관리</h2>
<!-- <p class="title-disc">안하는 사람은 끝까지 할 수 없지만, 못하는 사람은 언젠가는 해 낼 수도 있다.</p> -->
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="term term-small d-flex align-items-center">
<input type="hidden" name="sdate" id="sdate"><input type="hidden" name="edate" id="edate">
<label><input type="text" name="dates" id="dates" data="daterangepicker" autocomplete="off" aria-autocomplete="none"><i class="bi bi-calendar2-week"></i></label>
</div>
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="section reset-btn-wrap">
<div class="reset-btn-box">
<button type="button" class="reset-btn">필터 초기화</button>
</div>
</div>
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<div class="section client-list">
<h3 class="content-title toggle">
<i class="bi bi-chevron-up"></i> 분류
</h3>
<div class="row" id="company-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.advertiser')){?>
<div class="section client-list custom-margin-box-1" <?php if(!auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){echo 'id="advertiserBtn"'; }?>>
<h3 class="content-title toggle">
<i class="bi bi-chevron-up"></i> 광고주
</h3>
<div class="row" id="advertiser-list"></div>
</div>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media')){?>
<div class="section client-list">
<h3 class="content-title toggle">
<i class="bi bi-chevron-up"></i> 매체
</h3>
<div class="row" id="media-list"></div>
</div>
<?php }?>
<div class="section client-list">
<h3 class="content-title toggle">
<i class="bi bi-chevron-up"></i> 이벤트 구분
</h3>
<div class="row" id="event-list"></div>
</div>
<div>
<div class="search-wrap my-5 status_wrap">
<div class="statusCount detail d-flex minWd"></div>
</div>
<div class="table-responsive">
<div class="btns-memo-style">
<span class="btns-title">메모 표시:</span>
<button type="button" class="btns-memo" value="modal" title="새창으로 표시"><i class="bi bi-window-stack"></i></button>
<button type="button" class="btns-memo" value="table" title="테이블에 표시"><i class="bi bi-table"></i></button>
<button type="button" class="btns-memo" value="all" title="한번에 표시"><i class="bi bi-eye"></i></button>
</div>
<table class="dataTable table table-default" id="deviceTable">
<thead class="table-dark">
<tr>
<th class="first">#</th>
<th>SEQ</th>
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>분류</th>
<?php }?></php>
<th>이벤트</th>
<?php if(auth()->user()->hasPermission('integrate.advertiser') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>광고주</th>
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
<th>매체</th>
<?php }?>
<th>이벤트 구분</th>
<th>이름</th>
<th>전화번호</th>
<th>나이</th>
<th>성별</th>
<th>기타</th>
<th>사이트</th>
<th>등록일</th>
<th>메모</th>
<th class="last">인정기준</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!-- 개별 메모 -->
<div class="modal fade" id="modal-integrate-memo" tabindex="-1" aria-labelledby="modal-integrate-memo-label" aria-hidden="true">
<div class="modal-dialog modal-sm sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="modal-integrate-memo-label"><i class="bi bi-file-text"></i> 개별 메모<span class="title"></span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="regi-form">
<fieldset>
<legend>메모 작성</legend>
<textarea></textarea>
<button type="button" class="btn-regi">작성</button>
</fieldset>
</form>
<ul class="memo-list m-2"></ul>
</div>
</div>
</div>
</div>
<!-- //개별 메모 -->
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
var lead_status = {"1":"인정", "2":"중복", "3":"성별불량", "4":"나이불량", "5":"콜불량", "6":"번호불량", "7":"테스트", "8":"이름불량", "9":"지역불량", "10":"업체불량", "11":"미성년자", "12":"본인아님", "13":"쿠키중복", "99":"확인"};
var exportCommon = {
'header': true,
'footer': false,
'exportOptions': { //{'columns': 'th:not(:last-child)'},
'modifier': {'page':'all'},
}
};
var today = moment().format('YYYY-MM-DD');
$('#sdate, #edate').val(today);
setDate();
let dataTable, tableParam = {};
let isPaginationClicked = false;
getList();
function setTableParam() {
tableParam.searchData = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
'stx': $('#stx').val(),
'company' : $('#company-list button.active').map(function(){return $(this).val();}).get().join('|'),
'advertiser' : $('#advertiser-list button.active').map(function(){return $(this).val();}).get().join('|'),
'media' : $('#media-list button.active').map(function(){return $(this).val();}).get().join('|'),
'event' : $('#event-list button.active').map(function(){return $(this).val();}).get().join('|'),
'status' : $('.statusCount dl.active').map(function(){return $('dt',this).text();}).get().join('|')
};
}
function setSearchData() { //state 에 저장된 내역으로 필터 active 세팅
var data = tableParam;
if(typeof data.searchData == 'undefined') return;
$('#company-list button, #advertiser-list button, #media-list button, #event-list button, .statusCount dl').removeClass('active');
if(typeof data.searchData.company != 'undefined') {
data.searchData.company.split('|').map(function(txt){ $(`#company-list button[value="${txt}"]`).addClass('active'); });
}
if(typeof data.searchData.advertiser != 'undefined') {
data.searchData.advertiser.split('|').map(function(txt){ $(`#advertiser-list button[value="${txt}"]`).addClass('active'); });
}
if(typeof data.searchData.media != 'undefined') {
data.searchData.media.split('|').map(function(txt){ $(`#media-list button[value="${txt}"]`).addClass('active'); });
}
if(typeof data.searchData.event != 'undefined') {
data.searchData.event.split('|').map(function(txt){ $(`#event-list button[value="${txt}"]`).addClass('active'); });
}
if(typeof data.searchData.status != 'undefined') {
data.searchData.status.split('|').map(function(txt){
$('.statusCount dt:contains("'+txt+'")').filter(function() { return $(this).text() === txt;}).parent().addClass('active');
});
}
$('#sdate').val(data.searchData.sdate);
$('#edate').val(data.searchData.edate);
$('#dates').data('daterangepicker').setStartDate(data.searchData.sdate);
$('#dates').data('daterangepicker').setEndDate(data.searchData.edate);
var dates = `${data.searchData.sdate} ~ ${data.searchData.edate}`;
if(data.searchData.sdate == data.searchData.edate) dates = data.searchData.sdate;
$('#dates').val(dates);
$('#stx').val(data.searchData.stx);
debug('searchData 세팅')
if(typeof dataTable != 'undefined') dataTable.state.save();
}
function getList(data = []) { //리스트 세팅
$.fn.DataTable.ext.pager.numbers_length = 10;
dataTable = $('#deviceTable').DataTable({
"dom": '<Bfri<t>p>',
"fixedHeader": true,
"autoWidth": true,
"order": [[12,'desc']],
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": true,
"scrollX": true,
"scrollCollapse": true,
"stateSave": true,
"deferRender": true,
"rowId": "seq",
"lengthMenu": [[ 25, 10, 50, -1 ],[ '25개', '10개', '50개', '전체' ]],
"language": {"url": '/static/js/dataTables.i18n.json'}, //한글화 파일
initComplete : function(settings ,json) {
let advTable = document.getElementById('deviceTable');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
},
"stateSaveParams": function (settings, data) { //LocalStorage 저장 시
debug('state 저장')
data.memoView = $('.btns-memo.active').val();
data.searchData = tableParam.searchData;
},
"stateLoadParams": function (settings, data) { //LocalStorage 호출 시
debug('state 로드')
$(`.btns-memo[value="${data.memoView}"]`).addClass('active');
if(data.memoView == 'table' || data.memoView == 'all') {
$('.memo-all').show();
} else {
$('.memo-all').hide();
}
tableParam = data;
},
"buttons": [ //Set Button
{
'extend': 'collection',
'text': "Menu",
'className': 'custom-btn-collection',
'fade': true,
'buttons': [
'pageLength',
'colvis',
{
'extend':'savedStates',
'buttons': [
'createState',
'removeAllStates'
]
},
'<div class="export">내보내기</div>',
$.extend( true, {}, exportCommon, {
extend: 'copyHtml5'
} ),
$.extend( true, {}, exportCommon, {
extend: 'excelHtml5'
} ),
$.extend( true, {}, exportCommon, {
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'LEGAL'
} ),
]
},
],
"columnDefs": [
{ targets: [0], orderable: false},
{ targets: [1], visible: false},
{ targets: '_all', visible: true },
{ targets: [6], className: ''}
],
"columns": [
{ "data": null , "width": "3%"},
{ "data": "seq" , "width": "5%"},
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{
"data": null ,
"width": "35px",
"render": function(data, type, row) {
let company = '';
if(row.company == '케어랩스'){
company = '케어랩스';
}
if(row.company == '테크랩스'){
company = '테크랩스';
}
return company;
}
},
<?php }?>
{ "data": "info_seq", "width": "45px",
"render": function(data) {
return data?'<a href="<?php echo env('app.eventURL')?>'+data+'" target="event_pop">'+data+'</a>':'';
}
},
<?php if(auth()->user()->hasPermission('integrate.advertiser') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{ "data": "advertiser","width": "100px",
"render": function(data) {
return '<span title="'+$(`<span>${data}</span>`).text()+'">'+(data ? data : '')+'</span>';
}
},
<?php }?>
<?php if(auth()->user()->hasPermission('integrate.media') || auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
{ "data": "media" , "width" : "5%",
"render": function(data) {
return '<span title="'+$(`<span>${data}</span>`).text()+'">'+(data ? data : '')+'</span>';
}
},
<?php }?>
{ "data": "tab_name" },
{ "data": "name", "width": "50px",
"render": function(data) {
return '<span style="display:inline-block;width:50px;max-height:15px;overflow:hidden" title="'+$(`<span>${data}</span>`).text()+'">'+(data ? data : '')+'</span>';
}
},
{ "data": "dec_phone", "width": "90px" },
{ "data": "age", "width": "2%" },
{ "data": "gender", "width": "2%" },
{ "data": "add" },
{ "data": "site", "width": "5%" },
{ "data": "reg_date", "width": "70px" },
{ "data": "memo_cnt", "width": "2%", "className": "memo",
"render" : function(data) { // data-bs-toggle="modal"
var html = '<button class="btn_memo text-dark position-relative" data-bs-target="#modal-integrate-memo"><i class="bi bi-chat-square-text h4"></i>';
html += '<span class="position-absolute top--10 start-100 translate-middle badge rounded-pill bg-danger badge-'+data+'">'+data+'</span>';
html += '</button>';
return html;
}
},
{
"data": 'status', "width": "60px",
"render": function (data, type, row) {
<?php if(auth()->user()->hasPermission('integrate.status')){?>
return '<select class="lead-status form-select form-select-sm data-del"><option value="1" '+(data=="1"?" selected":"")+'>인정</option><option value="2" '+(data=="2"?" selected":"")+'>중복</option><option value="3" '+(data=="3"?" selected":"")+'>성별불량</option><option value="4" '+(data=="4"?" selected":"")+'>나이불량</option><option value="6" '+(data=="6"?" selected":"")+'>번호불량</option><option value="7" '+(data=="7"?" selected":"")+'>테스트</option><option value="5" '+(data=="5"?" selected":"")+'>콜불량</option><option value="8" '+(data=="8"?" selected":"")+'>이름불량</option><option value="9" '+(data=="9"?" selected":"")+'>지역불량</option><option value="10" '+(data=="10"?" selected":"")+'>업체불량</option><option value="11" '+(data=="11"?" selected":"")+'>미성년자</option><option value="12" '+(data=="12"?" selected":"")+'>본인아님</option><option value="13" '+(data=="13"?" selected":"")+'>쿠키중복</option><option value="99" '+(data=="99"?" selected":"")+'>확인</option></select>';
<?php }else{?>
return '<span>' + (data == "1" ? '인정' : (data == "2" ? '중복' : (data == "3" ? '성별불량' : (data == "4" ? '나이불량' : (data == "5" ? '콜불량' : (data == "6" ? '번호불량' : (data == "7" ? '테스트' : (data == "8" ? '이름불량' : (data == "9" ? '지역불량' : (data == "10" ? '업체불량' : (data == "11" ? '미성년자' : (data == "12" ? '본인아님' : (data == "13" ? '쿠키중복' : (data == "99" ? '확인' : '')))))))))))))) + '</span>';
<?php }?>
}
},
],
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
$(`td.memo .btn_memo .badge`, row).html(data.memo_cnt);
if($(`.btns-memo[value="all"]`).hasClass('active')) {
setMemo($('td.memo', row)[0]);
}
if(data.status != "1"){
$(row).addClass('abnormal');
}
},
"infoCallback": function(settings, start, end, max, total, pre){ //페이지현황 세팅
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
"ajax": { //ServerSide Load
"url": "<?=base_url()?>/integrate/list",
"data": function(d) {
if(typeof tableParam != 'undefined')
d.searchData = tableParam.searchData;
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
}
}).on('preXhr.dt', function (e, settings, data) {
if (!isPaginationClicked) {
$('.client-list .row').filter(function(i, el) {
if(!$(el).find('.zenith-loading').is(':visible')) $(el).prepend('<div class="zenith-loading"/>')
});
}
}).on('xhr.dt', function( e, settings, data, xhr ) { //ServerSide On Load Event
/* setButtons(data.buttons);
setLeadCount(data.buttons)
setStatusCount(data.buttons.status); */
//setSearchData();
}).on('draw', function() {
debug('draw');
if (!isPaginationClicked) {
getData('buttons');
}
let advTable = document.getElementById('deviceTable');
fadeIn(advTable, 1000); // 1초 동안 페이드 인
isPaginationClicked = false;
}).on('page', function() {
isPaginationClicked = true;
});
}
//테이블 페이드인 효과
function fadeIn(tableName, duration) {
let opacity = 0;
tableName.style.opacity = 0;
tableName.style.display = "table";
const jsInterval = 50;
const increment = jsInterval / duration;
const jsFade = setInterval(() => {
opacity += increment;
tableName.style.opacity = opacity;
if(opacity >= 1) {
clearInterval(jsFade)
}
}, jsInterval);
}
function getData(type) {
$.ajax({
type: "GET",
url: `<?=base_url()?>integrate/${type}`,
data: {
"searchData":tableParam.searchData,
},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setButtons(data);
setLeadCount(data)
setStatusCount(data.status);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
$('.btns-memo-style>button').bind('click', function() { //메모 표시타입
$('.btns-memo-style button').removeClass('active');
$(this).addClass('active');
if(this.value == 'table' || this.value == 'all') {
$('.memo-all').show();
} else {
$('.memo-all').hide();
}
debug('메모표시방식 설정');
dataTable.state.save();
});
$('#deviceTable').on('click', 'td.memo', function(e) { //메모셀 클릭 시
setMemo(this);
});
$(document).on('click', '.regi-form button', function(e) { //메모 작성
var type = $('.btns-memo.active').val();
if(!$.trim($('textarea', $(this).parents('.regi-form')).val())) {
alert('메모 내용을 입력해주세요.');
return false;
}
var data = {
'memo': $('textarea', $(this).parents('.regi-form')).val()
};
if(type == 'table') {
data['leads_seq'] = $(this).parents('tr').prev('tr').attr('id');
} else {
data['leads_seq'] = $('#modal-integrate-memo').attr('data-seq');
}
registerMemo(data);
});
$('#modal-integrate-memo')
.on('show.bs.modal', function(e) { //create memo data
var seq = $(this).attr('data-seq');
var $row = dataTable.row($(`#${seq}`));
var name = $row.data().name;
$('h1 .title', this).html(name);
$('.memo-list', this).html('');
getMemoList(seq);
})
.on('hidden.bs.modal', function(e) { //modal Reset
$(this).removeAttr('data-seq');
$('.memo-list, h1 .title', '#modal-integrate-memo').html('');
$('#modal-integrate-memo form')[0].reset();
});
function setMemo(t) {
var type = $('.btns-memo.active').val();
var tr = $(t).closest('tr');
var row = dataTable.row(tr);
var seq = row.data().seq;
if(type == 'table' || type == 'all') {
if (row.child.isShown()) { // 메모가 열려있을 때
row.child.hide();
} else { // 메모가 닫혀있을 때
var html = '<form class="regi-form"><fieldset><legend>메모 작성</legend><textarea></textarea><button type="button" class="btn-regi">작성</button></fieldset></form>';
html += '<ul class="memo-list">';
row.child(html).show();
getMemoList(seq, t);
}
} else {
dataTable.rows().every(function(){ //모든 메모 닫음
if(this.child.isShown()) this.child.hide();
});
$('#modal-integrate-memo').attr('data-seq', seq).modal('show'); //modal 호출
}
}
function getMemoList(seq, obj) { //메모 수신
if($(`.badge`, obj).text() < 1) return;
$.ajax({
type: "get",
url: "<?=base_url()?>integrate/getmemo",
data: {'seq': seq},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setMemoList(data);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function registerMemo(data) { //메모 등록
$.ajax({
type: "post",
url: "<?=base_url()?>integrate/addmemo",
data: data,
dataType: "json",
success: function(response){
if(response.result == true) {
setMemoList(response.data);
var cnt = parseInt($(`tr[id="${response.data[0].leads_seq}"] td .btn_memo .badge`).text()) || 0;
$(`tr[id="${response.data[0].leads_seq}"] td .btn_memo .badge`).removeClass('badge-0').text(++cnt); //뱃지 변경
}
$('.regi-form textarea').val('');
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
function setMemoList(data) { //메모 리스트 생성
if(typeof data[0] == "undefined") return;
var seq = data[0].leads_seq;
var html = '';
$.each(data, function(i,row) {
html += ' <li class="d-flex justify-content-between align-items-start">';
html += ' <div class="detail d-flex align-items-start">';
html += ' <p class="ms-1">'+ row.memo +'</p>';
html += ' </div>';
html += ' <div class="info">';
html += ' <i>'+ row.username +'</i>';
html += ' <span>'+ row.reg_date +'</span>';
html += ' </div>';
html += ' </li>';
});
var wrap;
var type = $('.btns-memo.active').val();
if(type == 'table' || type == 'all') {
wrap = $(`#${seq}`).next('tr').find('.memo-list');
} else {
wrap = $(`[data-seq="${seq}"] .memo-list`);
}
wrap.prepend(html);
}
function setLeadCount(data) { //Filter Count 표시
$('.client-list').find('.zenith-loading').fadeOut(function(){$(this).remove();});
$('.client-list button').removeClass('on');
$('.client-list .col .txt').empty();
$.each(data, function(type, row) {
if(type == 'status') return true;
var $container = $('#'+type+'-list');
$.each(row, function(idx, v) {
var cnt_txt = v.total;
if(v.count != v.total) cnt_txt = v.count + "/" + v.total;
button = $(`#${type}-list .col[data-name="${v.label}"] button`);
button.siblings('.progress').children('.txt').text(`${cnt_txt}`);
<?php if(getenv('MY_SERVER_NAME') === 'resta' && auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
if(typeof tableParam.searchData == 'undefined' || (tableParam.searchData.company == "" && tableParam.searchData.advertiser == "" && tableParam.searchData.media == "" && tableParam.searchData.event == "")) return true;
<?php }else{?>
if(typeof tableParam.searchData == 'undefined' || (tableParam.searchData.advertiser == "" && tableParam.searchData.media == "" && tableParam.searchData.event == "")) return true;
<?php }?>
if(v.count) button.addClass('on');
});
});
setSearchData();
}
function setStatusCount(data){ //상태 Count 표시
$('.client-list').find('.zenith-loading').fadeOut(function(){$(this).remove();});
$('.statusCount').empty();
$.each(data, function(key, value) {
// $('.statusCount').append('<dl class="col"><dt>' + key + '</dt><dd>' + value + '</dd></dl>');
const setDataBtn = $('<dl class="col"><dt>' + key + '</dt><dd>' + value + '</dd></dl>'); // 숨긴 상태로 생성
$('.statusCount').append(setDataBtn); // DOM에 추가
setDataBtn.hide().fadeIn(1000); // 페이드 인 효과
});
setSearchData();
}
function fontAutoResize() { //.client-list button 항목 가변폰트 적용
$('.client-list .col').each(function(i, el) {
var $el = $(el);
var button = $('button', el);
button.css({
'white-space': 'nowrap',
'overflow-x': 'auto',
'font-size': '85%'
});
var i = 0;
var btn_width = Math.round(button.width());
// debug(button.val(), btn_scr_w, btn_width);
while((button[0].scrollWidth+10) / 2 >= btn_width) {
var size = parseFloat(button.css('font-size')) / 16 * 100;
button.css({'font-size': --size+'%'});
// debug(button.css('font-size'), size)
if(button.css('font-size') < 8 || i > 60 || size < 70) break;
i++;
}
button.css({
'white-space': 'normal',
'overflow-x': 'auto'
});
});
}
$(window).resize(function() {
fontAutoResize();
});
function setButtons(data) { //광고주,매체,이벤트명 버튼 세팅
$('.client-list').find('.zenith-loading').fadeOut(function(){
$(this).remove();
});
$.each(data, function(type, row) {
if(type == 'status') return true;
<?php if(!auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user')){?>
if(type == 'advertiser'){
if(data.advertiser.length > 1){
$('#advertiserBtn').show();
}else{
$('#advertiserBtn').hide();
return true;
}
}
<?php }?>
var html = "";
$.each(row, function(idx, v) {
html += '<div class="col" data-name="'+v.label+'"><div class="inner">';
html += '<button type="button" value="'+v.label+'">' + v.label + '</button>';
html += '<div class="progress">';
html += '<div class="txt">'+v.count+'/'+v.total+'</div>';
html += '</div>';
html += '</div></div>';
});
const setButtonsList = $('#'+type+'-list').html(html);
setButtonsList.hide().fadeIn(1000);
});
fontAutoResize();
setSearchData();
}
//날짜
function setDate(){
//$('#sdate, #edate').val(today);
$('#dates').daterangepicker({
locale: {
"format": 'YYYY-MM-DD', // 일시 노출 포맷
"applyLabel": "확인", // 확인 버튼 텍스트
"cancelLabel": "취소", // 취소 버튼 텍스트
"daysOfWeek": ["일", "월", "화", "수", "목", "금", "토"],
"monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
},
alwaysShowCalendars: true, // 시간 노출 여부
showDropdowns: true, // 년월 수동 설정 여부
autoApply: true, // 확인/취소 버튼 사용여부
maxDate: new Date(),
autoUpdateInput: false,
ranges: {
오늘: [moment(), moment()],
어제: [
moment().subtract(1, "days"),
moment().subtract(1, "days"),
],
최근7일: [
moment().subtract(7, "days").startOf("day"),
moment().subtract(1, "days").endOf("day")
],
최근14일: [
moment().subtract(14, "days").startOf("day"),
moment().subtract(1, "days").endOf("day")
],
이번주: [moment().day(1), moment()],
지난주: [
moment().add(-1, "week").startOf("week").day(1),
moment().add(-1, "week").startOf("week").add(7, "day"),
],
이번달: [moment().startOf("month"), moment().endOf("month")],
지난달: [
moment().subtract(1, "month").startOf("month"),
moment().subtract(1, "month").endOf("month"),
],
한달전: [moment().subtract(1, "month"), moment()],
},
}, function(start, end, label) {
startDate = start.format('YYYY-MM-DD'); // selected start
endDate = end.format('YYYY-MM-DD'); // selected end
$sdateInput = $('#sdate');
$edateInput = $('#edate');
$sdateInput.val(startDate);
$edateInput.val(endDate);
var dates = `${startDate} ~ ${endDate}`;
if(startDate == endDate) dates = startDate;
$('#dates').val(dates);
});
}
$('body').on('click', '#company-list button, #advertiser-list button, #media-list button, #event-list button', function() {
$(this).toggleClass('active');
debug('필터링 탭 클릭');
setTableParam();
dataTable.draw();
});
$('form[name="search-form"]').bind('submit', function() {
debug('검색 전송');
setTableParam();
dataTable.draw();
return false;
});
$('.statusCount').on('click', 'dl', function(e) {
debug('인정기준 필터')
$(this).toggleClass('active');
setTableParam();
dataTable.draw();
});
$('body').on('click', '.reset-btn', function() {
var today = moment().format('YYYY-MM-DD');
$('#sdate, #edate').val(today);
$('#company-list button, #advertiser-list button, #media-list button, #event-list button, .statusCount dl').removeClass('active');
$('#stx').val('');
tableParam.searchData = {
'sdate': $('#sdate').val(),
'edate': $('#edate').val(),
'stx': $('#stx').val(),
'company' : '',
'advertiser' : '',
'media' : '',
'event' : '',
'status' : ''
};
dataTable.state.clear();
dataTable.state.save();
dataTable.order([12, 'desc']).draw();
});
// 인정기준 변경처리
function setStatus(t) {
var oldvalue = $(t).attr('data-oldvalue');
var data = {
'seq': $(t).closest('tr').attr('id'),
'oldstatus' : oldvalue,
'status' : t.value
};
$.ajax({
type: "post",
url: "<?=base_url()?>/integrate/setstatus",
data: data,
dataType: "json",
success: function(response){
if(response.result == true) {
var r = response.data;
var data = {
'seq' : r.seq,
'memo' : `"${lead_status[r.oldstatus]}"에서 "${lead_status[r.status]}"(으)로 상태변경`
};
var $o_obj = $('.statusCount dt:contains("'+lead_status[r.oldstatus]+'")').filter(function() { return $(this).text() === lead_status[r.oldstatus];}).next('dd');
var o_cnt = parseInt($o_obj.text());
$o_obj.text(--o_cnt);
var $n_obj = $('.statusCount dt:contains("'+lead_status[r.status]+'")').filter(function() { return $(this).text() === lead_status[r.status];}).next('dd');
var n_cnt = parseInt($n_obj.text());
$n_obj.text(++n_cnt);
data.leads_seq = data.seq;
registerMemo(data);
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
}
$('#deviceTable')
.on('focus click', '.lead-status', function(e) {
$(this).attr('data-oldvalue', this.value);
})
.on('change', '.lead-status', function(e) {
setStatus(this);
});
function debug(msg) {
//console.log(msg);
}
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+252
View File
@@ -0,0 +1,252 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 홈
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<script>
</script>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<?php if($password_check){?>
<!--비밀번호 변경 팝업-->
<div class="modal fade show" id="passwordChangeModal" tabindex="-1" aria-labelledby="passwordChangeModalLabel" aria-hidden="true">
<div class="modal-dialog max-520">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="passwordChangeModalLabel"> 비밀번호 변경 알림</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>회원님의 개인정보를 안전하게 보호하고, 개인정보 도용으로 인한 <br>피해를 예방하기 위해
<b>90일 이상</b><span> 비밀번호를 변경하지 않은 경우 비밀번호 변경을 권장</span>하고 있습니다.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" id="password_extension_btn">2주 후에 알림</button>
<button type="button" class="btn btn-danger"><a href="/mypage">비밀번호 변경</a></button>
</div>
</div>
</div>
</div>
<?php };?>
<div class="main-contents-wrap">
<div class="ad-list text-center">
<div class="row">
<div class="type" id="facebookReport">
<div class="summary">
<strong><i class="facebook"></i>페이스북</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl>
<dt>수익</dt>
<dd id="profit_sum"></dd>
</dl>
</div>
<div class="ad-detail-info row">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<a href="/advertisements" class="btn-more btn-primary"><span>더보기</span></a>
</div>
<div class="row">
<div class="type" id="kakaoReport">
<div class="summary">
<strong><i class="kakao"></i>카카오 모먼트</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl>
<dt>수익</dt>
<dd id="profit_sum"></dd>
</dl>
</div>
<div class="ad-detail-info row">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<a href="/advertisements" class="btn-more"><span>더보기</span></a>
</div>
<div class="row">
<div class="type" id="googleReport">
<div class="summary">
<strong><i class="google"></i>구글 애드워즈</strong>
<dl class="percentage">
<dt>수익률</dt>
<dd id="per_sum"></dd>
</dl>
<dl>
<dt>수익</dt>
<dd id="profit_sum"></dd>
</dl>
</div>
<div class="ad-detail-info row">
<dl class="col">
<dt>노출수</dt>
<dd id="impressions_sum"></dd>
</dl>
<dl class="col">
<dt>클릭수</dt>
<dd id="clicks_sum"></dd>
</dl>
<dl class="col">
<dt>클릭율</dt>
<dd id="click_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>지출액</dt>
<dd id="spend_sum"></dd>
</dl>
<dl class="col">
<dt>DB수</dt>
<dd id="unique_total_sum"></dd>
</dl>
<dl class="col">
<dt>DB당 단가</dt>
<dd id="unique_one_price_sum"></dd>
</dl>
<dl class="col">
<dt>전환율</dt>
<dd id="conversion_ratio_sum"></dd>
</dl>
<dl class="col">
<dt>매출</dt>
<dd id="price_01_sum"></dd>
</dl>
</div>
</div>
<a href="/advertisements" class="btn-more btn-primary"><span>더보기</span></a>
</div>
</div>
</div>
<?=$this->endSection();?>
<!--스크립트-->
<?=$this->section('script');?>
<script>
getReport();
function getReport(){
$.ajax({
type: "GET",
url: "<?=base_url()?>/home/report",
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
$.each(data, function(key, value) {
console.log(value)
$('#'+ key + ' #profit_sum').text(value.profit_sum);
$('#'+ key + ' #impressions_sum').text(value.impressions_sum);
$('#'+ key + ' #clicks_sum').text(value.clicks_sum);
$('#'+ key + ' #click_ratio_sum').text(value.click_ratio_sum);
$('#'+ key + ' #spend_sum').text(value.spend_sum);
$('#'+ key + ' #unique_total_sum').text(value.unique_total_sum);
$('#'+ key + ' #unique_one_price_sum').text(value.unique_one_price_sum);
$('#'+ key + ' #conversion_ratio_sum').text(value.conversion_ratio_sum);
$('#'+ key + ' #profit_sum').text(value.profit_sum);
$('#'+ key + ' #per_sum').text(value.per_sum);
$('#'+ key + ' #price_01_sum').text(value.price_sum);
});
}
});
}
$(document).ready(function () {
$('#passwordChangeModal').modal('show');
$('body').on('click', '#password_extension_btn', function() {
$.ajax({
type: "GET",
url: "<?=base_url()?>/password-changed-at",
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
if(data == true){
$('#passwordChangeModal').modal('hide');
}
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
});
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+9
View File
@@ -0,0 +1,9 @@
<?=$this->renderSection('footer')?>
<?php if(getenv('MY_SERVER_NAME') == 'resta') { ?>
<div class="footer-info">
<p class="footer-info-business">사업자명 : 주식회사 리스타 ㅣ 대표자명 : 송명석 ㅣ 사업자번호 : 568-86-03133</p>
<p class="footer-info-address">주소 : 서울특별시 강남구 테헤란로25길 19, 5층(역삼동) ㅣ 대표번호 : 02-508-3789</p>
</div>
<?php }?>
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
<?=$this->include('templates/header.php')?>
<?=$this->renderSection('body')?>
<div class="app">
<div class="wrap d-flex">
<?=$this->include('templates/inc/navbar.php')?>
<?=$this->renderSection('content')?>
</div>
<?=$this->renderSection('modal')?>
</div>
<?=$this->renderSection('script')?>
<?=$this->include('templates/footer.php')?>
+17
View File
@@ -0,0 +1,17 @@
<?=$this->include('templates/header.php')?>
<!-- exam scss 파일 연결 -->
<link href="/static/css/exam/_account.css" rel="stylesheet">
<link href="/static/css/exam/_agree.css" rel="stylesheet">
<link href="/static/css/exam/_etc.css" rel="stylesheet">
<!-- //exam scss 파일 연결 -->
<?=$this->renderSection('body')?>
<div class="app">
<div class="wrap d-flex">
<?=$this->include('templates/inc/navbar_example.php')?>
<?=$this->renderSection('content')?>
</div>
<?=$this->renderSection('modal')?>
</div>
<?=$this->renderSection('script')?>
<?=$this->include('templates/footer.php')?>
+28
View File
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="ko">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="format-detection" content="telephone=no"><!-- 전화번호 인식 하지 않도록 제어 -->
<link href="/static/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/node_modules/daterangepicker/daterangepicker.css" rel="stylesheet">
<link href="/static/css/ui.css?<?=date('Ymd')?>" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/node_modules/jquery-ui/dist/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined"/>
<title><?= $this->renderSection('title') ?></title>
<script src="/static/node_modules/jquery/dist/jquery.min.js"></script>
<script src="/static/node_modules/jquery-ui/dist/jquery-ui.min.js"></script>
<script src="/static/node_modules/moment/moment.js"></script>
<script src="/static/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="/static/node_modules/daterangepicker/daterangepicker.js"></script>
<script src="/static/js/ui.js?<?=date('Ymd')?>"></script>
<script src="/static/js/index.js?<?=date('Ymd')?>"></script>
<script src="/static/js/clipboard.min.js?<?=date('Ymd')?>"></script>
<?=$this->renderSection('header')?>
</head>
<body>
<?=$this->renderSection('guestContent')?>
@@ -0,0 +1,21 @@
<!-- 차트 확인 Modal -->
<div class="modal fade" id="chart-modal" tabindex="-1" aria-labelledby="chartModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="chartModalLabel">차트 확인</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="chartContainer" style="width: 100%; height: 400px;"></div>
<div class="chart-buttons">
<button class="btn btn-secondary btn_viewChart" data-chart="cpa">현재 DB단가/유효DB/수익률</button>
<button class="btn btn-secondary btn_viewChart" data-chart="spend">지출액</button>
<button class="btn btn-secondary btn_viewChart" data-chart="sales">매출액</button>
<button class="btn btn-secondary btn_viewChart" data-chart="margin">수익</button>
<button class="btn btn-secondary btn_viewChart" data-chart="click">클릭수/노출수</button>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,359 @@
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/scheduler.css" rel="stylesheet">
<script src="/static/js/scheduler.js"></script>
<?=$this->endSection();?>
<div class="modal automationModal fade" id="automationModal" tabindex="-1" aria-labelledby="automationModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<div class="regi-content">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="step">
<ol id="myTab" role="tablist">
<li class="active" type="button" id="schedule-tab" data-bs-toggle="tab" data-bs-target="#schedule" type="button" aria-controls="schedule" aria-selected="true">
<strong>일정</strong>
</li>
<li id="target-tab" data-bs-toggle="tab" data-bs-target="#target" type="button" aria-controls="target" aria-selected="false">
<strong>대상</strong>
</li>
<li id="condition-tab" data-bs-toggle="tab" data-bs-target="#condition" type="button" aria-controls="condition" aria-selected="false">
<strong>조건</strong>
<p id="text-condition-1">
<span class="typeText"></span>
<span class="typeValueText"></span>
<span class="compareText"></span>
</p>
</li>
<li id="preactice-tab" data-bs-toggle="tab" data-bs-target="#preactice" type="button" aria-controls="preactice" aria-selected="false">
<strong>실행</strong>
</li>
<li id="detailed-tab" data-bs-toggle="tab" data-bs-target="#detailed" type="button" aria-controls="messages" aria-selected="false">
<strong>상세정보</strong>
<p id="detailText">
<span id="subjectText"></span><br>
<span id="descriptionText"></span>
</p>
</li>
</ol>
</div>
<div class="detail-wrap">
<input type="hidden" name="seq">
<div class="detail show active" id="schedule" role="tabpanel" aria-labelledby="schedule-tab" tabindex="0">
<table id="scheduleTable"></table>
<label for="onceExecution" class="mt15"><input type="checkbox" name="exec_once" id="onceExecution"> 하루에 한번만 실행</label>
</div>
<div class="detail" id="target" role="tabpanel" aria-labelledby="target-tab" tabindex="1">
<ul class="tab" id="targetTab">
<li class="active" data-tab="advertiser"><a href="javascript:void(0);">광고주</a></li>
<li data-tab="account"><a href="javascript:void(0);">매체광고주</a></li>
<li data-tab="campaign"><a href="javascript:void(0);">캠페인</a></li>
<li data-tab="adgroup"><a href="javascript:void(0);">광고그룹</a></li>
<li data-tab="ad"><a href="javascript:void(0);">광고</a></li>
</ul>
<div id="targetCreateType" class="targetCreateType">
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="target_create_type" value="target_sum" id="targetSum">
<label class="form-check-label" for="targetSum">
합산 적용
</label>
</div>
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="target_create_type" value="target_seperate" id="targetSeperate">
<label class="form-check-label" for="targetSeperate">
개별 적용
</label>
</div>
</div>
<div class="search">
<form name="search-target-form" class="search d-flex justify-content-center w-100">
<div class="input">
<input type="text" placeholder="검색어를 입력하세요" id="showTargetAdv">
<button class="btn-primary" id="search_target_btn" type="submit">조회</button>
</div>
</form>
</div>
<!-- <table class="table tbl-header w-100" id="targetCheckedTable">
<colgroup>
<col style="width:12%">
<col style="width:12%">
<col style="width:28%">
<col style="width:30%">
<col style="width:10%">
</colgroup>
<thead>
<tr>
<th scope="col" colspan="5" class="text-center">선택 항목(선택 후 상단 탭 클릭 시 소속 항목 조회가 가능합니다)</th>
</tr>
</thead>
<tbody></tbody>
</table> -->
<!-- 대상 컨텐츠 -->
<p class="sche-info-txt">선택 항목(선택 후 상단 탭 클릭 시 소속 항목 조회가 가능합니다)</p>
<table class="table tbl-header targetTable w-100" id="targetTable">
<!-- <colgroup>
<col style="width:12%">
<col style="width:12%">
<col style="width:26%">
<col style="width:30%">
<col style="width:12%">
<col style="width:8%">
</colgroup> -->
<thead>
<tr>
<th scope="col" class="text-center">매체</th>
<th scope="col" class="text-center">분류</th>
<th scope="col" class="text-center">ID</th>
<th scope="col" class="text-center">제목</th>
<th scope="col" class="text-center">상태</th>
<th scope="col" class="text-center"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<table class="table tbl-header targetSelectTable w-100 mt-4" id="targetSelectTable">
<colgroup>
<col style="width:17%">
<col style="width:17%">
<col style="width:17%">
<col style="width:17%">
<col style="width:20%">
<col style="width:11%">
</colgroup>
<thead>
<tr>
<th scope="col" colspan="6" class="text-center">적용 항목</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!-- 조건 컨텐츠 -->
<div class="detail" id="condition" role="tabpanel" aria-labelledby="condition-tab" tabindex="2">
<div class="d-flex align-items-center mb15">
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="operation" value="and" id="operationAnd">
<label class="form-check-label" for="operationAnd">
모두 일치
</label>
</div>
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="operation" value="or" id="operationOr">
<label class="form-check-label" for="operationOr">
하나만 일치
</label>
</div>
</div>
<table class="table tbl-header conditionTable" id="conditionTable">
<colgroup>
<col>
<col style="width:45%">
<col style="width:10%">
</colgroup>
<thead>
<tr>
<th scope="col">항목</th>
<th scope="col">구분</th>
<th scope="col"><button type="button" class="btn-add">추가</button></th>
</tr>
</thead>
<tbody>
<tr id="condition-1">
<td>
<div class="form-flex">
<select name="type" class="form-select conditionType">
<option value="">조건 항목</option>
<option value="status">상태</option>
<option value="budget">예산</option>
<option value="dbcost">DB단가</option>
<option value="unique_total">유효DB</option>
<option value="spend">지출액</option>
<option value="margin">수익</option>
<option value="margin_rate">수익률</option>
<option value="sales">매출액</option>
<!-- <option value="impression">노출수</option>
<option value="click">링크클릭</option>
<option value="cpc">CPC</option>
<option value="ctr">CTR</option> -->
<option value="conversion">DB전환률</option>
</select>
<select name="type_value_status" class="form-select conditionTypeValueStatus" style="display: none;">
<option value="">상태값 선택</option>
<option value="ON">ON</option>
<option value="OFF">OFF</option>
</select>
<input type="text" name="type_value" class="form-control conditionTypeValue" placeholder="조건값" oninput="onlyNumberLeadingDashAndDot(this);">
</div>
</td>
<td colspan="2">
<div class="form-flex">
<select name="compare" class="form-select conditionCompare">
<option value="">일치여부</option>
<option value="greater">초과</option>
<option value="greater_equal">보다 크거나 같음</option>
<option value="less">미만</option>
<option value="less_equal">보다 작거나 같음</option>
<option value="equal">같음</option>
<option value="not_equal">같지않음</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 실행 컨텐츠 -->
<div class="detail" id="preactice" role="tabpanel" aria-labelledby="preactice-tab" tabindex="3">
<div id="execSearchWrap">
<ul class="tab" id="execTab">
<li class="active" data-tab="campaign"><a href="javascript:void(0);">캠페인</a></li>
<li data-tab="adgroup"><a href="javascript:void(0);">광고그룹</a></li>
<li data-tab="ad"><a href="javascript:void(0);">광고</a></li>
</ul>
<div class="search">
<div class="d-flex align-items-center mb-2">
<input class="form-check-input" type="checkbox" value="1" id="searchAll">
<label class="form-check-label" for="searchAll">
전체검색
</label>
</div>
<form name="search-exec-form" class="search d-flex justify-content-center w-100">
<div class="input">
<input type="text" placeholder="검색어를 입력하세요" id="showExecAdv">
<button class="btn-primary" id="search_exec_btn" type="submit">조회</button>
</div>
</form>
</div>
<table class="table tbl-header execTable w-100 mt-4" id="execTable">
<!-- <colgroup>
<col style="width:10%">
<col style="width:10%">
<col style="width:30%">
<col style="width:40%">
<col style="width:10%">
</colgroup> -->
<thead>
<tr>
<th scope="col">매체</th>
<th scope="col">분류</th>
<th scope="col">ID</th>
<th scope="col">제목</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<table class="table tbl-header w-100 mt-4 execSelectTable" id="execSelectTable">
<colgroup>
<col style="width:10%">
<col style="width:10%">
<col style="width:10%">
<col style="width:10%">
<col style="width:10%">
<col style="width:11%">
<col style="width:11%">
<col style="width:18%">
<col style="width:10%">
</colgroup>
<thead>
<tr>
<th scope="col" colspan="9" class="text-center">
적용 항목
<div class="callTargetBtnBox">
<button class="callTargetBtn btn-primary">대상 불러오기</button>
</div>
</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td colspan="5">일괄 적용</td>
<td colspan="2">
<div class="mb5">
<select name="all_exec_condition_type" class="form-select">
<option value="">실행항목</option>
<option value="status">상태</option>
<option value="budget">예산</option>
</select>
</div>
<select name="all_exec_condition_type_budget" class="form-select">
<option value="">단위</option>
<option value="won">원</option>
<option value="percent">%</option>
</select>
</td>
<td>
<select name="all_exec_condition_value_status" class="form-select" style="display: none;">
<option value="">상태값</option>
<option value="ON">ON</option>
<option value="OFF">OFF</option>
</select>
<input type="text" name="all_exec_condition_value" class="form-control"placeholder="예산">
</td>
<td></td>
</tr>
</tfoot>
</table>
<table class="table tbl-header w-100 mt-4 slackSendTable" id="slackSendTable">
<thead>
<tr>
<th scope="col" class="text-center">슬랙 메세지 보내기</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-flex">
<input type="text" name="slack_webhook" class="form-control" placeholder="웹훅 URL">
<input type="text" name="slack_msg" class="form-control" placeholder="메세지">
</div>
</td>
</tr>
</tbody>
</table>
<p><a href="https://carelabs-dm.atlassian.net/wiki/external/NGU5YTNlYjYwYTI0NDliMjg5NzhiYTg3MjEwZTJhODc" target="_blank">▶ 슬랙 웹훅 생성 메뉴얼 참고</a></p>
</div>
<!-- 상세정보 컨텐츠 -->
<div class="detail" id="detailed" role="tabpanel" aria-labelledby="detailed-tab" tabindex="4">
<table class="table tbl-side" id="detailTable">
<colgroup>
<col style="width:35%">
<col>
</colgroup>
<tr>
<th scope="row">제목*</th>
<td>
<input type="text" name="subject" class="form-control bg">
</td>
</tr>
<tr>
<th scope="row">설명</th>
<td>
<textarea name="description" class="form-control"></textarea>
</td>
</tr>
</table>
<!-- <div class="btn-area">
<button type="button" id="createAutomationBtn" class="btn-special">저장</button>
<button type="button" id="updateAutomationBtn" class="btn-special" style="display: none;">수정</button>
</div> -->
</div>
</div>
</div>
<div class="btn-area">
<button type="button" id="createAutomationBtn" class="btn-special">저장</button>
<button type="button" id="updateAutomationBtn" class="btn-special" style="display: none;">수정</button>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,474 @@
<div class="modal fade" id="automationModal" tabindex="-1" aria-labelledby="automationModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-body">
<div class="regi-content">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="step">
<ol id="myTab" role="tablist">
<li class="active" type="button" id="schedule-tab" data-bs-toggle="tab" data-bs-target="#schedule" type="button" aria-controls="schedule" aria-selected="true">
<strong>일정</strong>
<p id="scheduleText"></p>
</li>
<li id="target-tab" data-bs-toggle="tab" data-bs-target="#target" type="button" aria-controls="target" aria-selected="false">
<strong>대상</strong>
</li>
<li id="condition-tab" data-bs-toggle="tab" data-bs-target="#condition" type="button" aria-controls="condition" aria-selected="false">
<strong>조건</strong>
<p id="text-condition-1">
<span class="typeText"></span>
<span class="typeValueText"></span>
<span class="compareText"></span>
</p>
</li>
<li id="preactice-tab" data-bs-toggle="tab" data-bs-target="#preactice" type="button" aria-controls="preactice" aria-selected="false">
<strong>실행</strong>
</li>
<li id="detailed-tab" data-bs-toggle="tab" data-bs-target="#detailed" type="button" aria-controls="messages" aria-selected="false">
<strong>상세정보</strong>
<p id="detailText">
<span id="subjectText"></span><br>
<span id="descriptionText"></span>
</p>
</li>
</ol>
</div>
<div class="detail-wrap">
<input type="hidden" name="seq">
<div class="detail show active" id="schedule" role="tabpanel" aria-labelledby="schedule-tab" tabindex="0">
<table class="table tbl-side" id="scheduleTable">
<colgroup>
<col style="width:35%">
<col>
</colgroup>
<tr>
<th scope="row">다음 시간마다 규칙적으로 실행</th>
<td>
<input type="text" name="type_value" class="form-control short" oninput="onlyNumber(this);" maxlength="3" autocomplete="off"/>
<select name="exec_type" class="form-select short" id="execType">
<option value="minute"></option>
<option value="hour">시간</option>
<option value="day"></option>
<option value="week"></option>
<option value="month"></option>
</select>
<p></p>
</td>
</tr>
<tr id="weekdayRow">
<th scope="row">요일</th>
<td>
<div class="week-radio">
<div class="day">
<input type="radio" name="exec_week" value="2" id="day01">
<label for="day01"></label>
</div>
<div class="day">
<input type="radio" name="exec_week" value="3" id="day02">
<label for="day02"></label>
</div>
<div class="day">
<input type="radio" name="exec_week" value="4" id="day03">
<label for="day03"></label>
</div>
<div class="day">
<input type="radio" name="exec_week" value="5" id="day04">
<label for="day04"></label>
</div>
<div class="day">
<input type="radio" name="exec_week" value="6" id="day05">
<label for="day05"></label>
</div>
<div class="day">
<input type="radio" name="exec_week" value="7" id="day06">
<label for="day06"></label>
</div>
<div class="day">
<input type="radio" name="exec_week" value="1" id="day07">
<label for="day07"></label>
</div>
</div>
</td>
</tr>
<tr id="nextDateRow">
<th scope="row">다음 날짜에</th>
<td>
<select name="month_type" class="form-select" id="monthType">
<option value="" selected>선택</option>
<option value="start_day">매달 첫번째 </option>
<option value="end_day">매달 마지막 </option>
<option value="first">처음</option>
<option value="last">마지막</option>
<option value="day">날짜</option>
</select>
<select name="month_day" class="form-select" id="monthDay">
<option value="" selected>선택</option>
<?php
for ($i = 1; $i <= 31; $i++) {
echo "<option value='$i'>".$i."일</option>";
}
?>
</select>
<select name="month_week" class="form-select" id="monthWeek">
<option value="" selected>선택</option>
<option value="2">월</option>
<option value="3">화</option>
<option value="4">수</option>
<option value="5">목</option>
<option value="6">금</option>
<option value="7">토</option>
<option value="1">일</option>
</select>
</td>
</tr>
<tr id="timeRow">
<th scope="row">시간</th>
<td>
<?php
$interval = new DateInterval('PT30M');
$time = new DateTime('00:00');
$end = new DateTime('24:00');
ob_start();
while ($time < $end) {
$value = $time->format('H:i');
echo "<option value='$value'>$value</option>";
$time->add($interval);
}
$timeOptions = ob_get_clean();
?>
<select name="exec_time" id="execTime" class="form-select middle">
<option value="" selected>선택</option>
<?php echo $timeOptions; ?>
</select>
</td>
</tr>
<tr id="criteriaTimeRow">
<th scope="row">시작 일시</th>
<td>
<div class="form-flex">
<input type="text" name="criteria_time" class="form-control" readonly>
</div>
</td>
</tr>
<tr>
<th scope="row">제외 시간</th>
<td>
<div class="form-flex">
<select name="ignore_start_time" class="form-select middle">
<option value="" selected>선택</option>
<?php echo $timeOptions; ?>
</select>
<span>~</span>
<select name="ignore_end_time" class="form-select middle">
<option value="">선택</option>
<?php echo $timeOptions; ?>
</select>
</div>
</td>
</tr>
</table>
</div>
<div class="detail" id="target" role="tabpanel" aria-labelledby="target-tab" tabindex="1">
<ul class="tab" id="targetTab">
<li class="active" data-tab="advertiser"><a href="#">광고주</a></li>
<li data-tab="account"><a href="#">매체광고주</a></li>
<li data-tab="campaign"><a href="#">캠페인</a></li>
<li data-tab="adgroup"><a href="#">광고그룹</a></li>
<li data-tab="ad"><a href="#">광고</a></li>
</ul>
<div id="targetCreateType">
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="target_create_type" value="target_sum" id="targetSum">
<label class="form-check-label" for="targetSum">
합산 적용
</label>
</div>
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="target_create_type" value="target_seperate" id="targetSeperate">
<label class="form-check-label" for="targetSeperate">
개별 적용
</label>
</div>
</div>
<div class="search">
<form name="search-target-form" class="search d-flex justify-content-center w-100">
<div class="input">
<input type="text" placeholder="검색어를 입력하세요" id="showTargetAdv">
<button class="btn-primary" id="search_target_btn" type="submit">조회</button>
</div>
</form>
</div>
<table class="table tbl-header w-100" id="targetCheckedTable">
<colgroup>
<col style="width:12%">
<col style="width:12%">
<col style="width:28%">
<col style="width:30%">
<col style="width:10%">
</colgroup>
<thead>
<tr>
<th scope="col" colspan="5" class="text-center">선택 항목(선택 후 상단 탭 클릭 시 소속 항목 조회가 가능합니다)</th>
</tr>
</thead>
<tbody></tbody>
</table>
<table class="table tbl-header w-100" id="targetTable">
<colgroup>
<col style="width:12%">
<col style="width:12%">
<col style="width:28%">
<col style="width:30%">
<col style="width:10%">
<col style="width:8%">
</colgroup>
<thead>
<tr>
<th scope="col" class="text-center">매체</th>
<th scope="col" class="text-center">분류</th>
<th scope="col" class="text-center">ID</th>
<th scope="col" class="text-center">제목</th>
<th scope="col" class="text-center">상태</th>
<th scope="col" class="text-center"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<table class="table tbl-header w-100 mt-4" id="targetSelectTable">
<colgroup>
<col style="width:12%">
<col style="width:12%">
<col style="width:28%">
<col style="width:30%">
<col style="width:10%">
</colgroup>
<thead>
<tr>
<th scope="col" colspan="5" class="text-center">적용 항목</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="detail" id="condition" role="tabpanel" aria-labelledby="condition-tab" tabindex="2">
<div class="d-flex align-items-center mb-2">
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="operation" value="and" id="operationAnd">
<label class="form-check-label" for="operationAnd">
모두 일치
</label>
</div>
<div class="d-flex align-items-center">
<input class="form-check-input" type="radio" name="operation" value="or" id="operationOr">
<label class="form-check-label" for="operationOr">
하나만 일치
</label>
</div>
</div>
<table class="table tbl-header" id="conditionTable">
<colgroup>
<col>
<col style="width:45%">
<col style="width:5%">
</colgroup>
<thead>
<tr>
<th scope="col">항목</th>
<th scope="col">구분</th>
<th scope="col"><button type="button" class="btn-add">추가</button></th>
</tr>
</thead>
<tbody>
<tr id="condition-1">
<td>
<div class="form-flex">
<!-- <input type="text" name="order" placeholder="순서(1~)" class="form-control conditionOrder" oninput="onlyNumber(this);" maxlength="3"> -->
<select name="type" class="form-select conditionType">
<option value="">조건 항목</option>
<option value="status">상태</option>
<option value="budget">예산</option>
<option value="dbcost">DB단가</option>
<option value="unique_total">유효DB</option>
<option value="spend">지출액</option>
<option value="margin">수익</option>
<option value="margin_rate">수익률</option>
<option value="sales">매출액</option>
<!-- <option value="impression">노출수</option>
<option value="click">링크클릭</option>
<option value="cpc">CPC</option>
<option value="ctr">CTR</option> -->
<option value="conversion">DB전환률</option>
</select>
<select name="type_value_status" class="form-select conditionTypeValueStatus" style="display: none;">
<option value="">상태값 선택</option>
<option value="ON">ON</option>
<option value="OFF">OFF</option>
</select>
<input type="text" name="type_value" class="form-control conditionTypeValue" placeholder="조건값" oninput="onlyNumberLeadingDashAndDot(this);">
</div>
</td>
<td colspan="2">
<div class="form-flex">
<select name="compare" class="form-select conditionCompare">
<option value="">일치여부</option>
<option value="greater">초과</option>
<option value="greater_equal">보다 크거나 같음</option>
<option value="less">미만</option>
<option value="less_equal">보다 작거나 같음</option>
<option value="equal">같음</option>
<option value="not_equal">같지않음</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="detail" id="preactice" role="tabpanel" aria-labelledby="preactice-tab" tabindex="3">
<div id="execSearchWrap">
<ul class="tab" id="execTab">
<li class="active" data-tab="campaign"><a href="#">캠페인</a></li>
<li data-tab="adgroup"><a href="#">광고그룹</a></li>
<li data-tab="ad"><a href="#">광고</a></li>
</ul>
<div class="search">
<div class="d-flex align-items-center mb-2">
<input class="form-check-input" type="checkbox" value="1" id="searchAll">
<label class="form-check-label" for="searchAll">
전체검색
</label>
</div>
<form name="search-exec-form" class="search d-flex justify-content-center w-100">
<div class="input">
<input type="text" placeholder="검색어를 입력하세요" id="showExecAdv">
<button class="btn-primary" id="search_exec_btn" type="submit">조회</button>
</div>
</form>
</div>
<table class="table tbl-header w-100 mt-4" id="execTable">
<colgroup>
<col style="width:10%">
<col style="width:10%">
<col style="width:30%">
<col style="width:40%">
<col style="width:10%">
</colgroup>
<thead>
<tr>
<th scope="col">매체</th>
<th scope="col">분류</th>
<th scope="col">ID</th>
<th scope="col">제목</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<table class="table tbl-header w-100 mt-4 execSelectTable" id="execSelectTable">
<colgroup>
<col style="width:8%">
<col style="width:8%">
<col style="width:10%">
<col style="width:14%">
<col style="width:20%">
<col style="width:15%">
<col style="width:15%">
<col style="width:12%">
</colgroup>
<thead>
<tr>
<th scope="col" colspan="8" class="text-center">
적용 항목
<div class="callTargetBtnBox">
<button class="callTargetBtn btn-primary">대상 불러오기</button>
</div>
</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td colspan="5">일괄 적용</td>
<td>
<select name="all_exec_condition_type" class="form-select">
<option value="">실행항목</option>
<option value="status">상태</option>
<option value="budget">예산</option>
</select>
</td>
<td>
<select name="all_exec_condition_value_status" class="form-select" style="display: none;">
<option value="">상태값</option>
<option value="ON">ON</option>
<option value="OFF">OFF</option>
</select>
<input type="text" name="all_exec_condition_value" class="form-control"placeholder="예산">
</td>
<td>
<select name="all_exec_condition_type_budget" class="form-select">
<option value="">단위</option>
<option value="won">원</option>
<option value="percent">%</option>
</select>
</td>
</tr>
</tfoot>
</table>
<table class="table tbl-header w-100 mt-4 slackSendTable" id="slackSendTable">
<thead>
<tr>
<th scope="col" class="text-center">슬랙 메세지 보내기</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-flex">
<input type="text" name="slack_webhook" class="form-control" placeholder="웹훅 URL">
<input type="text" name="slack_msg" class="form-control" placeholder="메세지">
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="detail" id="detailed" role="tabpanel" aria-labelledby="detailed-tab" tabindex="4">
<table class="table tbl-side" id="detailTable">
<colgroup>
<col style="width:35%">
<col>
</colgroup>
<tr>
<th scope="row">제목*</th>
<td>
<input type="text" name="subject" class="form-control bg">
</td>
</tr>
<tr>
<th scope="row">설명</th>
<td>
<textarea name="description" class="form-control"></textarea>
</td>
</tr>
</table>
<duv class="btn-area">
<button type="button" id="createAutomationBtn" class="btn-special">저장</button>
<button type="button" id="updateAutomationBtn" class="btn-special" style="display: none;">수정</button>
</duv>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,31 @@
<div class="modal fade" id="advLogModal" tabindex="-1" aria-labelledby="logModal" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="logModal"><i class="ico-log"></i> 광고별 자동화 로그 <span></span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="section client-list automationBtnWrap">
<h3 class="content-title toggle">
<i class="bi bi-chevron-up"></i>
소속 자동화 목록
</h3>
<div class="row" id="automation-list"></div>
</div>
<table class="table tbl-dark advLogTable" id="advLogTable" style="width: 100%;">
<thead class="table-dark">
<tr>
<th scope="col">제목</th>
<th scope="col">작성자</th>
<th scope="col">결과</th>
<th scope="col">마지막 실행</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
@@ -0,0 +1,48 @@
<div class="modal fade" id="advChangeLogModal" tabindex="-1" aria-labelledby="advChangeLogModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="advChangeLogModalLabel"><i class="bi bi-file-text"></i> 변경 내역</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<ul class="change-list m-2"></ul>
</div>
</div>
</div>
</div>
<!-- <div class="modal fade" id="advChangeLogModal" tabindex="-1" aria-labelledby="advChangeLogModal" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="advChangeLogModal"><i class="ico-log"></i> 변경 내역 <span></span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table class="table tbl-dark" id="advChangeLogTable" style="width: 100%;">
<colgroup>
<col style="width:10%;">
<col style="width:20%;">
<col style="width:10%;">
<col style="width:30%;">
<col style="width:10%;">
<col style="width:20%;">
</colgroup>
<thead class="table-dark">
<tr>
<th scope="col">매체</th>
<th scope="col">ID</th>
<th scope="col">분류</th>
<th scope="col">변경값</th>
<th scope="col">사용자</th>
<th scope="col">변경일자</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div> -->
+102
View File
@@ -0,0 +1,102 @@
<?php
$uri = current_url(true)->getPath();
?>
<div class="left-side">
<button type="button" class="btn-menu">메뉴보기</button>
<h1 class="logo">
<?php
$homeUrl = auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user') ? '/' : '/integrate';
$logoPath = "/img/" . getenv('MY_SERVER_NAME') . "_logo.png";
$logoAlt = ucfirst(getenv('MY_SERVER_NAME'));
?>
<a href="<?php echo $homeUrl; ?>">
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . $logoPath)) { ?>
<img src="<?php echo $logoPath; ?>" alt="<?php echo $logoAlt; ?>">
<?php } else { ?>
<?php echo $logoAlt; ?>
<?php } ?>
</a>
</h1>
<div class="nav-wrap">
<ul class="nav flex-column">
<?php if (auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user', 'test')) {?>
<li>
<button data-bs-toggle="collapse" data-bs-target="#advertisements" aria-expanded="false"><i class="bi bi-graph-up-arrow"></i>통합 광고관리</button>
<div class="collapse" id="advertisements">
<ul class="btn-toggle-nav">
<li><a href="/advertisements" class="<?php if($uri === '/advertisements'){ echo "active";}?>">통합 광고관리</a></li>
<li><a href="/etcmanager" class="<?php if($uri === '/etcmanager'){ echo "active";}?>">기타 광고관리</a></li>
<li><a href="/automation" class="<?php if($uri === '/automation'){ echo "active";}?>">자동화 관리</a></li>
</ul>
</div>
</li>
<?php }?>
<li>
<button data-bs-toggle="collapse" data-bs-target="#integrate" aria-expanded="false"><i class="bi bi-person-lines-fill"></i>통합 DB관리</button>
<div class="collapse" id="integrate">
<ul class="btn-toggle-nav">
<li><a href="/integrate" class="<?php if($uri === '/integrate'){ echo "active";}?>">통합 DB관리</a></li>
<li><a href="/integrate/download" class="<?php if($uri === '/integrate/download'){ echo "active";}?>">다운로드</a></li>
</ul>
</div>
</li>
<?php
if (auth()->user()->inGroup('superadmin', 'admin', 'developer', 'user', 'test')) {
if(getenv('MY_SERVER_NAME') === 'carelabs'){
?>
<li>
<button data-bs-toggle="collapse" data-bs-target="#accounting" aria-expanded="false"><i class="bi bi-cash-coin"></i>회계 관리</button>
<div class="collapse" id="accounting">
<ul class="btn-toggle-nav">
<li><a href="/accounting/withdraw" class="<?php if($uri === '/accounting/withdraw' || $uri === '/accounting/withdrawList'){ echo "active";}?>">출금요청</a></li>
<li><a href="/accounting/tax" class="<?php if($uri === '/accounting/tax' || $uri === '/accounting/taxList'){ echo "active";}?>">세금계산서 요청</a></li>
<li><a href="/accounting/unpaid" class="<?php if($uri === '/accounting/unpaid'){ echo "active";}?>">미수금 관리</a></li>
</ul>
</div>
</li>
<li>
<a href="/humanresource/management" class="<?php if($uri === '/humanresource/management'){ echo "active";}?>"><button><i class="bi bi-alarm-fill"></i>시차 관리</button></a>
</li>
<?php }?>
<li>
<button data-bs-toggle="collapse" data-bs-target="#event" aria-expanded="false"><i class="bi bi-calendar-week"></i>이벤트</button>
<div class="collapse" id="event">
<ul class="btn-toggle-nav">
<li><a href="/eventmanage/event" class="<?php if($uri === '/eventmanage/event'){ echo "active";}?>">이벤트 관리</a></li>
<li><a href="/eventmanage/advertiser" class="<?php if($uri === '/eventmanage/advertiser'){ echo "active";}?>">광고주 관리</a></li>
<li><a href="/eventmanage/media" class="<?php if($uri === '/eventmanage/media'){ echo "active";}?>">매체 관리</a></li>
<li><a href="/eventmanage/change" class="<?php if($uri === '/eventmanage/change'){ echo "active";}?>">전환 관리</a></li>
<li><a href="/eventmanage/blacklist" class="<?php if($uri === '/eventmanage/blacklist'){ echo "active";}?>">블랙리스트 관리</a></li>
<?php if(getenv('MY_SERVER_NAME') === 'carelabs'){?>
<li><a href="https://event.hotblood.co.kr/example" target="_reference">레퍼런스</a></li>
<?php }?>
</ul>
</div>
</li>
<?php if (auth()->user()->inGroup('superadmin', 'developer', 'admin', 'user')) {?>
<li>
<button data-bs-toggle="collapse" data-bs-target="#user" aria-expanded="false"><i class="bi bi-person-badge-fill"></i>회원 관리</button>
<div class="collapse" id="user">
<ul class="btn-toggle-nav">
<li><a href="/company" class="<?php if($uri === '/company'){ echo "active";}?>">광고주/광고대행사 관리</a></li>
<li><a href="/user" class="<?php if($uri === '/user'){ echo "active";}?>">회원 관리</a></li>
</ul>
</div>
</li>
<?php }?>
<?php }?>
</ul>
</div>
<div class="user-nav">
<p><?php echo auth()->user()->username;?> 로그인 중</p>
<div class="util-nav">
<a href="/mypage"><span>마이페이지</span></a>
<a href="/logout"><span>로그아웃</span></a>
</div>
</div>
<div class="btn-top">
<a href="#" class="head"><i class="bi bi-chevron-double-up"></i><span class="sr-only">TOP</span></a>
<a href="#" class="list"><i class="bi bi-chevron-up"></i><span class="sr-only">Up To List</span></a>
</div>
</div>
@@ -0,0 +1,53 @@
<div class="left-side">
<button type="button" class="btn-menu">메뉴보기</button>
<h1 class="logo"><a href="/"><img src="/img/logo.png" alt="CHAIN 열혈광고"></a></h1>
<div class="nav-wrap">
<ul class="nav flex-column">
<li>
<button data-bs-toggle="collapse" data-bs-target="#ad" aria-expanded="false"><i class="bi bi-graph-up-arrow"></i>광고 관리</button>
<div class="collapse" id="ad">
<ul class="btn-toggle-nav">
<li><a href="/advertisements/facebook" class="">페이스북</a></li>
<li><a href="/example/kakao" class="">카카오 모먼트</a></li>
<li><a href="/example/google" class="active">구글 애드워즈</a></li>
<li><a href="/example/etc" class="">기타</a></li>
</ul>
</div>
</li>
<li>
<a href="/example/db"><button><i class="bi bi-people-fill"></i>통합 DB 관리</button></a>
</li>
<li>
<button data-bs-toggle="collapse" data-bs-target="#accounting" aria-expanded="false"><i class="bi bi-cash-coin"></i>회계 관리</button>
<div class="collapse" id="accounting">
<ul class="btn-toggle-nav">
<li><a href="/example/withdraw">출금요청</a></li>
<li><a href="/example/tax" class="active">세금계산서 요청</a></li>
<li><a href="/example/unpaid">미수금 관리</a></li>
</ul>
</div>
</li>
<li>
<a href="/example/manage"><button><i class="bi bi-person-vcard-fill"></i>인사 관리</button></a>
</li>
<li>
<button data-bs-toggle="collapse" data-bs-target="#event" aria-expanded="false"><i class="bi bi-calendar-week"></i>이벤트</button>
<div class="collapse" id="event">
<ul class="btn-toggle-nav">
<li><a href="/example/event_manage">이벤트 관리</a></li>
<li><a href="/company/list" class="">광고주 관리</a></li>
<li><a href="/example/media_manage">매체 관리</a></li>
<li><a href="/example/change_manage">전환 관리</a></li>
<li><a href="/example/exel">엑셀 업로드</a></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="util-nav">
<a href="#">마이페이지</a>
<a href="/logout">로그아웃</a>
</div>
</div>
<script>
</script>
+98
View File
@@ -0,0 +1,98 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 마이페이지
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap myPage-container">
<div class="title-area">
<h2 class="page-title">마이페이지</h2>
<p class="title-disc">혼자서는 작은 한 방울이지만 함께 모이면 바다를 이룬다.</p>
</div>
<main class="mt0">
<!-- <h1><?php echo $user->nickname?></h1> -->
<div class="row mt0">
<div>
<div class="card">
<div class="card-header bg-dark text-white">
<h3 class="card-title mb-0">Profile</h3>
</div>
<div class="card-body">
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if (session('message') !== null) : ?>
<div class="alert alert-success" role="alert"><?= session('message') ?></div>
<?php endif ?>
<form action="/mypage/update" method="post">
<?php if(!empty($user->nickname)) {?>
<dl>
<dt><span>이</span><span>름</span></dt>
<dd><?php echo $user->nickname?></dd>
</dl>
<?php } ?>
<dl>
<dt><span>아</span><span>이</span><span>디</span></dt>
<dd><?php echo $user->username?></dd>
</dl>
<dl>
<dt><span>이</span><span>메</span><span>일</span></dt>
<dd><?php echo $user->getEmail()?></dd>
</dl>
<dl>
<dt><span>기</span><span>존</span><span>비</span><span>밀</span><span>번</span><span>호</span></dt>
<dd><input type="password" class="form-control" name="old_password" placeholder="<?= lang('Auth.old_password') ?>"
value="" /></dd>
</dl>
<dl>
<dt><span>신</span><span>규</span><span>비</span><span>밀</span><span>번</span><span>호</span></dt>
<dd><input type="password" class="form-control" name="password" placeholder="<?= lang('Auth.password') ?>"
value="" /></dd>
</dl>
<dl>
<dt><span>비</span><span>밀</span><span>번</span><span>호</span><span>확</span><span>인</span></dt>
<dd><input type="password" class="form-control" name="password_confirm" placeholder="<?= lang('Auth.passwordConfirm') ?>"
value="" /></dd>
</dl>
<button type="submit" class="btn btn-primary">등록</button>
</form>
</div>
</div>
</div>
</div>
</main>
</div>
<?=$this->endSection();?>
<?=$this->section('script');?>
<script>
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>
+471
View File
@@ -0,0 +1,471 @@
<?=$this->extend('templates/front.php');?>
<!--타이틀-->
<?=$this->section('title');?>
ZENITH - 회원 관리
<?=$this->endSection();?>
<!--헤더-->
<?=$this->section('header');?>
<link href="/static/css/datatables.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-select-bs5/css/select.bootstrap5.min.css" rel="stylesheet">
<link href="/static/node_modules/datatables.net-staterestore-bs5/css/stateRestore.bootstrap5.min.css" rel="stylesheet">
<script src="/static/node_modules/datatables.net/js/dataTables.min.js"></script>
<script src="/static/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="/static/node_modules/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
<style>
.ui-autocomplete{
z-index: 10000000;
max-height: 300px;
overflow-y: auto; /* prevent horizontal scrollbar */
overflow-x: hidden;
}
hr{
display: block !important;
}
.ui-widget{
font-family: "NanumSquareNeo", "Noto Sans", dotum, Gulim, sans-serif;
}
</style>
<?=$this->endSection();?>
<!--바디-->
<?=$this->section('body');?>
<?=$this->endSection();?>
<!--컨텐츠영역-->
<?=$this->section('content');?>
<div class="sub-contents-wrap db-manage-contaniner">
<div class="title-area">
<h2 class="page-title">회원 관리</h2>
<!-- <p class="title-disc">혼자서는 작은 한 방울이지만 함께 모이면 바다를 이룬다.</p> -->
</div>
<div class="search-wrap">
<form name="search-form" class="search d-flex justify-content-center">
<div class="input">
<input type="text" name="stx" id="stx" placeholder="검색어를 입력하세요">
<button class="btn-primary" id="search_btn" type="submit">조회</button>
</div>
</form>
</div>
<div class="position-relative">
<div class="row table-responsive">
<table class="dataTable table table-striped table-hover table-default" id="userTable">
<thead class="table-dark">
<tr>
<th scope="col">#</th>
<th scope="col">소속</th>
<th scope="col">아이디</th>
<th scope="col">이름</th>
<th scope="col">이메일</th>
<th scope="col">상태</th>
<th scope="col">권한</th>
<th scope="col">생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!--사용자 수정-->
<div class="modal fade" id="user-show" tabindex="-1" aria-labelledby="user-show-label" aria-hidden="true">
<div class="modal-dialog modal-lg sm-txt">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="user-show-label"><i class="bi bi-file-text"></i> <span class="title">회원 관리</span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<form name="user-show-form" id="userForm">
<input type="hidden" name="user_id" value="">
<h2 class="body-title">회원정보 수정</h2>
<table class="table table-bordered table-left-header">
<colgroup>
<col style="width:30%;">
<col style="width:70%;">
</colgroup>
<tbody>
<tr>
<th scope="row">소속</th>
<td id="userBelong">
<input type="text" name="company_name" class="form-control" id="belongCompany" placeholder="광고주/광고대행사 검색">
</td>
</tr>
<tr>
<th scope="row">아이디</th>
<td id="usernameText"></td>
</tr>
<tr>
<th scope="row">이메일</th>
<td id="emailText"></td>
</tr>
<tr>
<th scope="row">상태</th>
<td id="userStatus">
<select class="form-select" aria-label="상태 선택" name="active">
<option selected hidden disabled>-선택-</option>
<option value="1">활성</option>
<option value="0">비활성</option>
</select>
</td>
</tr>
<tr>
<th scope="row">권한</th>
<td id="userGroup" class="userGroup">
<div class="inner">
<div class="form-check form-check-inline">
<input type="checkbox" name="group[]" value="admin" class="form-check-input" id="admin">
<label for="admin" class="form-check-label">관리자</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="group[]" value="developer" class="form-check-input" id="developer">
<label for="developer" class="form-check-label">개발자</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="group[]" value="user" class="form-check-input" id="userCheck">
<label for="userCheck" class="form-check-label">직원</label>
</div>
</div>
<div class="inner">
<div class="form-check form-check-inline">
<input type="checkbox" name="group[]" value="agency" class="form-check-input" id="agency">
<label for="agency" class="form-check-label">광고대행사</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="group[]" value="advertiser" class="form-check-input" id="advertiser">
<label for="advertiser" class="form-check-label">광고주</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="group[]" value="guest" class="form-check-input" id="guest">
<label for="guest" class="form-check-label">게스트</label>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row">세부권한</th>
<td id="userPermission" class="userPermission">
<p class="user-title-db">통합DB관리</p>
<div class="inner">
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="integrate.status" class="form-check-input" id="adminAccess">
<label for="adminAccess" class="form-check-label">인정기준 변경</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="integrate.advertiser" class="form-check-input" id="intergrateAdvertiser">
<label for="intergrateAdvertiser" class="form-check-label">광고주 노출</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="integrate.media" class="form-check-input" id="intergrateMedia">
<label for="intergrateMedia" class="form-check-label">매체 노출</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="integrate.description" class="form-check-input" id="intergrateDescription">
<label for="intergrateDescription" class="form-check-label">구분 노출</label>
</div>
</div>
<!-- <div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="admin.access" class="form-check-input" id="adminAccess">
<label for="adminAccess" class="form-check-label">관리자만 가능한 페이지 접근 가능</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="admin.settings" class="form-check-input" id="adminSettings">
<label for="adminSettings" class="form-check-label">관리자만 가능한 설정 접근 가능</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="users.create" class="form-check-input" id="usersCreate">
<label for="usersCreate" class="form-check-label">회원 생성</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="users.edit" class="form-check-input" id="usersEdit">
<label for="usersEdit" class="form-check-label">회원 수정</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="users.delete" class="form-check-input" id="usersDelete">
<label for="usersDelete" class="form-check-label">회원 삭제</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="agency.access" class="form-check-input" id="agencyAccess">
<label for="agencyAccess" class="form-check-label">대행사 목록 페이지</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="agency.advertisers" class="form-check-input" id="agencyAdvertisers">
<label for="agencyAdvertisers" class="form-check-label">대행사 하위 광고주 관리</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="agency.create" class="form-check-input" id="agencyCreate">
<label for="agencyCreate" class="form-check-label">대행사 생성</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="agency.edit" class="form-check-input" id="agencyEdit">
<label for="agencyEdit" class="form-check-label">대행사 수정</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="agency.delete" class="form-check-input" id="agencyDelete">
<label for="agencyDelete" class="form-check-label">대행사 삭제</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="advertiser.access" class="form-check-input" id="advertiserAccess">
<label for="advertiserAccess" class="form-check-label">광고주 목록 페이지</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="advertiser.create" class="form-check-input" id="advertiserCreate">
<label for="advertiserCreate" class="form-check-label">광고주 생성</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="advertiser.edit" class="form-check-input" id="advertiserEdit">
<label for="advertiserEdit" class="form-check-label">광고주 수정</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" name="permission[]" value="advertiser.delete" class="form-check-input" id="advertiserDelete">
<label for="advertiserDelete" class="form-check-label">광고주 삭제</label>
</div> -->
</td>
</tr>
<tr>
<th scope="row">생성일</th>
<td id="userCreatedAt"></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" id="userModifyBtn" form="userForm">수정</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">취소</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?=$this->endSection();?>
<?=$this->section('script');?>
<script>
let data = {};
let dataTable;
getUserList();
function setData() {
data = {
'stx': $('#stx').val(),
};
return data;
}
function getUserList(){
dataTable = $('#userTable').DataTable({
"fixedHeader": true,
"autoWidth": true,
"order": [[7, 'desc']],
"processing" : true,
"serverSide" : true,
"responsive": true,
"searching": false,
"ordering": true,
"scrollX": true,
"scrollCollapse": true,
"deferRender": false,
"rowId": "user_id",
"lengthMenu": [
[ 25, 10, 50, -1 ],
[ '25개', '10개', '50개', '전체' ]
],
"ajax": {
"url": "<?=base_url()?>/user/get-users",
"data": function(d) {
d.searchData = setData();
},
"type": "GET",
"contentType": "application/json",
"dataType": "json",
},
"columnDefs": [
{ targets: [0], orderable: false},
],
"columns": [
{ "data": null },
{ "data": "belong" },
{ "data": "username"},
{ "data": "nickname"},
{ "data": "email" },
{ "data": "active" },
{ "data": "groups" },
{
"data": "created_at",
"render": function(data){
return data.substr(0, 10);
}
},
],
"createdRow": function(row, data, dataIndex) {
$(row).attr("data-bs-toggle", "modal");
$(row).attr("data-bs-target", "#user-show");
},
"language": {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/ko.json',
},
"rowCallback": function(row, data, index) {
var api = this.api();
var totalRecords = api.page.info().recordsTotal;
var pageSize = api.page.len();
var currentPage = api.page();
var totalPages = Math.ceil(totalRecords / pageSize);
var seqNumber = totalRecords - (currentPage * pageSize) - index; // 계산된 순번 (내림차순)
$('td:eq(0)', row).html(seqNumber);
},
"infoCallback": function(settings, start, end, max, total, pre){
return "<i class='bi bi-check-square'></i>현재" + "<span class='now'>" +start +" - " + end + "</span>" + " / " + "<span class='total'>" + total + "</span>" + "건";
},
});
}
function getSearchCompanies(){
$('#belongCompany').autocomplete({
source : function(request, response) {
$.ajax({
url : "/company/get-search-companies",
type : "GET",
dataType: "JSON",
data : {'stx': request.term},
contentType: 'application/json; charset=utf-8',
success : function(data){
response(
$.map(data, function(item) {
return {
label: item.name,
value: item.name,
id: item.id
};
})
);
}
,error : function(){
alert("에러 발생");
}
});
},
focus : function(event, ui) {
return false;
},
minLength: 1,
autoFocus : true,
delay: 100
});
}
function setUserShow(data) {
$('#user-show #userBelong input[name="user_id"]').val(data.user_id);
$('#user-show #userBelong input[name="company_name"]').val(data.belong);
$('#user-show #usernameText').text(data.username);
$('#user-show #emailText').text(data.email);
$('#user-show #userCreatedAt').text(data.created_at);
$('#user-show table .dp_info').remove();
if(typeof data.division == 'string') {
var html = "";
html += `<tr class="dp_info"><th>이름</th><td>${data.nickname}</td></tr>`;
html += `<tr class="dp_info"><th>직급</th><td>${data.position}</td></tr>`;
html += `<tr class="dp_info"><th>부서</th><td>${data.division}</td></tr>`;
html += `<tr class="dp_info"><th>팀</th><td>${data.team}</td></tr>`;
$('#user-show table tr:eq(2)').after(html);
}
$('#user-show #userStatus select').val(data.active);
data.groups.forEach(function(value) {
if(value === 'superadmin'){
$("#userGroup").prepend('<div class="form-check-inline" id="groupHide">최고관리자</div>');
}
$("#userGroup input[value='" + value + "']").prop("checked", true);
});
data.permissions.forEach(function(value) {
$("#userPermission input[value='" + value + "']").prop("checked", true);
});
}
function updateUser(data){
$.ajax({
url : "/company/set-user",
type : "PUT",
dataType: "JSON",
data : data,
contentType: 'application/json; charset=utf-8',
success : function(data){
if(data == true){
dataTable.draw();
alert("변경되었습니다.");
$('#user-show').modal('hide');
}
}
,error : function(error){
var errorMessages = error.responseJSON.messages;
var firstErrorMessage = Object.values(errorMessages)[0];
alert(firstErrorMessage);
}
});
}
$('#user-show').on('show.bs.modal', function(e) {
var $btn = $(e.relatedTarget);
var id = $btn.attr('id');
$('input[name="user_id"]').val(id);
$.ajax({
type: "get",
url: "<?=base_url()?>/user/get-user",
data: {'user_id': id},
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function(data){
setUserShow(data);
},
error: function(error, status, msg){
alert("상태코드 " + status + "에러메시지" + msg );
}
});
})
.on('hidden.bs.modal', function(e) { //modal Reset
$('input[name="user_id"]').val('');
$('form[name="user-show-form"]')[0].reset();
$('#user-show #usernameText').text('');
$('#user-show #emailText').text('');
$('#user-show #userCreatdeAt').text('');
$('.dp_info td').text('');
$('#groupHide').remove();
});
$('#belongCompany').on("focus", function(){
getSearchCompanies();
})
$('form[name="search-form"]').bind('submit', function() {
dataTable.draw();
return false;
});
$('form[name="user-show-form"]').bind('submit', function() {
var data = $(this).serialize();
updateUser(data);
return false;
});
</script>
<?=$this->endSection();?>
<!--푸터-->
<?=$this->section('footer');?>
<?=$this->endSection();?>