<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %>

<script type="text/javascript" src="IDC/js/left_menu.js"></script>
<link href="IDC/css/left_menu.css" media="screen" rel="stylesheet" type="text/css" />

<script type="text/javascript">
$(function()
{
	$(document).ready(function()
	{
		if(($("#idc").val()=="") && $("#inLogin").attr("name")==null)
		{
			window.location="IdcLoginForm.main";
			alert("로그인하세요");
		}
	});
	//권한설정 3
	$("#a_non").click(function()
	{
		if($("#p3").val()!="o")
		{
			alert("권한이 없습니다. 관리자에게 문의하세요.")
			return;
		}
		var url = $(this).attr("url");
		window.location=url;
	});
	
	//권한설정 3
	$("#a_reSend").click(function()
	{
		if($("#p3").val()!="o")
		{
			alert("권한이 없습니다. 관리자에게 문의하세요.")
			return;
		}
		var url = $(this).attr("url");
		window.location=url;
	});
	
	//권한설정 4
	$("#a_dep").click(function()
	{
		if($("#p4").val()!="o")
		{
			alert("권한이 없습니다. 관리자에게 문의하세요.")
			return;
		}
		var url = $(this).attr("url");
		window.location=url;
	});
	
	//권한설정 10
	$("#a_gear").click(function()
	{
		if($("#p10").val()!="o")
		{
			alert("권한이 없습니다. 관리자에게 문의하세요.")
			return;
		}
		var url = $(this).attr("url");
		window.location=url;
	});
	$("#totSearchBtn").click(function()
	{
		if($("#totSearchContent").val()=="")
			alert("검색어를 입력해 주십시오");
		else
			$("#totSearchForm").attr("action","IdcTotalSearchForm.main").submit();
	});
	
	$("#totSearchContent").focusin(function(){
		$("#focus_flag").val("o");
	});
	
	$("#totSearchContent").focusout(function(){
		$("#focus_flag").val("x");
	});
	
	function trim(str){ 
	  return this.replace(/(^\s*)|(\s*$)/gi, ""); 
	}
	
	$("#totSearchContent").keypress(function(event){
		var focus_flag = $("#focus_flag").val();		
		 if(event.keyCode == 13 && focus_flag == "o"){
			 if($("#totSearchContent").val()==""){
				alert("검색어를 입력해 주십시오");
			 }else{
				 
				$("#totSearchForm").attr("action","IdcTotalSearchForm.main").submit();
			 }
		 }
	});
	
	
});

//사이트 Logo 출력용
function getSiteID(){
	switch(location.hostname){
	   case 'dbms.prime-idc.jp':
		   return 'PrimeIDC';
		   break;
       case 'dbms.itsolution-idc.jp':
    	   return 'ITSolution';
           break;
       case 'dbms.gdidc.jp':
    	   return 'GDIDC';
           break;
       default:
    	   alert("getSiteID 오류:"+location.hostname);
           return false;
    	   break;
	}
};
//사이트 메일 출력용
function getSiteSupport(){
    switch(location.hostname){
       case 'dbms.prime-idc.jp':
    	   return 'support@prime-idc.jp';
           break;
       case 'dbms.itsolution-idc.jp':
    	   return 'support@itsolution-idc.jp';
           break;
       case 'dbms.gdidc.jp':
    	   return 'support@gdidc.jp';
           break;
       default:
    	   alert("getSiteSupport 오류:"+location.hostname);
           return false;
           break;
    }
};
//입금은행 출력용
function getSiteBank(){
    switch(location.hostname){
       case 'dbms.prime-idc.jp':
           return '<select name="deposit_bank" id="deposit_bank"><option value="우리">우리</option><option value="농협">농협</option><option value="신한">신한</option><option value="PRIMEIDC">작업용 입금의 경우 Primeidc</option></select>';
           break;
       case 'dbms.itsolution-idc.jp':
           return '<select name="deposit_bank" id="deposit_bank"><option value="우리">우리</option><option value="새마을">새마을</option><option value="농협">농협</option><option value="국민">국민</option><option value="ITSOLUTION">작업용 입금의 경우 Itsolution</option></select>';
           break;
       case 'dbms.gdidc.jp':
           return '<select name="deposit_bank" id="deposit_bank"><option value="우리">우리</option><option value="GDIDC">작업용 입금의 경우 GDIDC</option></select>';
           break;
       default:
    	   alert("getSiteBank 오류:"+location.hostname);
           return false;
           break;
    }
    
};

