<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" 	uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %><!--시큐리티 태그 라이브러리 선언-->
<%@ taglib prefix="fn" 	uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<c:set var="tilesURI" value="${requestScope['javax.servlet.forward.request_uri']}"/>
<c:set var="tilesURIParam"	value="${requestScope['javax.servlet.forward.query_string']}"/>

<sec:authorize access="hasRole('ROLE_USER')">
  <nav class="common_nav">
    <div class="header_menu">
      <ul>
        <li <c:if test="${thisURL eq '/map/request'}">class="thisOn"</c:if> onclick="location.href='/map/request'">지도사용 요청</li>
        <li <c:if test="${thisURL eq '/map/userInfo'}">class="thisOn"</c:if> onclick="location.href='/map/userInfo'">회원정보수정</li>
      </ul>
    </div>
  </nav>
</sec:authorize>
<sec:authorize access="hasRole('ROLE_ADMIN')">
  <nav class="common_nav">
    <div class="header_menu ms-2">
      <ul>
        <li <c:if test="${fn:contains(thisURL, '/dashBoard')}">class="thisOn"</c:if> onclick="location.href='/admin/dashBoard'">
          <img src="/images/icon/icon_dashboard_on.png" width="30" height="30" alt=""> &nbsp;대시보드</li>
        <li <c:if test="${fn:contains(thisURL, '/request')}">class="thisOn"</c:if> onclick="location.href='/admin/request'">
          <img src="/images/icon/icon_map_on.png" width="30" height="30" alt=""> &nbsp;지도사용 요청</li>
        <li <c:if test="${fn:contains(thisURL, '/history')}">class="thisOn"</c:if> onclick="location.href='/admin/history'">
          <img src="/images/icon/icon_log_on.png" width="30" height="30" alt=""> &nbsp;지도사용 이력</li>
        <li <c:if test="${fn:contains(thisURL, '/fieldData')}">class="thisOn"</c:if> onclick="location.href='/admin/fieldData'">
          <img src="/images/icon/icon_eq_on.png" width="30" height="30" alt=""> &nbsp;현장수집 데이터</li>
        <li <c:if test="${fn:contains(thisURL, '/userInfo')}">class="thisOn"</c:if> onclick="location.href='/admin/userInfo?auth=99'">
          <img src="/images/icon/icon_supervisor_on.png" width="30" height="30" alt=""> &nbsp;회원 관리</li>
      </ul>
    </div>
  </nav>
</sec:authorize>