<!--#include virtual="/manager/common/file/top_ui.asp"-->
<!--#include file="config.asp"-->
<script type="text/javascript" src="/common/js/04ebook_page.js"></script>
<%



eb_pk	= InputValue(request("eb_pk"))


if is_write <> "Y" Then
	Call back_back("쓰기권한이 없습니다.")
End If

%>

		<!-- 내용영역 -->
		<div id="contents">

			<div id="contents_head"> 
				<div id="contents_title">
					<img src="/manager/img/tit_ic06.gif" width="22" height="21" class="<%=skin%> center" alt="" /> <h1><span>이북 리스트</span></h1>
				</div>
				<div id="location">
					<a href="/manager/" tabindex="<%=getTabIndex()%>">Home</a> &gt; <a href="/manager/content/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> &gt; <a href="list.asp" tabindex="<%=getTabIndex()%>">이북관리</a> &gt; <a href="list.asp" class="now" tabindex="<%=getTabIndex()%>">이북 리스트</a>
				</div>
			</div>

			<!-- 내용들어가는곳 -->
			<div id="contents_area">

					<h2 class="<%=skin%>">현재페이지경로<span class="loc">: <a href="/manager/content/04ebook/list.asp?<%=page_info%>" tabindex="<%=getTabIndex()%>">이북리스트</a>  > <strong class="orange"><%=get_ebsubject(eb_pk)%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size: 880px * 1245px</strong></span></h2>
					
					
					<form id="frm" method="post" enctype="multipart/form-data" action="write_ok.asp" onsubmit="return w_chk();">
					<div>
						<input type="hidden" id="eb_pk" name="eb_pk" value="<%=eb_pk%>" />
					</div>
				
					<div class="write_info">
						<div class="write_form pt7">
							

							<ul>
							<li class="text"><label for="ebp_subject">페이지등록</label> :</li>
							
							<li><input type="text" size="30" title="페이지 입력" id="ebp_subject" name="ebp_subject" class="input_box input" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>

							<li class="text"><label for="ebp_pageimg">이미지</label> :</li>

							<li><input type="file" size="30" title="이미지 등록" id="ebp_pageimg" name="ebp_pageimg" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>

							<li>&nbsp;&nbsp;&nbsp;&nbsp;</li>
							
							<!-- <li><select id="ebp_chk" name="ebp_chk" title="페이지 사용여부 선택" tabindex="<%=getTabIndex()%>">
								<option value="Y" selected="selected">사용</option>
								<option value="N" >중지</option>
							</select></li> -->
							
							<li><div id="<%=skin%>_bt"><span class="button"><input type="submit" value="등록" tabindex="<%=getTabIndex()%>" /></span></div></li>
							
							</ul>

							
						</div>

					</div>

					</form>


					<form id= "frm_list" action="" enctype="multipart/form-data"  method='post' >
					<div>
						<input type="hidden" id="status" name="status" />
						<input type="hidden" id="ebp_chk" name="ebp_chk" />
						<input type="hidden" id="ebp_idx" name="ebp_idx" />
						<input type="hidden" id="eb_pk" name="eb_pk" value="<%=eb_pk%>" />

						<input type="hidden" id="chk_all" name="chk_all" />

					</div>
					
					<fieldset>
						<legend>페이지관리 작성/수정</legend>
						<table cellspacing="0" class="bbs_<%=skin%>" summary="사이트에 사용하는 페이지를 관리합니다.">
						<caption>페이지관리 서식</caption>
						<colgroup>
						<col width="40" />
						<col width="50" />
						<col />
						<col width="250" />
						<col width="70" />
						<col width="50" />
						<col width="50" />
						</colgroup>

						<thead>
						<tr>
							<th scope="col">선택</th>
							<th scope="col">순서</th>
							<th scope="col">페이지</th>
							<th scope="col">이미지</th>
							<th scope="col">사용여부</th>
							<th scope="col">수정</th>
							<th scope="col">삭제</th>
						</tr>
						</thead>

						<tbody>




						<%
						' 테이블 기본 환경설정 ********************************************************************************
						table			= "ebook_page"		' 테이블명
						idx_field		= "ebp_idx"			' 기본키
						oreder_filed	= "ebp_code ASC"	' 정렬기준 필드
						Query_Fields	= "ebp_idx, ebp_subject, ebp_code, ebp_pageimg, ebp_wdate, ebp_mdate, ebp_chk, eb_pk"	' 불러올 필드
						' ****************************************************************************************************

						' ---------------조합 쿼리문------------------------------------
						If v_keyword <> "" then
							search_str = " AND "&v_search&" like '%"&v_keyword&"%'"
						End if

						Query_OrderBy = " ORDER BY "&oreder_filed
						' ---------------------------------------------------------------

						' -----------------------------리스트 출력 쿼리문 생성-----------------------------
						sql = "select "&Query_Fields&" from "&table&" WHERE eb_pk = "&eb_pk&""
						sql = sql & search_str & search_str2 & Query_OrderBy
						Set Rs = Dbcon.Execute (sql)
						If Not rs.eof Then
							vData = rs.getrows()
							vCnt = UBound(vData,2)
						Else
							vCnt = -1
						End If
						rs.close : Set rs = nothing
						' ---------------------------------------------------------------------------------
						


						If vCnt>-1 then
							zz = 1

							For i=0 To vCnt

								' 필드갯수만큼 ($Query_Fields).가지고온다..
								Call arr2Value(Query_Fields, "vData", i)


								If ebp_chk ="Y" then
									ebp_chk_str = "<strong>사용</strong>"
								else
									ebp_chk_str = "중지"
								End If
								
						%>
						<tr>
							<td scope="row" class="center"><input type="checkbox" name="chk" value="<%=ebp_idx%>" title="해당 페이지 선택" tabindex="<%=getTabIndex()%>" /></td>

							<td scope="row" class="center">
								<a href="move.asp?eb_pk=<%=eb_pk%>&amp;move=up&amp;ebp_idx=<%=ebp_idx%>&amp;ebp_code=<%=ebp_code%>" title="순서 위로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_up.gif" width="10" height="9" alt="순서 위로 이동" /></a><a href="move.asp?eb_pk=<%=eb_pk%>&amp;move=down&amp;ebp_idx=<%=ebp_idx%>&amp;ebp_code=<%=ebp_code%>" title="순서 아래로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_down.gif" width="10" height="9" alt="순서 아래로 이동" /></a>
							</td>


							<td scope="row" class="center">
								
								<input type="text" size="30" title="페이지 입력" id="ebp_subject_<%=ebp_idx%>" name="ebp_subject_<%=ebp_idx%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ebp_subject%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
								
								
								
							</td>

							<td scope="row" class="left">
								
								<input type="file" size="20" title="이미지 등록" id="ebp_pageimg_<%=ebp_idx%>" name="ebp_pageimg_<%=ebp_idx%>" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ebp_pageimg%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
								<input type="hidden" id="ebp_pageimg_org_<%=ebp_idx%>" name="ebp_pageimg_org_<%=ebp_idx%>" value="<%=ebp_pageimg%>" />

								

							</td>

							<td scope="row" class="center">
								<%If ebp_pageimg <> "" then%>
									<div class="vam pt5"><img src = "/data/ebook/<%=eb_pk%>/<%=ebp_pageimg%>" width="50" alt="<%=ebp_subject%>" /><br />

									<input type="button" value="이미지삭제" class="ct_bt01" onclick="return d_chk('delete2_ok.asp?eb_pk=<%=eb_pk%>&amp;ebp_idx=<%=ebp_idx%>');"  tabindex="<%=getTabIndex()%>" />
									</div>
								<%End if%>
							</td>


							<td scope="row" class="center"><input type="button" value="수정" class="ct_bt01" onclick="m_chk(<%=ebp_idx%>);" tabindex="<%=getTabIndex()%>" />

							</td>
							<td scope="row" class="center"><input type="button" value="삭제" class="ct_bt01" onclick="return d_chk('delete_ok.asp?eb_pk=<%=eb_pk%>&amp;ebp_idx=<%=ebp_idx%>');"  tabindex="<%=getTabIndex()%>" /></td>
							
						</tr>
						
						<%		
								zz = zz + 1
								num = num - 1
							next
					
				
						else ' 게시할 목록이 없다면
						
						%>

						<tr>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
							<td scope="row" class="center"></td>
						</tr>
						<%
						End if
						%>


						</tbody>
						</table>
					</fieldset>

					<div class="contoll_box2">
						<ul>
						<li><img src="/manager/img/line01.gif" width="36" height="21" alt="" /></li>
						<li class="pt7"><div class="bt01"><a href="javascript:checkAll();" tabindex="<%=getTabIndex()%>"><span>전체 선택/해제</span></a></div><div class="bt01"><a href="javascript:delete2();" tabindex="<%=getTabIndex()%>"><span>선택 페이지삭제</span></a></div></li>
						
						</ul>
					</div>



		
					<div class="contoll_box">
						<div id="<%=skin%>_bt"><span class="button"><input type="button" value="취소" onclick="parent.dialog_close();" tabindex="<%=getTabIndex()%>" /></span></div>
					</div>
					</form>

			</div>
			<!-- 내용들어가는곳 -->

		</div>
		<!-- //내용영역 -->



<!--#include virtual="/manager/common/file/bottom_ui.asp"-->