▣ admin/include/header.jsp - ▶▶ 장바구니 세션 처리 추가 ◀◀
페이지 정보
본문
<%@ 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="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page import="java.text.SimpleDateFormat"%>
<%
//오늘 날짜
java.util.Date today3 = new java.util.Date();
SimpleDateFormat cal3 = new SimpleDateFormat("yyyyMMddHHmmss");
String signdate3 = cal3.format(today3);
String session_id = (String)session.getAttribute("id");
String str3 = signdate3 + "_" + (String)session.getAttribute("id"); //날짜 + 아이디
String session_cart = (String)session.getAttribute("cart");
if(session_id != null && session_cart == null){ //장바구니 세션 값이 없다면
session.setAttribute("cart", str3);
}
%>
session_cart : <%=session_cart %> || ${sessionScope.cart }
<c:if test="${sessionScope.level != '10' }">
<script>
alert("관리자 영역입니다.");
location.href="/";
</script>
</c:if>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>관리자</title>
<link rel="stylesheet" href="/admin/css/basic.css">
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.4.1.min.js"></script>
</head>
<body>
<table width=100% height=50>
<tr>
<td>
<a href="/admin/">[관리자]</a>
<a href="/">[사용자]</a>
</td>
<td align=center>
<a href="/admin/member/list">[회원관리]</a>
<a href="/admin/bbs/list">[게시판관리]</a>
<a href="/admin/category/list">[분류관리]</a>
<a href="/admin/item/list">[상품관리]</a>
<a href="/admin/cart/list">[장바구니관리]</a>
<a href="/admin/order/list">[주문관리]</a>
...
</td>
<td align=right>
<a href="/member/logout">[로그아웃]</a>
</td>
</tr>
</table>
<hr>
[실행화면]
- 이전글admin/item/view.jsp 23.03.23
- 다음글▣ admin/item/view.jsp - ▶▶ 장바구니 , 바로구매 추가 ◀◀ 23.03.24
댓글목록
등록된 댓글이 없습니다.