diff --git a/VamPa/src/main/java/com/vam/controller/AdminController.java b/VamPa/src/main/java/com/vam/controller/AdminController.java index 7c675e6..786269c 100644 --- a/VamPa/src/main/java/com/vam/controller/AdminController.java +++ b/VamPa/src/main/java/com/vam/controller/AdminController.java @@ -19,5 +19,31 @@ public class AdminController { logger.info("관리자 페이지 이동"); } + + /* 상품 등록 페이지 접속 */ + @RequestMapping(value = "goodsManage", method = RequestMethod.GET) + public void goodsManageGET() throws Exception{ + logger.info("상품 등록 페이지 접속"); + } + + /* 상품 등록 페이지 접속 */ + @RequestMapping(value = "goodsEnroll", method = RequestMethod.GET) + public void goodsEnrollGET() throws Exception{ + logger.info("상품 등록 페이지 접속"); + } + + /* 작가 등록 페이지 접속 */ + @RequestMapping(value = "authorEnroll", method = RequestMethod.GET) + public void authorEnrollGET() throws Exception{ + logger.info("작가 등록 페이지 접속"); + } + + /* 작가 관리 페이지 접속 */ + @RequestMapping(value = "authorManage", method = RequestMethod.GET) + public void authorManageGET() throws Exception{ + logger.info("작가 관리 페이지 접속"); + } + + } diff --git a/VamPa/src/main/java/com/vam/interceptor/AdminInterceptor.java b/VamPa/src/main/java/com/vam/interceptor/AdminInterceptor.java new file mode 100644 index 0000000..23ca2a8 --- /dev/null +++ b/VamPa/src/main/java/com/vam/interceptor/AdminInterceptor.java @@ -0,0 +1,33 @@ +package com.vam.interceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.web.servlet.HandlerInterceptor; + +import com.vam.model.MemberVO; + +public class AdminInterceptor implements HandlerInterceptor { + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + + HttpSession session = request.getSession(); + + MemberVO lvo = (MemberVO)session.getAttribute("member"); + + if(lvo == null || lvo.getAdminCk() == 0) { // 관리자 계정 아닌 경우 + + response.sendRedirect("/main"); // 메인페이지로 리다이렉트 + + return false; + + } + + return true; // 관리자 계정 로그인 경우(lvo != null && lvo.getAdminCk() == 1) + + } + +} diff --git a/VamPa/src/main/java/com/vam/interceptor/LoginInterceptor.java b/VamPa/src/main/java/com/vam/interceptor/LoginInterceptor.java new file mode 100644 index 0000000..e885c2a --- /dev/null +++ b/VamPa/src/main/java/com/vam/interceptor/LoginInterceptor.java @@ -0,0 +1,25 @@ +package com.vam.interceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.web.servlet.HandlerInterceptor; + + +public class LoginInterceptor implements HandlerInterceptor{ + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + + System.out.println("LoginInterceptor preHandle 작동"); + + HttpSession session = request.getSession(); + + session.invalidate(); + + return true; + } + +} diff --git a/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml index 10166d1..573fff0 100644 --- a/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml +++ b/VamPa/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml @@ -23,6 +23,16 @@ - + + + + + + + + + + + diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp new file mode 100644 index 0000000..c75cb45 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
작가 등록
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp new file mode 100644 index 0000000..bbd48fd --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/authorManage.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
작가 관리
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsEnroll.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsEnroll.jsp new file mode 100644 index 0000000..66c4e6e --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsEnroll.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
상품 등록
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp new file mode 100644 index 0000000..b169b46 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
상품 관리
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/main.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/main.jsp index e625fc8..f78e376 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/admin/main.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/main.jsp @@ -34,36 +34,70 @@
관리자 페이지 입니다.
- - + + + + + + + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/main.jsp b/VamPa/src/main/webapp/WEB-INF/views/main.jsp index 8373d46..6a6702a 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/main.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/main.jsp @@ -47,8 +47,9 @@
+
-

logo area

+

Search area

@@ -80,8 +81,47 @@

content area

-
-
+ + + + + + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
작가 등록
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp new file mode 100644 index 0000000..bbd48fd --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/authorManage.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
작가 관리
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsEnroll.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsEnroll.jsp new file mode 100644 index 0000000..66c4e6e --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsEnroll.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
상품 등록
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp new file mode 100644 index 0000000..b169b46 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp @@ -0,0 +1,103 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + +
+
상품 관리
+
+
+
+ + + + + + +
+
+ + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/main.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/main.jsp index e625fc8..f78e376 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/main.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/main.jsp @@ -34,36 +34,70 @@
관리자 페이지 입니다.
- - + + + + + + + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp index 8373d46..6a6702a 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp @@ -47,8 +47,9 @@
+
-

logo area

+

Search area

@@ -80,8 +81,47 @@

content area

-
-
+ + + + + + + +