최초등록
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<%
|
||||
|
||||
' security_ad_cms(); ' 관리자페이지 접속권한 체크
|
||||
|
||||
' 권한정보 *************************************************************************************
|
||||
is_ad_cms = "Y"
|
||||
is_read = "Y"
|
||||
is_write = "Y"
|
||||
is_delete = "Y"
|
||||
is_reply = "Y"
|
||||
' **************************************************************************************************
|
||||
%>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<!--#include file = "config.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
eb_pk = InputValue(request("eb_pk"))
|
||||
ebp_idx = InputValue(request("ebp_idx"))
|
||||
|
||||
|
||||
sql = "Select ebp_pageimg from ebook_page where ebp_idx="&ebp_idx
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
ebp_pageimg = rs("ebp_pageimg")
|
||||
rs.close : Set rs = nothing
|
||||
|
||||
|
||||
|
||||
If ebp_pageimg <> "" then
|
||||
|
||||
rootPath = server.MapPath("/")
|
||||
|
||||
' 이미지 삭제
|
||||
strDir = rootPath & "\data\ebook\"&eb_pk&"\"
|
||||
strDir2 = rootPath & "\data\ebook\"&eb_pk&"\middle\"
|
||||
strDir3 = rootPath & "\data\ebook\"&eb_pk&"\small\"
|
||||
|
||||
Call dfile( strDir, ebp_pageimg)
|
||||
Call dfile( strDir2, ebp_pageimg)
|
||||
Call dfile( strDir3, ebp_pageimg)
|
||||
|
||||
|
||||
ebp_pageimg = ""
|
||||
|
||||
End if
|
||||
|
||||
|
||||
R_Fields = "ebp_mdate, ebp_pageimg"
|
||||
ebp_mdate = getDateFm(now,3)
|
||||
Call UpdateQuery (R_Fields, "ebook_page", "where ebp_idx="&ebp_idx)
|
||||
|
||||
Dbcon.close : Set Dbcon = nothing
|
||||
|
||||
ok_url = "write.asp?eb_pk="&eb_pk
|
||||
Call loding("0",ok_url)
|
||||
%>
|
||||
@@ -0,0 +1,81 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
|
||||
<%
|
||||
|
||||
rootPath = server.MapPath("/")
|
||||
Set UploadForm = Server.CreateObject("DEXT.FileUpload")
|
||||
UploadForm.DefaultPath = rootPath&"\data\"
|
||||
|
||||
|
||||
' 파라미터정보 *************************************************************************************
|
||||
eb_pk = InputValue(UploadForm("eb_pk"))
|
||||
ebp_idx = InputValue(UploadForm("ebp_idx"))
|
||||
status = InputValue(UploadForm("status"))
|
||||
' **************************************************************************************************
|
||||
|
||||
|
||||
|
||||
If status = "totdel" then ' 다중삭제
|
||||
|
||||
chk = Replace(UploadForm("chk")," ", "")
|
||||
arr_chk = Split(chk,",")
|
||||
|
||||
For z=0 To UBound(arr_chk)
|
||||
|
||||
sql = "Select ebp_pageimg from ebook_page where ebp_idx="&arr_chk(z)
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
ebp_pageimg = rs("ebp_pageimg")
|
||||
rs.close : Set rs = nothing
|
||||
|
||||
|
||||
' 이미지 삭제
|
||||
strDir = rootPath & "\data\ebook\"&eb_pk&"\"
|
||||
strDir2 = rootPath & "\data\ebook\"&eb_pk&"\middle\"
|
||||
strDir3 = rootPath & "\data\ebook\"&eb_pk&"\small\"
|
||||
|
||||
If ebp_pageimg <> "" then
|
||||
Call dfile( strDir, ebp_pageimg) ' 삭제
|
||||
Call dfile( strDir2, ebp_pageimg_org)
|
||||
Call dfile( strDir3, ebp_pageimg_org)
|
||||
End if
|
||||
|
||||
' 페이지 삭제
|
||||
sql = " delete from ebook_page where ebp_idx="&arr_chk(z)
|
||||
Dbcon.execute sql
|
||||
next
|
||||
|
||||
|
||||
Else ' 일반삭제
|
||||
|
||||
' 삭제하기
|
||||
|
||||
sql = "Select ebp_pageimg from ebook_page where ebp_idx="&ebp_idx
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
ebp_pageimg = rs("ebp_pageimg")
|
||||
|
||||
|
||||
' 이미지 삭제
|
||||
strDir = rootPath & "\data\ebook\"&eb_pk&"\"
|
||||
strDir2 = rootPath & "\data\ebook\"&eb_pk&"\middle\"
|
||||
strDir3 = rootPath & "\data\ebook\"&eb_pk&"\small\"
|
||||
|
||||
If ebp_pageimg <> "" then
|
||||
Call dfile( strDir, ebp_pageimg) ' 삭제
|
||||
Call dfile( strDir2, ebp_pageimg_org)
|
||||
Call dfile( strDir3, ebp_pageimg_org)
|
||||
End if
|
||||
|
||||
' 페이지 삭제
|
||||
sql = " delete from ebook_page where ebp_idx="&ebp_idx
|
||||
Dbcon.execute sql
|
||||
|
||||
End if
|
||||
|
||||
Dbcon.close : Set Dbcon = Nothing
|
||||
|
||||
ok_url = "write_ui.asp?eb_pk="&eb_pk
|
||||
Call loding ("0", ok_url)
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,45 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
eb_pk = InputValue(request("eb_pk"))
|
||||
ebp_idx = InputValue(request("ebp_idx")) ' --일련번호
|
||||
ebp_code = InputValue(request("ebp_code")) ' --정렬번호
|
||||
move = InputValue(request("move")) ' --이동
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if move = "up" then
|
||||
sql = "select top 1 ebp_idx, ebp_code from ebook_page where eb_pk="&eb_pk&" AND ebp_code < "&ebp_code &" order by ebp_code desc"
|
||||
ElseIf move = "down" then
|
||||
sql = "select top 1 ebp_idx, ebp_code from ebook_page where eb_pk="&eb_pk&" AND ebp_code > "&ebp_code &" order by ebp_code"
|
||||
End if
|
||||
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
|
||||
If Not rs.eof Then
|
||||
|
||||
v_rsebp_idx = rs("ebp_idx") ' -- 대체할 디비번호
|
||||
v_rsebp_code = rs("ebp_code") ' -- 대체할 값
|
||||
|
||||
|
||||
sql1 = "update ebook_page set ebp_code = "&ebp_code &" where ebp_idx = "&v_rsebp_idx
|
||||
sql2 = "update ebook_page set ebp_code = "&v_rsebp_code &" where ebp_idx = "&ebp_idx
|
||||
Dbcon.execute sql1
|
||||
Dbcon.execute sql2
|
||||
|
||||
End If
|
||||
|
||||
|
||||
rs.close : Set rs = nothing
|
||||
|
||||
Dbcon.close : Set Dbcon = nothing
|
||||
|
||||
ok_url = "write_ui.asp?eb_pk="&eb_pk
|
||||
|
||||
Call loding ("0",ok_url)
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,251 @@
|
||||
<!--#include virtual="/manager/common/file/other_top.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> > <a href="/manager/content/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> > <a href="list.asp" tabindex="<%=getTabIndex()%>">이북관리</a> > <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)%> size: 880px * 1245px</strong></span></h2>
|
||||
|
||||
|
||||
<form id="frm" method="post" enctype="multipart/form-data" action="write_ok.asp?eb_pk=<%=eb_pk%>" onsubmit="return w_chk();">
|
||||
<div>
|
||||
<!-- <input type="hidden" 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> </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%>&move=up&ebp_idx=<%=ebp_idx%>&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%>&move=down&ebp_idx=<%=ebp_idx%>&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%>&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%>&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>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- 내용들어가는곳 -->
|
||||
|
||||
</div>
|
||||
<!-- //내용영역 -->
|
||||
|
||||
|
||||
|
||||
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
|
||||
@@ -0,0 +1,127 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<!--#include file = "config.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
rootPath = server.MapPath("/")
|
||||
Set UploadForm = Server.CreateObject("DEXT.FileUpload")
|
||||
UploadForm.DefaultPath = rootPath&"\data\"
|
||||
|
||||
|
||||
|
||||
|
||||
R_Fields = "ebp_idx, ebp_subject, ebp_code, ebp_wdate, ebp_mdate, ebp_chk, eb_pk"
|
||||
|
||||
Call RequestAll (R_Fields, "UploadForm")
|
||||
|
||||
|
||||
' ------------------- 저장공간인 [DATA]폴더가 없다면 생성 한다. -------------------
|
||||
FolderCreate( rootPath & "\data\ebook\"&eb_pk&"\")
|
||||
FolderCreate( rootPath & "\data\ebook\"&eb_pk&"\middle\")
|
||||
FolderCreate( rootPath & "\data\ebook\"&eb_pk&"\small\")
|
||||
' ------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
If ebp_idx = "" then ' 저장
|
||||
|
||||
|
||||
' 이미지파일저장
|
||||
' *****************************************
|
||||
strDir = rootPath & "\data\ebook\"&eb_pk&"\"
|
||||
ext_str = "jpg,gif"
|
||||
ebp_pageimg = wfile2("ebp_pageimg", 10, strDir, ext_str)
|
||||
' *****************************************
|
||||
|
||||
' 썸네일1
|
||||
Call GD2_make_thumb(413, 584, ebp_pageimg, strDir, strDir&"middle\" )
|
||||
|
||||
' 썸네일2
|
||||
Call GD2_make_thumb(50, 71, ebp_pageimg, strDir, strDir&"small\" )
|
||||
|
||||
|
||||
|
||||
' 순서
|
||||
' *****************************************
|
||||
sql = " SELECT isnull(max(ebp_code),0) FROM ebook_page WHERE eb_pk = "&eb_pk
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
ebp_code = rs(0)
|
||||
rs.close : Set rs = Nothing
|
||||
|
||||
ebp_code = ebp_code + 1
|
||||
' *****************************************
|
||||
|
||||
|
||||
R_Fields_i = "ebp_subject, ebp_code, ebp_pageimg, ebp_wdate, ebp_mdate, ebp_chk, eb_pk"
|
||||
|
||||
ebp_wdate = getDateFm(now,3)
|
||||
ebp_mdate = getDateFm(now,3)
|
||||
ebp_chk = "Y"
|
||||
|
||||
Call InsertQuery (R_Fields_i, "ebook_page")
|
||||
|
||||
ok_url = "write_ui.asp?eb_pk="&eb_pk
|
||||
|
||||
|
||||
Else ' 수정
|
||||
|
||||
ebp_subject = UploadForm("ebp_subject_"&ebp_idx) ' 수정이름
|
||||
ebp_pageimg = UploadForm("ebp_pageimg_"&ebp_idx) ' 수정파일
|
||||
ebp_pageimg_name = UploadForm("ebp_pageimg_"&ebp_idx&"_name") ' 수정파일
|
||||
|
||||
ebp_pageimg_org = UploadForm("ebp_pageimg_org_"&ebp_idx) ' 수정파일
|
||||
ebp_pageimg_del = UploadForm("ebp_pageimg_del_"&ebp_idx) ' 수정파일
|
||||
|
||||
|
||||
strDir = rootPath & "\data\ebook\"&eb_pk&"\"
|
||||
strDir2 = rootPath & "\data\ebook\"&eb_pk&"\middle\"
|
||||
strDir3 = rootPath & "\data\ebook\"&eb_pk&"\small\"
|
||||
|
||||
|
||||
|
||||
If ebp_pageimg<>"" Then
|
||||
|
||||
ext_str = "jpg,gif"
|
||||
ebp_pageimg = wfile2("ebp_pageimg_"&ebp_idx, 10, strDir, ext_str)
|
||||
|
||||
' 썸네일1
|
||||
Call GD2_make_thumb(413, 584, ebp_pageimg, strDir, strDir&"middle\" )
|
||||
|
||||
' 썸네일2
|
||||
Call GD2_make_thumb(50, 71, ebp_pageimg, strDir, strDir&"small\" )
|
||||
|
||||
Call dfile(strDir, ebp_pageimg_org)
|
||||
Call dfile(strDir2, ebp_pageimg_org)
|
||||
Call dfile(strDir3, ebp_pageimg_org)
|
||||
|
||||
|
||||
Else
|
||||
|
||||
ebp_pageimg = ebp_pageimg_org
|
||||
If ebp_pageimg_del <> "" then ' 첨부파일만 삭제
|
||||
Call dfile(strDir, ebp_pageimg_org)
|
||||
Call dfile(strDir2, ebp_pageimg_org)
|
||||
Call dfile(strDir3, ebp_pageimg_org)
|
||||
ebp_pageimg = ""
|
||||
End if
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
R_Fields = "ebp_subject, ebp_mdate, ebp_pageimg"
|
||||
|
||||
ebp_mdate = getDateFm(now,3)
|
||||
|
||||
Call UpdateQuery (R_Fields, "ebook_page", "where ebp_idx="&ebp_idx)
|
||||
|
||||
ok_url = "write_ui.asp?eb_pk="&eb_pk
|
||||
|
||||
End If
|
||||
|
||||
Dbcon.close : Set Dbcon = nothing
|
||||
|
||||
Call loding("0", ok_url)
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,256 @@
|
||||
<!--#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> > <a href="/manager/content/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> > <a href="list.asp" tabindex="<%=getTabIndex()%>">이북관리</a> > <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)%> 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> </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%>&move=up&ebp_idx=<%=ebp_idx%>&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%>&move=down&ebp_idx=<%=ebp_idx%>&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%>&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%>&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"-->
|
||||
Reference in New Issue
Block a user