<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.PreparedStatement" %>
<%@ page import="java.sql.ResultSet" %>
<% request.setCharacterEncoding("utf-8");%>
<%
String id = (String)session.getAttribute("id"); //세션에서 아이디 값 가져오기
String authority = (String)session.getAttribute("authority"); //세션에서 권한값 가져오기

%>
<!DOCTYPE html>
<html>
 <link rel="stylesheet" href="visual.css">
<head>
<title>HOME</title>
</head>
<body>
<table>
<tr>
<td>
	<h2 style="text-align:center; font-size:55px"> Home  </h2>
	
	<%if(session.getAttribute("id")==null){	//로그아웃상태	%>			
		<a href="Home/Login/IdentifyLoginForm.jsp"><input type="button" value="로그인" class="button"></a>
		<a href="Home/NewJoin/IdChk.jsp"><input type="button" value="회원가입" class="button"></a>
	<%} else{	//로그인상태
			if(authority.equals("0")){ //일반 이용자 페이지 authority.equals("0")	%>
				<a href="list.jsp"><input type="button" value="회원목록" class="button"></a>
				<a href="User/MyInformation/MyInformation.jsp"><input type="button" value="내 정보" class="button"></a>
				<a href="User/delete/deleteForm.jsp"><input type="button" value="회원탈퇴" class="button"></a>
				<a href="logout.jsp"><input type="button" value="로그아웃" class="button"></a>	
			<%} else{ //관리자 페이지 %>
				<h1 style="text-align:center; font-size:20px">관리자 페이지</h1>
					<a href="list.jsp"><input type="button" value="회원관리" class="button"></a>
					<a href="logout.jsp"><input type="button" value="로그아웃" class="button"></a>
	<%}	}%>
		
	</td>
	</tr>
	</table>
	
	
	
</body>
</html>

