File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%--
Class Name : EgovMainView.jsp
Description : 메인화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2011.08.31 JJY 경량환경 버전 생성
author : 실행환경개발팀 JJY
since : 2011.08.31
--%>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="ko" >
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>N-CMS</title>
<script src="<c:url value='/js/jquery.js' />"></script>
<script src="<c:url value='/js/Chart.js' />"></script>
<script src="<c:url value='/js/new_main.js' />"></script>
<script type="text/javascript">
$( document ).ready(function() {
var authority = $("#authority").val();
if(authority == "ROLE_CS"){
var div = document.getElementById("divBady");
while (div.hasChildNodes()) {
$(".fwExtBold").remove();
div.removeChild(div.firstChild);
}
}
//광고담당자 관리자 경우 모든 기능 제거
if(authority == "ROLE_MARKETER"){
$(".plusBtn").remove();
$('div').removeAttr('onclick');
$('a').removeAttr('onclick');
$('a').removeAttr('href');
$('.btnWrap').remove();
$(".listType1").children(":first").remove(); //헤더 회원정보변경 삭제
}
// 관리자 로그관리
getDashBoardAdminLog();
// 어제/오늘 접속현황
getVisitStatInfo();
//최근 게시물
toggleLoadingMask("adminBoardBox", true);
$("#adminBoardListArea").load("/cmm/main/recentBoardAjax.do", function () {
toggleLoadingMask("adminBoardBox", false);
});
//접속통계
toggleLoadingMask("visitStatBox", true);
$("#visitStatsContainer").load("/cmm/main/visitStatsAjax.do", function () {
toggleLoadingMask("visitStatBox", false);
});
//회원 통계
toggleLoadingMask("memberStatsBox", true);
$("#memberStatsContainer").load("/cmm/main/memberStatsAjax.do", function () {
toggleLoadingMask("memberStatsBox", false);
});
//발신번호 통계
toggleLoadingMask("sendNumberStatsBox", true);
$("#sendNumberStatsContainer").load("/cmm/main/sendNumberStatsAjax.do", function () {
toggleLoadingMask("sendNumberStatsBox", false);
});
//일매출액(VAT 포함)
toggleLoadingMask("payDayChartBox", true);
$("#payDayChartBox").load("/cmm/main/payDayChartStatsAjax.do", function () {
toggleLoadingMask("payDayChartBox", false);
});
//월매출액(VAT 포함)
toggleLoadingMask("payMonthChartBox", true);
$("#payMonthChartBox").load("/cmm/main/payMonthChartStatsAjax.do", function () {
toggleLoadingMask("payMonthChartBox", false);
});
//일회원가입자수
toggleLoadingMask("memDayChartBox", true);
$("#memDayChartContainer").load("/cmm/main/memDayChartStatsAjax.do", function () {
toggleLoadingMask("memDayChartBox", false);
});
//월회원가입자수
toggleLoadingMask("memMonthChartBox", true);
$("#memMonthChartBox").load("/cmm/main/memMonthChartStatsAjax.do", function () {
toggleLoadingMask("memMonthChartBox", false);
});
//전송사별 문자발송통계
toggleLoadingMask("agentSmsStatsBox", true);
$("#agentSmsStatsContainer").load("/cmm/main/agentSmsStatsAjax.do", function () {
toggleLoadingMask("agentSmsStatsBox", false);
});
//회원 전환률 통계
toggleLoadingMask("memLoginChartBox", true);
$("#memLoginChartContainer").load("/cmm/main/memLoginDayChartStatsAjax.do", function () {
toggleLoadingMask("memLoginChartBox", false);
});
});
function goSubsession(conUrl , menuNo){
var subsessionFrom = document.subsessionFrom ;
subsessionFrom.conUrl.value = conUrl ;
subsessionFrom.menuNo.value = menuNo ;
subsessionFrom.submit();
}
// 관리자 로그관리
function getDashBoardAdminLog() {
$("#adminLogList").html("");
$.ajax({
type: "POST",
url: "/cmm/main/selectDashBoardAdminLogAjax.do",
data: {},
dataType:'json',
async: true,
success: function (data) {
var jsonList = data.adminLogList;
if (data.isSuccess) {
try {
var sHtml = "";
jsonList.forEach (function (item, idx) {
sHtml += "<tr>";
sHtml += " <td title='" + item.creatDt + "'>" + item.creatDt.substr(5, 11) + "</td>";
sHtml += " <td title='" + item.loginIp + "'>" + item.loginIp + "</td>";
sHtml += " <td title='" + item.menuNm + "'>" + item.menuNm + "</td>";
sHtml += " <td title='" + item.loginNm + "(" + item.loginId + ")'>" + item.loginNm + "</td>";
sHtml += "</tr>";
});
$("#adminLogList").html(sHtml);
} catch (error) {
console.error(error);
}
}
else {
//alert("Msg : " + data.msg);
}
},
error: function (e) {
//alert("ERROR : " + JSON.stringify(e));
}
});
}
//어제/오늘 접속현황
function getVisitStatInfo() {
$.ajax({
type: "POST",
url: "/cmm/main/selectVisitStatInfoAjax.do",
contentType: "application/json",
dataType: "json",
beforeSend: function () {
// 로딩 마스크 표시
toggleLoadingMask("visitStatInfoBox", true);
},
success: function (data) {
if (data.isSuccess) {
$("#adminViewCnt2").text(data.adminViewCnt2 || 0);
$("#adminViewCnt").text(data.adminViewCnt || 0);
$("#userViewCnt2").text(data.userViewCnt2 || 0);
$("#userViewCnt").text(data.userViewCnt || 0);
$("#adminMainNewBoardCnt").text(data.adminMainNewBoardCnt || 0);
$("#adminMainYdaBoardCnt").text(data.adminMainYdaBoardCnt || 0);
}
},
error: function (xhr, status, error) {
console.error("접속현황 로딩 실패:", error);
},
complete: function () {
// 로딩 마스크 제거
toggleLoadingMask("visitStatInfoBox", false);
}
});
}
/**
* 로딩 마스크 토글 함수
* @param {string} targetId - 마스크를 덮을 대상 div의 ID (예: 'visitStatBox')
* @param {boolean} show - true면 표시, false면 숨김
*/
function toggleLoadingMask(targetId, show) {
const $target = $("#" + targetId);
let $mask = $target.find(".loading-mask");
if (show) {
// 마스크가 없으면 생성
if ($mask.length === 0) {
const maskHtml = `
<div class="loading-mask" style="
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
background-color: rgba(255,255,255,0.6);
z-index: 9999;">
<div style="
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;">
<img src="/direct/img/lodingBar.gif" alt="로딩중" style="height: 24px;">
</div>
</div>`;
$target.css("position", "relative").append(maskHtml);
} else {
$mask.show();
}
} else {
$mask.hide();
}
}
</script>
<style type="text/css">
.inline .tType6 {line-height:18px;}
</style>
</head>
<body>
<noscript>자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다.</noscript>
<!-- cont -->
<div class="contWrap dashBoard">
<input id="authority" type="hidden" value="${loginVO.authority}"/>
<form name="subsessionFrom" id="subsessionFrom" method="get" action="/sym/mms/goSubsession.do">
<input name="conUrl" type="hidden" />
<input name="menuNo" type="hidden" />
</form>
<form name="previewForm" method="get" action="<c:url value='/uss/olp/qnn/EgovQustnrRespondInfoManageStatistics.do'/>" >
<input name="qestnrId" type="hidden" />
<input name="qestnrTmplatId" type="hidden" />
<input name="templateUrl" type="hidden" />
<input name="preview" type="hidden" />
</form>
<h2 class="titType2 fwExtBold">DASHBOARD</h2>
<div class="cont" id="divBady">
<div class="box todayStatus todayStatus01">
<div class="boxTitle">
<h3 class="titType2 fwBold" style="padding-right: 10px;">어제/오늘 접속현황</h3>
<span class="tType6 c_b4b4b4">
30분 단위 업데이트
</span>
<input type="button" class="plusBtn" onclick="goMenuPage('81000000', '/uss/umt/user/EgovUserManage.do'); return false;">
</div>
<div class="boxCont" id="visitStatInfoBox">
<ul class="inline">
<li>
<a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do'); return false;"><div class="icon"><img src="/pb/img/dashBoardImg1.png" alt=""></div></a>
<div class="tType6 c_b4b4b4 small_text"><a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do?startDateType=Y'); return false;">어제</a>/<a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do?startDateType=T'); return false;">오늘</a></div>
<p class="tType1 fwExtBold c_222222 large_text">
<%-- <a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do?startDateType=Y'); return false;"><c:if test="${empty adminViewCnt2}">0</c:if><c:if test="${!empty adminViewCnt2}">${adminViewCnt2}</c:if></a>/<a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do?startDateType=T'); return false;"><c:if test="${empty adminViewCnt}">0</c:if><c:if test="${!empty adminViewCnt}">${adminViewCnt}</c:if></a> --%>
<a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do?startDateType=Y'); return false;">
<span id="adminViewCnt2">0</span>
</a>/
<a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do?startDateType=T'); return false;">
<span id="adminViewCnt">0</span>
</a>
</p>
<a href="#" onclick="goMenuPage('82500000', '/sym/log/clg/SelectLoginLogGroupList.do'); return false;"><p class="tType5 c_333333 middle_text" style="padding-bottom:5px;">관리자</p></a>
</li>
<li>
<a href="#" onclick="goMenuPage('5500000', '/sym/log/clg/SelectWebLogList.do'); return false;">
<div class="icon"><img src="/pb/img/dashBoardImg2.png" alt=""></div>
<div class="tType6 c_b4b4b4 small_text">어제/오늘</div>
<p class="tType1 fwExtBold c_222222 large_text">
<%-- <c:if test="${empty userViewCnt2}">0</c:if><c:if test="${!empty userViewCnt2}">${userViewCnt2}</c:if>/<c:if test="${empty userViewCnt}">0</c:if><c:if test="${!empty userViewCnt}">${userViewCnt}</c:if> --%>
<a href="#" onclick="goMenuPage('5500000', '/sym/log/clg/SelectWebLogList.do?startDateType=Y'); return false;">
<span id="userViewCnt2">0</span>
</a>/
<a href="#" onclick="goMenuPage('5500000', '/sym/log/clg/SelectWebLogList.do?startDateType=T'); return false;">
<span id="userViewCnt">0</span>
</a>
</p>
<p class="tType5 c_333333 middle_text" style="padding-bottom:5px;">사용자</p>
<%--<p class="tType6 c_b4b4b4">사용자 로그인</p>--%>
</a>
</li>
<li>
<a href="#" onclick="goMenuPage('81800000', '/cop/bbs/SelectBbsContentsList.do'); return false;">
<div class="icon"><img src="/pb/img/dashBoardImg3.png" alt=""></div>
<div class="tType6 c_b4b4b4 small_text">어제/오늘</div>
<%-- <p class="tType1 fwExtBold c_222222 large_text">${adminMainYdaBoardCnt}/<span <c:if test="${adminMainNewBoardCnt > 0}">style="color:red"</c:if>>${adminMainNewBoardCnt}</span></p> --%>
<p class="tType1 fwExtBold c_222222 large_text">
<span id="adminMainYdaBoardCnt">0</span>
/
<span id="adminMainNewBoardCnt">0</span>
</p>
<p class="tType5 c_333333 middle_text" style="padding-bottom:5px;">새 게시글</p>
<%--<p class="tType6 c_b4b4b4">금일</p>--%>
</a>
</li>
</ul>
</div>
</div>
<div class="box todayStatus todayStatus02" id="memberStatsBox">
<div class="boxTitle">
<h3 class="titType2 fwBold">회원 통계</h3>
<input type="button" class="plusBtn" onclick="goMenuPage('1300000', '/uss/umt/user/EgovGnrlUserManage.do'); return false;">
</div>
<div class="boxCont" id="memberStatsContainer">
</div>
</div>
<div class="box todayStatus todayStatus03" id="sendNumberStatsBox">
<div class="boxTitle">
<h3 class="titType2 fwBold">발신번호 통계</h3>
<input type="button" class="plusBtn" onclick="goMenuPage('6100000', '/uss/ion/msg/SendNumberList.do'); return false;">
</div>
<div class="boxCont" id="sendNumberStatsContainer">
</div>
</div>
<div class="box" id="adminBoardBox">
<div class="boxTitle">
<h3 class="titType2 fwBold">최근 게시물</h3>
<input type="button" class="plusBtn" onclick="goMenuPage('81800000', '/cop/bbs/SelectBbsContentsList.do'); return false;">
</div>
<div class="boxCont">
<table class="tbType1">
<colgroup>
<col style="width: *%;">
<col style="width: 10%;">
<col style="width: 16%;">
<col style="width: 12%;">
</colgroup>
<tbody id="adminBoardListArea">
</tbody>
</table>
</div>
</div>
<div class="box" id="payDayChartBox">
</div>
<div class="box" id="payMonthChartBox">
</div>
<div class="box" id="memDayChartBox">
<div class="boxTitle">
<h3 class="titType2 fwBold">일회원가입자수</h3>
<input type="button" class="plusBtn" onclick="goMenuPage('5900000', '/uss/ion/msg/memDayChart.do'); return false;">
</div>
<div class="boxCont" id="memDayChartContainer" onclick="goMenuPage('5900000', '/uss/ion/msg/memDayChart.do'); return false;">
</div>
</div>
<div class="box" id="memMonthChartBox">
</div>
<div class="box" id="agentSmsStatsBox">
<div class="boxTitle">
<h3 class="titType2 fwBold" style="padding-right: 10px;">전송사별 문자발송통계</h3>
<span class="tType6 c_b4b4b4">
30분 단위 업데이트
</span>
<input type="button" class="plusBtn" onclick="javascript:goMenuPage('51200000', '/uss/ion/msg/MsgSendStatistics.do');">
</div>
<div class="boxCont" id="agentSmsStatsContainer">
</div>
</div>
<div class="box chartBox chartType1" id="visitStatBox">
<div class="boxTitle">
<h3 class="titType2 fwBold" style="padding-right: 10px;">접속통계</h3>
<span class="tType6 c_b4b4b4">
30분 단위 업데이트
</span>
<input type="button" class="plusBtn" onclick="javascript:goMenuPage('51100000', '/sym/log/clg/selectDeviceLogList.do');">
<!-- <input type="button" class="plusBtn"> -->
</div>
<div class="boxCont" id="visitStatsContainer">
</div>
</div>
<div class="box">
<div class="boxTitle">
<h3 class="titType2 fwBold">관리자 로그관리</h3>
<input type="button" class="plusBtn" onclick="javascript:goMenuPage('7910000', '/sym/log/clg/SelectLoginLogList.do');">
</div>
<div class="boxCont">
<table class="tbType1">
<colgroup>
<col style="width: *%">
<col style="width: 27%">
<col style="width: 28%">
<col style="width: 15%">
</colgroup>
<tbody id="adminLogList">
</tbody>
</table>
</div>
</div>
<div class="box" id="memLoginChartBox">
<div class="boxTitle">
<h3 class="titType2 fwBold" style="padding-right:10px;">회원 전환률 통계</h3>
<!-- <span class="tType6 c_b4b4b4">월전환율 : <span class="c_456ded" id="memLoginThisMonth"></span>%</span> -->
<input type="button" class="plusBtn" onclick="goMenuPage('51300000', '/uss/ion/msg/memLoginDayChart.do'); return false;">
</div>
<div class="boxCont" id="memLoginChartContainer" onclick="goMenuPage('51300000', '/uss/ion/msg/memLoginDayChart.do'); return false;">
</div>
</div>
</div>
</div>
<!-- //cont -->
</body>
</html>