//Loading이 완료후 필요한 작업 실행용
window.onload = function(){
	site_id = getSiteID();
	site_support = getSiteSupport();
	site_bank = getSiteBank();
	
	if(document.getElementById('SiteLogo')){
		document.getElementById('SiteLogo').innerHTML=site_id;
	}
	if(document.getElementById('SiteSupport')){
		document.getElementById('SiteSupport').innerHTML=site_support;
	    document.getElementById('SiteSupportTitle').innerHTML=site_id;
	}
	if(document.getElementById('SiteBank')){
		document.getElementById('SiteBank').innerHTML=site_bank;
    }
}
</script>

<style>
@media screen and (max-width:770px) {
  	.menu_hidden{
          visibility: hidden;  
	}		
}	
</style>

<input type="hidden" class="btn btn-danger btn-outline" id="idc" temp="temp" value="${member.id }">
<input type="hidden" id="focus_flag" value="x"/>
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="DefaultPage.cli">
		<span class=text-primary style="font-weight:600; font-size:23px;"><span  id="SiteLogo"></span> DBMS</span>
	</a>
<style>
#mkbutton {
    width: 85%;
}
#mkbutton2 {
    margin: 10px 0 0 200px ;
}
#mk_all_total {
	/*margin : 54px 0 0 230px;*/
	margin : 15px 0 0 450px;
	position: fixed;
	
}
#mkquick {
	margin : 500px 0 0 5px;
	position: fixed;
	
}    

#toTop
{
        z-index:1030;
	width: 100px;
	border: 2px solid #f7f7f7;
	background: #f7f7f7;
	text-align: center;
	position: fixed;
	bottom: 80px;
	right: -35px;
	cursor: pointer;
	display: none;
	color: #333;
	opacity: 0.6;
	filter: alpha(opacity=60);
	-webkit-border-radius: 20px;
	-moz-border-radius: 20px;
	-o-border-radius: 20px;
	border-radius: 10px;
	-webkit-transition: all .25s linear;
	-moz-transition: all .25s linear;
	-o-transition: all .25s linear;
	transition: all .25s linear;
	padding: 3px;
}
#toTop:hover
{
	background: #b3b3b3;
	border: 2px solid #b3b3b3;
} 
#toBottom
{
        z-index:1020;
	width: 100px;
	border: 2px solid #f7f7f7;
	background: #f7f7f7;
	text-align: center;
	position: fixed;
	bottom: 10px;
	right: -35px;
	cursor: pointer;
	display: none;
	color: #333;
	opacity: 0.6;
	filter: alpha(opacity=60);
	-webkit-border-radius: 20px;
	-moz-border-radius: 20px;
	-o-border-radius: 20px;
	border-radius: 10px;
	-webkit-transition: all .25s linear;
	-moz-transition: all .25s linear;
	-o-transition: all .25s linear;
	transition: all .25s linear;
	padding: 3px;
}
#toBottom:hover
{
	background: #b3b3b3;
	border: 2px solid #b3b3b3;
} 

</style>
<script>
$(document).ready(function(){
	 $('body').append('<div id="toTop"><i class="fa fa-angle-double-up fa-4x"></i></div>');
         $("#toTop").bind("click", function () {$("body").animate({ scrollTop: 0 }, 200);});
		$(window).scroll(function () {
			if ($(this).scrollTop() != 0) {
				$('#toTop').fadeIn();
			} else {
				$('#toTop').fadeOut();
			}
		});   
});    

