Closed Berry-G closed 1 year ago
<c:set var="islogin" value="${sessionScope.id != null}" />
<c:choose>
<c:when test="${ islogin == true }">
<!-- 로그인 세션이 있을 시 출력되는 부분 -->
<div class="navbar-nav d-flex" style="justify-content: center; flex-wrap: nowrap;">
<script type="text/javascript" charset="utf-8" src="/ycc/resources/js/timeoutchk.js"></script>
<button class="btn btn-outline-success btn-sm me-2 hover-timer" style="white-space: nowrap;"
onclick="javascript:refreshTimer()"><span id="timer"></span>
<p class="mb-0"></p>
</button>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
${sessionScope.name} 님!</button>
<ul class="dropdown-menu dropdown-menu-lg-end">
<li><button class="dropdown-item" type="button"
onclick="location.href='/ycc/mypage/pwcheck'">마이페이지</button></li>
<li><button class="dropdown-item" type="button" onclick="location.href='/ycc/mypage/mycourse'">나의
수강목록</button></li>
<li><button class="dropdown-item" type="button" onclick="location.href='/ycc/mypage/inquiry'">나의
문의내역</button></li>
<!-- 관리자 일떄 접근 가능한 관리자 페이지 버튼 -->
<c:if test="${sessionScope.grade=='관리자'}">
<li>
<hr class="dropdown-divider">
</li>
<li><button class="dropdown-item" type="button" onclick="location.href='/ycc/admin'">관리자
페이지</button></li>
</c:if>
<li>
<hr class="dropdown-divider">
</li>
<li><button class="dropdown-item dropdown-item-danger" type="button"
onclick="location.href='/ycc/logout'">로그아웃</button></li>
</ul>
</div>
</div>
</c:when>
<c:when test="${ islogin == false }">
<!-- 로그인 세션이 없을 떄 출력되는 부분 -->
<div class="nav p-2 d-flex" style="justify-content: center; flex-wrap: nowrap;">
<a class="btn btn-primary mx-2 text-nowrap" href="/ycc/login">로그인</a>
<a class="btn btn-outline-primary text-nowrap" href="/ycc/signin/agree">회원가입</a>
</div>
</c:when>
</c:choose>
커밋 완료
문제 상황
해결방안