admin/item/modify.jsp
페이지 정보
작성자 관리자 작성일 23-03-25 08:07 조회 479 댓글 0본문
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/admin/include/header.jsp" %>
<script>
function cate_2(cate,cate2){
$.ajax({
url: "category_ok", //전송받을 페이지 경로
type: "post", //데이터 읽어오는 방식
dataType: "text", //데이터 방식
data: "ca_id="+cate+"&ca_id2="+cate2, //데이터 변수 전달
error:function(){ //실패일 경우
alert("실패");
},
success:function(text){ //성공일 경우
$("#category2_result").html(text);
}
});
}
cate_2(${item.category1},${item.category2}); //중분류 한번 실행
function item_ok(){
document.submit();
}
</script>
<table width=100% height=50 border=0>
<tr>
<td align=center style="color:#777;font-size:14px;font-weight:bold;">[상품관리]</td>
</tr>
</table>
<center>
<form action="modify" method="post" enctype="multipart/form-data" onsubmit="return item_ok()">
<input type="hidden" name="it_uid" value="${item.it_uid }">
<input type="hidden" name="pageNum" value="${param.pageNum }">
<input type="hidden" name="field" value="${param.field }">
<input type="hidden" name="search" value="${param.search }">
<table width=480 border=0>
<tr>
<td width=160>상품코드</td>
<td height=24><font color=red>${item.it_uid }</font></td>
</tr>
<tr>
<td>카테고리</td>
<td>
<select id="category1" name="category1" onchange="cate_2(this.value)">
<option value="">=대분류 선택=</option>
<c:forEach var="c" items="${v }">
<option value="${c.ca_id }" <c:if test="${item.category1 == c.ca_id }">selected</c:if>>${c.ca_name }</option>
</c:forEach>
</select>
<span id="category2_result">
<select id="category2" name="category2">
<option value="">=대분류를 먼저 선택하세요=</option>
</select>
</span>
</td>
</tr>
<tr>
<td>상품명</td>
<td><input name="it_name" value="${item.it_name }"></td>
</tr>
<tr>
<td>업체 아이디</td>
<td><input name="mb_id" value="${item.mb_id }"></td>
</tr>
<tr>
<td>세일가격</td>
<td><input name="it_sale" value="${item.it_sale }"></td>
</tr>
<tr>
<td>판매가격</td>
<td><input name="it_price" value="${item.it_price }"></td>
</tr>
<tr>
<td>상품 포인트</td>
<td><input id="it_point" name="it_point" value="${item.it_point }"></td>
</tr>
<tr>
<td>상품 수량</td>
<td><input type="number" name="it_qty" value="${item.it_qty }"></td>
</tr>
<tr>
<td>상품 옵션</td>
<td><input name="it_option" value="${item.it_option }"></td>
</tr>
<tr>
<td>판매가능</td>
<td>
<input type="radio" name="it_use" value="Y" <c:if test="${item.it_use == 'Y' }">checked</c:if>>Y
<input type="radio" name="it_use" value="N" <c:if test="${item.it_use == 'N' }">checked</c:if>>N
</td>
</tr>
<tr>
<td>상품 유형</td>
<td>
<input type="checkbox" name="it_type1" value="Y" <c:if test="${item.it_type1 == 'Y' }">checked</c:if>>히트
<input type="checkbox" name="it_type2" value="Y" <c:if test="${item.it_type2 == 'Y' }">checked</c:if>>추천
<input type="checkbox" name="it_type3" value="Y" <c:if test="${item.it_type3 == 'Y' }">checked</c:if>>신상
<input type="checkbox" name="it_type4" value="Y" <c:if test="${item.it_type4 == 'Y' }">checked</c:if>>인기
<input type="checkbox" name="it_type5" value="Y" <c:if test="${item.it_type5 == 'Y' }">checked</c:if>>할인
</td>
</tr>
<tr>
<td>상품 이미지 1</td>
<td>
<input type="file" name="file1">
<c:if test="${item.file1 != ''}"><img src="/upload_item/${item.file1 }" width=30></c:if> ${item.file1 }
</td>
</tr>
<tr>
<td>상품 이미지 2</td>
<td>
<input type="file" name="file2">
<c:if test="${item.file2 != ''}"><img src="/upload_item/${item.file2 }" width=30></c:if> ${item.file2 }
</td>
</tr>
<tr>
<td>상품 이미지 3</td>
<td>
<input type="file" name="file3">
<c:if test="${item.file3 != ''}"><img src="/upload_item/${item.file3 }" width=30></c:if> ${item.file3 }
</td>
</tr>
<tr>
<td>상품 이미지 4</td>
<td>
<input type="file" name="file4">
<c:if test="${item.file4 != ''}"><img src="/upload_item/${item.file4 }" width=30></c:if> ${item.file4 }
</td>
</tr>
<tr>
<td>상품 이미지 5</td>
<td>
<input type="file" name="file5">
<c:if test="${item.file5 != ''}"><img src="/upload_item/${item.file5 }" width=30></c:if> ${item.file5 }
</td>
</tr>
<tr><td colspan=2 height=10></td></tr>
<tr>
<td></td>
<td>
<input type="button" value="목록" onclick="location.href='list?pageNum=${param.pageNum }&field=${param.field}&search=${param.search}'">
<button>상품수정</button>
</td>
</tr>
</table>
</form>
<br>
</center>
<%@ include file="/admin/include/footer.jsp" %>
댓글목록 0
등록된 댓글이 없습니다.