$(document).ready(function(){
	 $('body').append('<div id="toBottom"><i class="fa fa-angle-double-down fa-4x"></i></div>');
        $("#toBottom").bind("click", function () {$("body").animate({ scrollTop: 200000 }, 200);});
		$(window).scroll(function () {
			if ($(this).scrollTop() != 0) {
				$('#toBottom').fadeIn();
			} else {
				$('#toBottom').fadeIn();
			}
		});   
}); 
</script> 

	
<!-- <div id="mkquick"><a href="#mk_quick">TOP</a></div> -->
      	<form method="GET" id="totSearchForm">
           <div class="input-group custom-search-form" id="mkbutton2">
               <input type="text" class="form-control" name="totSearchContent" placeholder=" 고객명검색" id="totSearchContent">
               <span class="input-group-btn" id="mkbutton">
                <button class="btn btn-default" type="button" id="totSearchBtn">
                    <i class="fa fa-search"></i>
                </button>
           	</span>
           </div>
         </form>
         <!-- /input-group -->
     </div>               	

    <div id="mk_all_total">
    <style>
    #mk_all_total input[type=text] {padding:2px; border:1px solid #ccc;-webkit-border-radius: 5px;border-radius: 5px;}
	#mk_all_total input[type=text]:focus {border-color:#333; }
	#mk_all_total input[type=submit] {padding:2px 15px; background:#ccc; border:0 none;cursor:pointer;-webkit-border-radius: 5px;border-radius: 5px;border:1px solid black; }
    </style>
<form action="serviceList.sev?view_state=servicetList" method="get">
<input type=hidden name=filter value=mk_all>
<input type="text" name="searchContextService"  placeholder=" IP/장비명/기타 검색"  value="${searchContextService }">
<input type="submit" value=전체검색 style="">
</form>    
    </div>
    <script type='text/javascript'>
    /*
	google.load( 'webfont', '1' );
	google.setOnLoadCallback(function() {
 	WebFont.load({ custom: {
  	families: [ 'NanumGothic' ],
  	urls: [ 'http://foridcjp.com/css/webfont.css' ]
 	}});
	});
	*/
	</script>
    <style>
    #mk_quick_link {
	/*margin : 54px 0 0 230px;*/
	margin : 15px 0 0 710px;
	position: fixed;
	font-family: 'NanumGothic';
	}
