<? 
	//자동 로그인 체크
	include $_SERVER['DOCUMENT_ROOT'].'/common/auto_login_chk.php';

 ?>
<script type="text/javascript" src="<?=JS_PATH?>"></script>

<header>
	<div id="header">
		<h1><a href="/m/">UPRO</a></h1>
		<span id="menu">메뉴보기</span>
	</div>
	<nav>
		<div class="close">메뉴닫기</div>
		
		<!-- 로그인 사용자 후-->
<?
    if(!empty($_SESSION['s_nm_email']) && $_SESSION['s_ds_type'] == "A0"){
?>
		<div class="area_btn">
        
			<a href="/m/sell/sell_step1.php">내차팔기</a>
			<a href="/m/mypage/mypage.php">마이페이지</a>
			<a href="/m/mypage/sell_list.php">입찰내역</a>
		</div>
		<div class="login_user">
			<p><em><?=$_SESSION['s_nm_name']?></em>님 환영합니다. <a href="#" id="logout"><span class="logout">로그아웃</span></a></p>
		</div >
        <!-- 로그인 사용자 끝후-->
<?
	}else if(!empty($_SESSION['s_cd_dealer']) && ($_SESSION['s_ds_type'] == "D0" || $_SESSION['s_ds_type'] == "D1")){
?>		
<!-- 로그인 딜러 후-->
<div class="area_btn">
        
			<a href="/m/mypage/dealer_tender_list.php?ds_status=E0">입찰내역</a>
			<a href="/m/mypage/dealer_tender_list.php?ds_status=F0">입찰중</a>
			<a href="/m/mypage/dealer_tender_list.php?ds_status=Z0">낙찰</a>
		</div>
		<div class="login_user">
			<p><em><?=$_SESSION['s_nm_name']?></em>님 환영합니다. <a href="#" id="logout"><span class="logout">로그아웃</span></a></p>
		</div>
<?
//	}else if(!empty($_SESSION['s_nomem_hp']) && $_SESSION['s_ds_type'] == "C0"){
?>
<?
    }else{
?>
	
    <div class="area_btn">
			<a href="/m/member/login.php">로그인</a>
			<a href="/m/member/join_type.php">회원가입</a>
			<a href="/m/sell/sell_nonmember_search.php">비회원 차량조회</a>
			<a href="/m/member/login_dealer.php">딜러전용</a>
		</div>
    
<?
    }
?>
	
		<ul>
			<li><a href="#">회사소개</a>
				<ul>
					<li><a href="/m/company/greeting.php">- 인사말</a></li>
					<li><a href="/m/company/location.php">- 찾아오시는 길</a></li>
				</ul>
			</li>
<?
    if(empty($_SESSION['s_cd_dealer'])){
?>
			<li><a href="#">내차 팔기</a>
				<ul>
					<li><a href="/m/sell/sell.php">- 내차팔기</a></li>
				</ul>
			</li>
<?
    }
?>
			<li><a href="#">서비스 안내</a>
				<ul>
					<li><a href="/m/service/guide.php">- 이용안내</a></li>
				</ul>
			</li>
			<li><a href="#">고객센터</a>
				<ul>
					<li><a href="/m/customer/faq.php">- 자주묻는 질문</a></li>
					<li><a href="/m/customer/notice_list.php">- 공지사항</a></li>
					<li><a href="/m/customer/inquiry.php">- 1:1 문의</a></li>
				</ul>
			</li>
		</ul>
	</nav>
	<div id="contentLayer"></div>
    <script>
    $(document).ready(function() {
		$("#logout").on("click", function(){
            location.href = "/m/member/login_proc.php?mode=logout";
			return false;
        });
    });
</script>
</header>