<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/include/tags.jspf" %>
<%
	response.setHeader("pragma","No-cache");
	response.setHeader("Cache-Control","no-cache");
	response.addHeader("Cache-Control","No-store");
	response.setDateHeader("Expires",1L);
%>
<!DOCTYPE html>
<html lang="ko">
<head>
	<meta charset="UTF-8" />
	<!--IE 브라우저 사용 시, 자동 최신모드 설정-->
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<!-- 기기에 맞는 화면을 제공, 스마트폰 배율 1배율 고정, 애플 사파리 11 내용줄임=no -->
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<!-- 제목 / 검색엔진 키워드 / 사이트 요약 / 저작자 / 개발sw -->
	<meta name="title" content="컬러푸드">
	<meta name="keyword" content="jinwoo, clfd">
	<meta name="description" content="jinwoo-clfd">
	<meta name="author" content="Jinwoo Soft Innovation">
	<meta name="generator" content="vscode">
	<title>컬러푸드 시스템</title>
	<!-- 아이콘 API -->
	<script src="https://kit.fontawesome.com/77c164177d.js" crossorigin="anonymous"></script>
	<!-- 캐노니컬(Web,M 페이지를 통합함으로써, 하나의 url로 인식하게함) -->
	<link rel="canonical" href="https://akakro.com/clfd/main.html">
	<!-- 웹폰트 -->
	<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@1.0/nanumsquare.css">

	<link rel="preconnect" href="https://fonts.gstatic.com">
	<link href="https://fonts.googleapis.com/css2?family=Nanum+Gothic&display=swap" rel="stylesheet">
<%--	<link rel="stylesheet" href="/clfd/lib/boostrap/bootstrap-4.6.0-dist/css/bootstrap.min.css" type="text/css">--%>
<%--	<link rel="stylesheet" href="/clfd/lib/boostrap/icons-1.3.0/font/bootstrap-icons.css" type="text/css">--%>
	<link rel="stylesheet" href="/clfd/css/diagnosisMain.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/join/join.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/join/joinCorp.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/clfd_myPage.css?ver=1.0" type="text/css">
	<link rel="stylesheet" href="/clfd/css/dgns/survey.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/dgns/surveyList.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/prod/prodList.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/prod/prodDtl.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/clfd_notice.css" type="text/css">
	<link rel="stylesheet" href="/clfd/css/clfd_reg.css" type="text/css">

	<!-- 파비콘/내부 CSS -->
	<link rel="shortcut icon" href="/clfd/img/clfd_logo50.png">
	<link rel="stylesheet" href="/clfd/css/clfd_reset.css" />
	<link rel="stylesheet" href="/clfd/css/clfd_header.css" />
	<link rel="stylesheet" href="/clfd/css/clfd_footer.css" />
	<link rel="stylesheet" href="/clfd/css/clfd_main.css?ver=1.3" />
	<link rel="stylesheet" href="/clfd/css/clfd_dia.css?ver=1.3" />
	<link rel="stylesheet" href="/clfd/css/clfd_list.css?ver=1.3" />
	<link rel="stylesheet" href="/clfd/css/clfd_product.css?ver=1.4" />
	<link rel="stylesheet" href="/clfd/css/clfd_dtl.css?ver=1.3" />
	<link rel="stylesheet" href="/clfd/css/clfd_res.css?ver=1.3" />
	<link rel="stylesheet" href="/clfd/css/clfd_intro.css?ver=1.1" />

	<script src="/clfd/lib/jquery/jquery-3.5.1/jquery.min.js"></script>
	<script src="/clfd/lib/popper/popper-1.16.1/popper.min.js"></script>
	<script src="/clfd/lib/boostrap/bootstrap-4.6.0-dist/js/bootstrap.min.js"></script>
	<script src="/clfd/lib/lodash/lodash.min.js"></script>
	<script src="/clfd/lib/cleave/cleave.min.js"></script>
	<script src="/clfd/js/utils.js?ver=1.1"></script>
</head>
<script>
	$(document).ready(function() {

		$(window).scroll(function() {
			// top button controll
			if ($(this).scrollTop() > 500) {
				$('#topButton').fadeIn();
			} else {
				$('#topButton').fadeOut();
			}
		});

		$("#topButtonImg").click(function() {
			$('html, body').animate({scrollTop:0}, '300');
		});

	});
</script>
<body>
	<div>
		<div class="headerDiv">
			<tiles:insertAttribute name="header"/>
		</div>
		<div class="contentDiv">
			<tiles:insertAttribute name="content"/>
		</div>
		<div>
			<tiles:insertAttribute name="footer"/>
		</div>
	</div>
	<div id="topButton" style="cursor: pointer"><img src="/clfd/img/top_scroll_btn.png" id="topButtonImg"></div>

	<script>
		var clfdSession = (function () {
			<c:choose>
				<c:when test="${isLogin==true}">
					var login = true;
				</c:when>
				<c:otherwise>
					var login = false;
				</c:otherwise>
			</c:choose>
			return {
				isLogin : function () {
					return login;
				}
			}
		}())
		// 헤더 이미지 오류부분
		var headerLogo = (function () {
			$.ajax({
				url: "/clfd/company/list.json",
				type: "GET",
				dataType: "json",
				success: function (res) {
					if (res.result == "success") {
						let html = "";
						let data = res.data;
						html += "<a href='/clfd/main.do'>";
						if(data.imageDir == null) {
							html += "<img src='/clfd/img/clfd_logo80.png' alt='error'>";
						} else {
							html += "<img src='/clfd/image/";
							html += data.imageDir + "_" + data.companyLogo;
							html += "' alt='error'>";
						}
						html += "</a>";
						$(".navbar__logo").html(html);
						$(".navbar__logo__m").html(html);
					} else {
						alert(res.message);
					}
				}
			})
		}())

		var footerInfo = (function () {
			$.ajax({
				url: "/clfd/company/list.json",
				type: "GET",
				dataType: "json",
				success: function (res) {
					if (res.result == "success") {
						let html = "";
						let data = res.data;
						if(data == null) {
							html += "<p><br> 기업회원가입 : <a href='/clfd/user/joinCorp.do' style='color: #0000ee;'>기업회원으로 가입하기</a><br><br>";
						} else {
							html += "<p><br>";
							html += data.addrM + " " + data.addrD;
							html += " | 대표이사 " + data.ownerName +"<br>";
							html += data.companyNm + " | 사업자 등록번호 : " + clfdUtils.appendHyphenToSaupjaNo(data.saupjaNo);
							html += " | TEL : " + clfdUtils.appendHyphenToFax(data.telNo) + " | FAX : " + clfdUtils.appendHyphenToFax(data.faxNo) + "<br>";
							html += "홈페이지 주소 : <a href='" + data.companySiteUrl +"'>" + data.companySiteUrl +"</a><br><br>";
						}
						html += "&copy; 2021. Jinwoo Soft Innovation Co. all rights reserved.</p><br>";
						$(".fnb-wrapper").html(html);
					} else {
						alert(res.message);
					}
				}
			})
		}())
	</script>
</body>
</html>