.table-ul2 {background-color: gray;display: table;table-layout: fixed;text-align: center;width: 65%;}
.table-ul2 li {margin:0px 0px 0px 0px;border-right: 1px solid #fff;display: table-cell;vertical-align: middle;height: 26px;}
.table-ul2 li:last-child {border-left: 0px;}
.table-ul2 li a {color: #fff;display: block;font-size: 13px;text-decoration: none;}
.table-ul2 li:hover {background-color:#24a2e0;color: #fff;}

	body {font-family: 'NanumGothic';}
    </style>
    <div id="mk_quick_link">
<!--  <a href="/serviceList.sev">서비스정보</a> - 
    <a href="/vpcInfo.sev">CS정보</a> -
    <a href="/usableServerList.ser">가용장비</a> -
    <a href="http://foridcjp.com" target="_blank">도메인포워딩</a>  -
    <a href="${phpurl}/ipsearch.php">DB검색(IP)</a> -
    <a href="https://docs.google.com/spreadsheets/d/1XiXBJIuHMjU-VVmZBums6RmywuxSpTaluBYrM6hqh6w/edit#gid=0" target="_blank">업무일지</a> -
    <a href="https://ap-northeast-1.console.aws.amazon.com/ec2/v2/home?region=ap-northeast-1#Instances:sort=Name" target="_blank">AWS</a> -
    <a href="https://amp.blacklotus.net/page?id=security_status" target="_blank">BL(AMP)</a>
 -->   

    <ul class="table-ul2">
		<li><a href="/serviceList.sev">서비스정보</a></li>
		<li><a href="/vpcInfo.sev">CS정보</a></li>
		<li><a href="/usableServerList.ser">가용장비</a></li>
		<li><a href="http://foridcjp.com" target="_blank">도메인포워딩</a></li>
    	<li><a href="${phpurl}/ipsearch.php">DB검색(IP)</a></li>
    	<li><a href="https://docs.google.com/spreadsheets/d/1XiXBJIuHMjU-VVmZBums6RmywuxSpTaluBYrM6hqh6w/edit#gid=0" target="_blank">업무일지</a></li>
    	<li><a href="https://ap-northeast-1.console.aws.amazon.com/ec2/v2/home?region=ap-northeast-1#Instances:sort=Name" target="_blank">AWS</a></li>
    	<li><a href="https://amp.blacklotus.net/page?id=security_status" target="_blank">BL(AMP)</a></li>
	</ul>
    
    </div>
    <!-- /.navbar-header -->

    <ul class="nav navbar-top-links navbar-right">
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                <i class="fa fa-bell fa-fw"></i> 신규 <i class="fa fa-caret-down"></i>
            </a>
            <ul class="dropdown-menu dropdown-alerts">
                <li>
                    <a href="#">
                        <div>
                            <a href="/IdcClientDBWriteForm.cli" style="text-decoration: none;"><i class="fa fa-comment fa-fw"></i> 신규 고객 등록</a>
                            <!-- <span class="pull-right text-muted small">-</span> -->
                        </div>
                    </a>
                </li>
                <li class="divider"></li>
                <li>
                    <a href="#">
                        <div>
                            <a href="/usableServerList.ser" style="text-decoration: none;"><i class="fa fa-twitter fa-fw"></i> 가용 장비 현황</a>
                            <!--<span class="pull-right text-muted small">12 minutes ago</span>-->
                        </div>
                    </a>
                </li>
                                      
                <!-- 
                <li class="divider"></li>
                <li>
                    <a href="#">
                        <div>
                            <i class="fa fa-tasks fa-fw"></i> 업무전달사항
                            <span class="pull-right text-muted small">4 minutes ago</span>
                        </div>
                    </a>
                </li>
                <li class="divider"></li>
                <li>
                    <a href="#">
                        <div>
                            <i class="fa fa-upload fa-fw"></i> 미처리요청업무
                            <span class="pull-right text-muted small">4 minutes ago</span>
                        </div>
                    </a>
                </li>
                 -->
                 <li class="divider"></li>
            </ul>
            <!-- /.dropdown-alerts -->
        </li>
        
        <!-- /.dropdown -->
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
            </a>
            <ul class="dropdown-menu dropdown-user">
                	<c:choose>
                		<c:when test="${member.id!=null }">
			                <li><a href="#"><i class="fa fa-user fa-fw"></i> ${member.name } ${member.rank }</a>
			                </li>
			                	<li><a href="IdcMemberModifyForm.main"><i class="fa fa-gear fa-fw"></i> 내 정보수정</a>
			                </li>
			                <li> <a href="/boardSearch.bor?searchOption=name&searchWord=${member.name }"><i class="fa fa-gear fa-fw"></i> 개인게시판</a> </li>
			                <li class="divider"></li>
		                	<li><a href="IdcLogout.main"><i class="fa fa-sign-out fa-fw"></i> 로그아웃</a>
                		</c:when>
                		<c:otherwise>
                			<li><a href="IdcLoginForm.main"><i class="fa fa-sign-out fa-fw"></i> 로그인</a>
                		</c:otherwise>
                	</c:choose>
            </ul>
            <!-- /.dropdown-user -->
          </li>
        <!-- /.dropdown -->
    </ul>
    <!-- /.navbar-top-links -->
    <div class="navbar-default sidebar"  role="navigation"  style="position: absolute;">
        <div class="sidebar-nav navbar-collapse">
<div class="menu_button menu_hidden"  style="position: absolute;  left: 220px; height: 180px; width: 25px; cursor: ew-resize; border-radius: 0px 5px 5px 0px; border: #e7e7e7 1px solid; background-color: #eeeeee;">
<div class="text_ch text-center " style="padding-top: 20px;">메뉴열기</div>
</div>
            <ul class="nav" id="side-menu">
                <li><a class="active" href="DefaultPage.cli"><i class="fa fa-home fa-fw"></i> Main</a></li>
                <li><a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> 장비 관리 <span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li><a href="serverWriteForm.ser">신규 장비 등록</a></li>
                        <li><a href="serverList.ser">전체 장비 목록</a></li>
                        <li><a href="usableServerList.ser">가용 장비 현황</a></li>
                    </ul>
                </li>
                <li><a href="#"><i class="fa fa-users fa-fw"></i> 고객 관리 <span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li><a href="IdcClientDBWriteForm.cli">신규 고객 등록</a></li>
                        <li><a href="IdcClientDBList.cli">고객 리스트</a></li>
                    </ul>
                </li>
				<li><a href="#"><i class="fa fa-desktop fa-fw"></i> 서비스 관리<span class="fa arrow"></span></a>
					<ul class="nav nav-second-level">
						<li><a href="serviceList.sev">서비스 정보</a></li> 
						<li><a href="vpcInfo.sev?referer=">CS 정보</a></li>
						<li> <a href="deffenceInfo.sev">방어 라인 정보</a> </li>
						<li><a href="etcList.sev">부가 서비스</a></li>
						<li><a href="${phpurl}/dotdefender_list.php"  target="_blank">닷디펜더</a></li>
						<li><a href="${phpurl}/deepfinder_list.php" target="_blank">딥파인더</a></li>
						</ul>
				</li>
				<li><a href="IdcCouponListMK.cup">도메인 쿠폰 정보</a>
					<ul class="nav nav-second-level"></ul>
                </li>
                <li><a href="#"><i class="fa fa-calculator fa-fw"></i> 과금관리<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li><a id="a_non" href="IdcDepositNonPaymentListMK.dep">미납리스트</a></li>
                        <li><a id="a_dep" href="IdcDepositList.dep">입금리스트</a></li>
                        <li><a href="#">고객별통계</a>
                            <ul class="nav nav-third-level">
					    		<li><a href="IdcWeeklyNonpayment.dep">주간 및 월간 미납리스트</a></li>
					    		<li><a href="IdcDetailList.dep">15일간 내역리스트</a></li>					    		
					    	</ul>
                        </li>
                        <li><a id="a_reSend" href="IdcReSendMailList.dep">보낸 청구서</a></li>
                    </ul>
                </li>
  				<li><a href="#"><i class="fa fa-line-chart fa-fw"></i> IP관리 <span class="fa arrow"></span></a>
                      <ul class="nav nav-second-level">
                          <li><a href="IdcLineWriteForm.lin">회선 등록</a></li>
                          <li><a href="IdcIPListForm.lin">IP 리스트</a></li>
                           <li><a href="IdcLineListForm.lin">회선 정보</a></li>
                      </ul>
				</li>
				<li><a href="IdcShareBoardListForm.main"><i class="fa fa-save fa-fw"></i> 공동자료실</a></li>
				<li><a href="#"><i class="fa fa-line-chart fa-fw"></i> 통계 <span class="fa arrow"></span></a>
                      <ul class="nav nav-second-level">
                         <li><a href="IdcClientAllServerList.cli">전체 서버 현황</a></li>
                      </ul>
				</li>
				<li><a href="#"><i class="fa fa-tasks fa-fw"></i> My Page <span class="fa arrow"></span></a>
                     <ul class="nav nav-second-level">
                         <li><a href="boardSearch.bor?searchOption=name&searchWord=${member.name }">개인게시판</a></li>
                         <li><a href="commentList.cm#receive">메세지</a></li>
                     </ul>
				</li>
				<c:if test="${member.power==1 }">
				<li><a href="#"><i class="fa fa-line-chart fa-fw"></i> 환경 설정<span class="fa arrow"></span></a>
                      <ul class="nav nav-second-level">
                        <li><a href="IdcMemberListForm.main">권한설정</a></li>
                      </ul>
				</li>
				</c:if>
              </ul>
          </div>
          <!-- /.sidebar-collapse -->
    </div>
    <!-- /.navbar-static-side -->
</nav>
<!-- hidden 공간 -->
<input type="hidden" id="p1" value="${member.power1 }"><input type="hidden" id="p2" value="${member.power2 }"><input type="hidden" id="p3" value="${member.power3 }">
<input type="hidden" id="p4" value="${member.power4 }"><input type="hidden" id="p5" value="${member.power5 }"><input type="hidden" id="p6" value="${member.power6 }">
<input type="hidden" id="p7" value="${member.power7 }"><input type="hidden" id="p8" value="${member.power8 }"><input type="hidden" id="p9" value="${member.power9 }">
<input type="hidden" id="p10" value="${member.power10 }">
