<%@page import="user.UserDAO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>TKmall</title>
<style>
        /* 스타일링을 위한 CSS 코드 */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }
        header {
            background-color: white;
            color: white;
            padding: 7px;
            text-align: right;
        }
        header a {
            color: #000;
            text-decoration: none;
            margin-left: 8px;
            font-size: 10px;
        }
    </style>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
</head>
<body>
	<% 
	String ID = null;
	if (session.getAttribute("ID") != null) {
		ID = (String) session.getAttribute("ID");
	}
	
	int USER_TYPE = 1;
	UserDAO u = new UserDAO();
	USER_TYPE = u.fmanager(ID);
	
	String NAME = null;
	NAME = u.yourname(ID);
	%>
	<!-- 위의 헤더 -->
	<header>
	    <!-- 로그인 여부에 따라 다르게 표시 -->
	    <% if(USER_TYPE != 0) { %>
	     	PrintWriter script = response.getWriter();
			script.println("<script>");
			script.println("alert('올바르지 못한 접근.')");
			script.println("location.href = 'main.jsp'");
			script.println("</script>");
	     <%} else { %>
	    
	    <a href="main.jsp">관리자</a>
	    <a href="logoutAction.jsp">로그아웃</a>
	    <a href="site.jsp">사이트 관리</a>
	    <%} %>
	    &nbsp;&nbsp;&nbsp;
	</header>
	
	<!-- 로고와 검색창 -->
	<div class="container">
    	<div class="row align-items-center flex-row">
    	<!-- align-items-center은 로고와 검색창 위아래정렬 flex-row는 검색 단어 가로쓰기 변경-->
        	<div class="col-md-2">
            	<!-- 상위구획 1 : 로고 -->
            	<button type="button" class="btn" style="background-color: transparent; border: none;" onclick="location.href='main.jsp'">
            		<img src="./base/base_lo.png" class="img-fluid" alt="로고 이미지 손상">
          		</button>
        	</div>
        	<div class="col-md-1">
            	<!-- 상위구획 2 : 빈 공간 -->
            
        	</div>
        	<div class="col-md-6">
            	<!-- 상위구획 3 : 검색창 공간 없음-->
            	
      				</button>
    			</form>
        	</div>
        	<div class="col-md-3">
            	<!-- 상위구획 2 : 빈 공간 -->
            
        	</div>
    	</div>
	</div>
	<br>
	<!-- 로그인공간 -->
	
	<div class="container">
	    <div class="row align-items-center flex-row">
	    	<div class="col-md-3">
	            <!-- 빈 공간 -->
	            
	        </div>
	        <div class="col-md-6" style="border-radius: 8px; border: 1px solid #dddddd; padding: 3px;">
				<div class="container">
			<div class="jumbotron" style="padding-top: 20px;">
					<h3 style="text-align: center;">관리 선택</h3>
					<hr>
					
					<div class="container">
					<div class="row align-items-center flex-row">
					<div class="col-md-1">
					</div>
					<div class="col-md-10">
  						<a href="userManage.jsp" type="button" class="btn btn-outline-primary w-100">회원 관리</a>
  					</div>
					<div class="col-md-1">
					</div>
					<div class="col-md-12"> &nbsp
					</div>
					<div class="col-md-1">
					</div>
					<div class="col-md-10">
  						<a href="userManage.jsp" type="button" class="btn btn-outline-primary w-100">상품 관리</a>
  					</div>
  					<div class="col-md-1">
					</div>
					<div class="col-md-12"> &nbsp
					</div>
					<div class="col-md-1">
					</div>
					<div class="col-md-10">
  						<a href="userManage.jsp" type="button" class="btn btn-outline-primary w-100">주문 관리</a>
  					</div>
  					<div class="col-md-1">
					</div>
					<div class="col-md-12"> &nbsp
					</div>
					<div class="col-md-1">
					</div>
					<div class="col-md-10">
  						<a href="userManage.jsp" type="button" class="btn btn-outline-primary w-100">매출 확인</a>
  					</div>
  					<div class="col-md-1">
					</div>
  						</div>
					</div>
				<h6 style="text-align: center;">
				</h6>
				</div>
			</div>
			</div>
			<div class="col-md-3">
	            <!-- 빈 공간 -->
	            
	        </div>
	    </div>
	</div>
	
	
	
	
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</body>
</html>