최초등록

This commit is contained in:
sp1000je
2026-02-23 10:01:00 +09:00
commit 7bc9767bf4
3120 changed files with 198447 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
<%
Dim is_ad_cms, is_read, is_write, is_delete, is_reply, max_depth_option, mm_ct_idx
'//security_ad_cms(); //관리자페이지 접속권한 체크
'//권한정보 *************************************************************************************
is_ad_cms = "Y"
is_read = "Y"
is_write = "Y"
is_delete = "Y"
is_reply = "Y"
'/**************************************************************************************************
'//$browser_title = "사이트환경설정"; //페이지타이틀 명
max_depth_option = "3"
'//현재 메뉴 idx
mm_ct_idx = "5"
%>
@@ -0,0 +1,85 @@
<!--#include virtual = "/common/lib/dbcon.asp"-->
<!--#include virtual = "/common/lib/func.asp"-->
<%
Dim a_num, ct_idx, status, ct_ref
Dim sql, rs_3, strDir
'//------------------- 저장공간인 [DATA]폴더가 없다면 생성 한다. -------------------
FolderCreate( server.MapPath("/")&"\data\board_code\" )
'//------------------------------------------------------------------------------------
'Set UploadForm = Server.CreateObject("DEXT.FileUpload")
'UploadForm.DefaultPath = server.MapPath("/")&"\data\board_code\"
'//파라미터정보 *************************************************************************************
a_num = InputValue(request("a_num"))
ct_idx = InputValue(request("ct_idx"))
status = InputValue(request("status"))
ct_ref = InputValue(request("ct_ref"))
chk = InputValue(request("chk"))
chk = Replace( chk, " ", "" )
chk = Split(chk, ",")
'//**************************************************************************************************
If status = "totdel" Then '//다중삭제
For z=0 To ubound(chk)
sql = "Select ct_codeno,ct_file from board_code where ct_idx=" &chk(z)
Set rs_3 = dbcon.execute( sql )
ct_codeno = rs_3("ct_codeno")
ct_file = rs_3("ct_file")
'//이미지 삭제
strDir = server.mappath("/data/board_code/") & "\"
If ct_file <> "" then
Call dfile (strDir, ct_file) '//삭제
End if
sql = " delete from board_code where ct_codeno like '%" & ct_codeno & "%'"
dbcon.execute sql
next
Else '//일반삭제
'//삭제하기
sql = "Select ct_codeno, ct_file from board_code where ct_idx=" & ct_idx
Set rs_3 = dbcon.execute( sql )
ct_codeno = rs_3("ct_codeno")
ct_file = rs_3("ct_file")
'//이미지 삭제
strDir = server.mappath("/data/board_code/") & "\"
If ct_file <> "" then
Call dfile( strDir, ct_file) '//삭제
End if
sql = " delete from board_code where ct_codeno like '%" & ct_codeno & "%'"
'//echo $sql;
dbcon.execute sql
End if
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?a_num=" & a_num & "&amp;ct_idx=" & ct_ref
dbcon.close
Set dbcon = nothing
Call loding ("0", ok_url)
%>
+60
View File
@@ -0,0 +1,60 @@
<!--#include virtual = "/common/lib/dbcon.asp"-->
<!--#include virtual = "/common/lib/func.asp"-->
<%
Dim status, a_num, tot_level_chk, ct_chk, ct_idx, ct_ref
'//------------------- 저장공간인 [DATA]폴더가 없다면 생성 한다. -------------------
FolderCreate( server.MapPath("/")&"\data\board_code\" )
'//------------------------------------------------------------------------------------
Set UploadForm = Server.CreateObject("DEXT.FileUpload")
UploadForm.DefaultPath = server.MapPath("/")&"\data\board_code\"
'//파라미터정보 ***********************************************
status = InputValue(UploadForm("status"))
a_num = InputValue(UploadForm("a_num"))
tot_level_chk = InputValue(UploadForm("tot_level_chk"))
ct_chk = InputValue(UploadForm("ct_chk"))
ct_idx = InputValue(UploadForm("ct_idx"))
ct_ref = InputValue(UploadForm("ct_ref"))
chk = InputValue(UploadForm("chk"))
chk = Replace( chk, " ", "" )
chk = Split(chk, ",")
'//************************************************************
If status = "totlevel" then ') { //
For z=0 To ubound(chk)
sql = " Update board_code set ct_chk = '" & tot_level_chk & "' Where ct_idx = " & chk(z)
dbcon.execute sql
next
Else
sql = " Update board_code set ct_chk = '" & ct_chk & "' Where ct_idx = " & ct_idx
dbcon.execute sql
end if
dbcon.close
Set dbcon = nothing
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?a_num=" & a_num & "&amp;ct_idx=" & ct_ref
Call loding ("0",ok_url)
%>
+40
View File
@@ -0,0 +1,40 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
Dim sql, a_num, ct_idx, ct_code, move, ct_ref, ok_url
a_num = InputValue( request.queryString("a_num"))
ct_idx = InputValue( request.queryString("ct_idx")) '//--일련번호
ct_code = InputValue( request.queryString("ct_code")) '//--정렬번호
move = InputValue( request.queryString("move")) '//--이동
ct_ref = InputValue( request.queryString("ct_ref"))
if move = "up" then
sql = "select top 1 ct_idx, ct_code from board_code where a_num=" & a_num & " AND ct_code < " & ct_code & " AND ct_ref='" & ct_ref & "' order by ct_code desc"
elseif move = "down" then
sql = "select top 1 ct_idx, ct_code from board_code where a_num=" & a_num & " AND ct_code > " & ct_code & " AND ct_ref='" & ct_ref & "' order by ct_code"
End if
Set rs = dbcon.execute( sql )
If Not( rs.bof Or rs.eof ) then
v_rsct_idx = rs("ct_idx") '//-- 대체할 디비번호
v_rsct_code = rs("ct_code") '//-- 대체할 값
sql1 = "update board_code set ct_code = " & ct_code & " where ct_idx = " & v_rsct_idx
sql2 = "update board_code set ct_code = " & v_rsct_code & " where ct_idx = " &ct_idx
dbcon.execute sql1
dbcon.execute sql2
End if
If ct_ref = "0" Then ct_ref = ""
ok_url = "write.asp?a_num=" & a_num & "&amp;ct_idx=" & ct_ref
Call loding ("0", ok_url)
%>
+350
View File
@@ -0,0 +1,350 @@
<!--#include virtual ="/manager/common/file/board_top.asp" -->
<%'//*************************************************************************************%>
<script type="text/javascript" src="/common/js/02board_code.js"></script>
<%'//*************************************************************************************%>
<!--#include file ="config.asp"-->
<%
Dim a_num
Dim table, idx_field, oreder_filed, Query_Fields, list_data
Dim ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_file
a_num = InputValue(request( "a_num" ))
'//쓰기권한체크*************************************************************************************
if is_write <> "Y" Then
back_back "쓰기권한이 없습니다."
End if
'//**************************************************************************************************
'//파라미터정보 *************************************************************************************
ct_idx = Inputvalue(request("ct_idx"))
'//용도 : 등록/수정시 현재 상위pk(idx)값, 현재단계
If ct_idx = "" then '//없으면 1단계
ct_ref = "0"
ct_depth = "1"
ct_codeno_ref = "C0;"
Else
sql = "select ct_depth,ct_codeno from board_code where ct_idx=" & ct_idx '//상위idx값을 구한당
Set rs_2 = dbcon.execute( sql )
ref_depth = rs_2("ct_depth")
ref_codeno = rs_2("ct_codeno")
ct_ref = ct_idx
ct_depth = ref_depth + 1 '//상위단계 + 1
ct_codeno_ref = ref_codeno
End if
'//echo "<br>현재단계 : " . $ct_depth . "단계";
'//쓰기권한체크*************************************************************************************
if CInt( ct_depth ) > cint(max_depth_option) then
back_back "최대 "& max_depth_option & " 단계 까지 가능합니다.."
End if
'//**************************************************************************************************
'//테이블 기본 환경설정 ********************************************************************************
table = "board_code" '//테이블명
idx_field = "ct_idx" '//기본키
oreder_filed = "ct_code ASC" '//정렬기준 필드
Query_Fields = "ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_file" '//불러올 필드
'//****************************************************************************************************
'//---------------조합 쿼리문------------------------------------
If v_keyword <> "" then
search_str = " AND " & v_search & " like '%" & v_keyword & "%'"
End if
If ct_idx <> "" then
search_str2 = " AND ct_ref = '" & ct_idx & "'"
else
search_str2 = " AND ct_ref = '0'"
End if
Query_OrderBy = " ORDER BY " & oreder_filed
'//---------------------------------------------------------------
'//-----------------------------리스트 출력 쿼리문 생성-----------------------------
sql = "select " & Query_Fields & " from " & table & " WHERE a_num = " & a_num
sql = sql & search_str & search_str2 & Query_OrderBy
'response.write sql
'response.end
Set col = dbcon.execute( sql )
If col.bof Or col.eof Then
list_data = null
Else
list_data = col.getrows
End If
Set col = nothing
'//---------------------------------------------------------------------------------
%>
<!-- 내용영역 -->
<div id="contents">
<div id="contents_head">
<div id="contents_title">
<img src="/manager/img/tit_ic04.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/02board/list.asp" tabindex="<%=getTabIndex()%>">게시판관리</a> &gt; <a href="/manager/content/02board/write.asp" class="now" tabindex="<%=getTabIndex()%>"><%=is_title_str%></a>
</div>
</div>
<!-- 내용들어가는곳 -->
<div id="contents_area">
<h2 class="<%=skin%>">현재분류경로<span class="loc">: <a href="/manager/content/02board/list.asp" tabindex="<%=getTabIndex()%>">게시판리스트</a> > <strong class="orange"><%=get_bbsname(a_num)%></strong>
<%
If ref_codeno <> "" then
ref_codeno_arr = Split(ref_codeno, ";")
for z=1 To ubound(ref_codeno_arr)
ct_idx_str = replace(ref_codeno_arr(z),"C","")
ct_idx_str = replace(ct_idx_str,";","")
If ct_idx_str <> "" then
sql = "Select ct_name from board_code where ct_idx=" & ct_idx_str
Set rs_3 = dbcon.execute( sql )
If Not( rs_3.bof Or rs_3.eof ) then
ct_name_str = rs_3("ct_name")
End if
If UBound(ref_codeno_arr)-1 = z then
%>
> <a href="write.asp?a_num=<%=a_num%>&amp;ct_idx=<%=ct_idx_str%>" tabindex="<%=getTabIndex()%>"><strong class="orange"><%=ct_name_str%></strong></a>
<%
else
ref_ct_idx_str = ct_idx_str
%>
> <a href="write.asp?a_num=<%=a_num%>&amp;ct_idx=<%=ct_idx_str%>" tabindex="<%=getTabIndex()%>"><%=ct_name_str%></a>
<%
End if
End if
next
End if
%>
</span></h2>
<form id="frm" method="post" enctype="multipart/form-data" action="write_ok.asp?a_num=<%=a_num%>" onsubmit="return w_chk();">
<div>
<input type="hidden" name="a_num" value="<%=a_num%>" />
<input type="hidden" name="ct_ref" value="<%=ct_ref%>" />
<input type="hidden" name="ct_depth" value="<%=ct_depth%>" />
<input type="hidden" name="ct_codeno_ref" value="<%=ct_codeno_ref%>" />
</div>
<div class="write_info">
<div class="write_form pt7">
<ul>
<li class="text"><label for="ct_name_i">분류등록</label> :</li>
<li><input type="text" size="25" title="분류 입력" id="ct_name_i" name="ct_name" class="input_box input" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>
<li class="text"><label for="ct_file">이미지</label> :</li>
<li><input type="file" size="25" title="이미지 등록" id="ct_file" name="ct_file" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>
<li><select id="ct_chk_i" name="ct_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="ct_chk" name="ct_chk" />
<input type="hidden" id="ct_idx" name="ct_idx" />
<input type="hidden" id="ct_ref" name="ct_ref" value="<%=ct_ref%>" />
<input type="hidden" id="a_num" name="a_num" value="<%=a_num%>" />
<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>
<%
If IsNull(list_data) Then
%>
<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>
<%
else
For i = 0 To UBound(list_data, 2)
'//필드갯수만큼 ($Query_Fields).가지고온다..
Call arr2Value(Query_Fields, "list_data", i)
if ct_chk = "Y" then
ct_chk_str = "<strong>사용</strong>"
else
ct_chk_str = "중지"
End if
%>
<tr>
<td scope="row" class="center"><input type="checkbox" name="chk" value="<%=ct_idx%>" title="해당 분류 선택" tabindex="<%=getTabIndex()%>" /></td>
<td scope="row" class="center">
<a href="move.asp?a_num=<%=a_num%>&amp;move=up&amp;ct_idx=<%=ct_idx%>&amp;ct_code=<%=ct_code%>&amp;ct_ref=<%=ct_ref%>" title="순서 위로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_up.gif" width="10" height="9" alt="순서 위로 이동" /></a><a href="move.asp?a_num=<%=a_num%>&amp;move=down&amp;ct_idx=<%=ct_idx%>&amp;ct_code=<%=ct_code%>&amp;ct_ref=<%=ct_ref%>" 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="ct_name_<%=ct_idx%>" name="ct_name_<%=ct_idx%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_name%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
</td>
<td scope="row" class="left">
<input type="file" size="20" title="이미지 등록" id="ct_file_<%=ct_idx%>" name="ct_file_<%=ct_idx%>" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_file%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
<% If ct_file <> "" Then %>
<br/><div class="vam pt5"><img src = "/data/board_code/<%=ct_file%>" alt="<%=ct_name%>" />&nbsp;<input type='checkbox' name='ct_file_del_<%=ct_idx%>' value='<%=ct_file%>' tabindex="<%=getTabIndex()%>" />삭제</div>
<% End if%>
<input type="hidden" id="ct_file_org_<%=ct_idx%>" name="ct_file_org_<%=ct_idx%>" value="<%=ct_file%>" />
</td>
<td scope="row" class="center"><%=ct_chk_str%></td>
<td scope="row" class="center"><input type="button" value="수정" class="ct_bt01" onclick="m_chk(<%=ct_idx%>);" tabindex="<%=getTabIndex()%>" />
</td>
<td scope="row" class="center"><input type="button" value="삭제" class="ct_bt01" onclick="return d_chk('delete_ok.asp?a_num=<%=a_num%>&amp;ct_idx=<%=ct_idx%>&amp;ct_ref=<%=ct_ref%>');" tabindex="<%=getTabIndex()%>" /></td>
</tr>
<%
Next
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>
<li class="pt7 pl4"><span class="gray">|</span> &nbsp;선택한 분류
<select id="tot_level_chk" name="tot_level_chk" title="선택한 분류 사용여부 선택" tabindex="<%=getTabIndex()%>">
<option value="Y" selected="selected">사용</option>
<option value="N" >중지</option>
</select>으로
</li>
<li class="pt7 pl2"><div class="bt01"><a href="javascript:tot_levelchage();" tabindex="<%=getTabIndex()%>"><span>변경</span></a></div><!-- <input type="button" value="변경" class="ct_bt01" onclick="" /> --></li>
</ul>
</div>
</form>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- //내용영역 -->
<form id= "frm_m" method='post' enctype="multipart/form-data" action="">
<div>
<input type="hidden" name="ct_name" />
<input type="hidden" name="ct_file" />
<input type="hidden" name="ct_file2" />
<input type="hidden" name="ct_chk" />
<input type="hidden" name="ct_idx" />
<input type="hidden" name="ct_ref" />
</div>
</form>
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
+133
View File
@@ -0,0 +1,133 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
Dim R_Fields, UploadForm
dim ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_codeno_ref, a_num
Dim strDir, ext_str, ct_file
Dim sql, R_Fields_i
'//------------------- 저장공간인 [DATA]폴더가 없다면 생성 한다. -------------------
FolderCreate( server.MapPath("/")&"\data\board_code\" )
'//------------------------------------------------------------------------------------
Set UploadForm = Server.CreateObject("DEXT.FileUpload")
UploadForm.DefaultPath = server.MapPath("/")&"\data\board_code\"
R_Fields = "ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_codeno_ref, a_num"
Call RequestAll(R_Fields, "UploadForm")
If ct_idx = "" then '//저장
'//이미지파일저장
'//*****************************************
strDir = UploadForm.DefaultPath
ext_str = "jpg,gif"
ct_file = wfile2("ct_file", 10, strDir, ext_str)
'//*****************************************
'//순서
'//*****************************************
sql = "select max(ct_code) as ct_code from board_code WHERE ct_ref = " & ct_ref
'response.write sql
'response.end
Set rs = dbcon.execute( sql )
ct_code = rs("ct_code")
if IsNull(ct_code) then
ct_code = 1
else
ct_code = ct_code + 1
End if
'//*****************************************
R_Fields_i = "ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate,a_num, ct_file"
ct_wdate = getDateFm(Now(), 3)
Call InsertQuery (R_Fields_i, "board_code")
'//메뉴값 적용-----------------------------------------------------------------------------
sql = "select max(ct_idx) as ct_idx from board_code"
Set rs1 = dbcon.execute( sql )
max_ct_idx = rs1("ct_idx")
Set rs1 = nothing
ct_codeno = ct_codeno_ref & "C" & max_ct_idx & ";"
sql = "update board_code set ct_codeno='" & ct_codeno & "' WHERE ct_idx = " & max_ct_idx
dbcon.execute sql
'//-----------------------------------------------------------------------------------------
If ct_ref = "0" then ct_ref = ""
ok_url = "write_ui.asp?a_num=" & a_num & "&amp;ct_idx=" & ct_ref
Else '{ //수정
ct_name = inputValue( UploadForm( "ct_name_" & ct_idx ) )
'ct_file = inputValue( UploadForm( "ct_file_" & ct_idx ) )
'ct_file_name = inputValue( UploadForm( "ct_file_" & ct_idx ) )
ct_file_org = inputValue( UploadForm( "ct_file_org_" & ct_idx ) )
ct_file_del = inputValue( UploadForm( "ct_file_del_" & ct_idx ) )
strDir = UploadForm.DefaultPath
'//체크하면 첨부파일 삭제
If ct_file_del <> "" then '//첨부파일만 삭제
Call dfile( strDir, ct_file_org )
ct_file = ""
ct_file_org = ""
End if
'//이미지파일저장
'//*****************************************
ext_str = "jpg,gif"
ct_file = wfile2("ct_file_" & ct_idx, 10, strDir, ext_str)
'//*****************************************
If ct_file <> "" then '//첨부파일이 있으면
If ct_file_org <> "" then
Call dfile( strDir, ct_file_org )
End if
else
ct_file = ct_file_org
End if
R_Fields = "ct_name, ct_wdate, ct_file"
ct_wdate = getDateFm(Now(), 3)
Call UpdateQuery (R_Fields, "board_code", "where ct_idx=" & ct_idx)
If ct_ref = "0" then ct_ref = ""
ok_url = "write_ui.asp?a_num=" & a_num & "&amp;ct_idx=" & ct_ref
End if
Call loding("0",ok_url)
%>
+354
View File
@@ -0,0 +1,354 @@
<!--#include virtual ="/manager/common/file/top_ui.asp" -->
<%'//*************************************************************************************%>
<script type="text/javascript" src="/common/js/02board_code.js"></script>
<%'//*************************************************************************************%>
<!--#include file ="config.asp"-->
<%
Dim a_num
Dim table, idx_field, oreder_filed, Query_Fields, list_data
Dim ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_file
a_num = InputValue(request( "a_num" ))
'//쓰기권한체크*************************************************************************************
if is_write <> "Y" Then
back_back "쓰기권한이 없습니다."
End if
'//**************************************************************************************************
'//파라미터정보 *************************************************************************************
ct_idx = Inputvalue(request("ct_idx"))
'//용도 : 등록/수정시 현재 상위pk(idx)값, 현재단계
If ct_idx = "" then '//없으면 1단계
ct_ref = "0"
ct_depth = "1"
ct_codeno_ref = "C0;"
Else
sql = "select ct_depth,ct_codeno from board_code where ct_idx=" & ct_idx '//상위idx값을 구한당
Set rs_2 = dbcon.execute( sql )
ref_depth = rs_2("ct_depth")
ref_codeno = rs_2("ct_codeno")
ct_ref = ct_idx
ct_depth = ref_depth + 1 '//상위단계 + 1
ct_codeno_ref = ref_codeno
End if
'//echo "<br>현재단계 : " . $ct_depth . "단계";
'//쓰기권한체크*************************************************************************************
if CInt( ct_depth ) > cint(max_depth_option) then
back_back "최대 "& max_depth_option & " 단계 까지 가능합니다.."
End if
'//**************************************************************************************************
'//테이블 기본 환경설정 ********************************************************************************
table = "board_code" '//테이블명
idx_field = "ct_idx" '//기본키
oreder_filed = "ct_code ASC" '//정렬기준 필드
Query_Fields = "ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_file" '//불러올 필드
'//****************************************************************************************************
'//---------------조합 쿼리문------------------------------------
If v_keyword <> "" then
search_str = " AND " & v_search & " like '%" & v_keyword & "%'"
End if
If ct_idx <> "" then
search_str2 = " AND ct_ref = '" & ct_idx & "'"
else
search_str2 = " AND ct_ref = '0'"
End if
Query_OrderBy = " ORDER BY " & oreder_filed
'//---------------------------------------------------------------
'//-----------------------------리스트 출력 쿼리문 생성-----------------------------
sql = "select " & Query_Fields & " from " & table & " WHERE a_num = " & a_num
sql = sql & search_str & search_str2 & Query_OrderBy
'response.write sql
'response.end
Set col = dbcon.execute( sql )
If col.bof Or col.eof Then
list_data = null
Else
list_data = col.getrows
End If
Set col = nothing
'//---------------------------------------------------------------------------------
%>
<!-- 내용영역 -->
<div id="contents">
<div id="contents_head">
<div id="contents_title">
<img src="/manager/img/tit_ic04.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/02board/list.asp" tabindex="<%=getTabIndex()%>">게시판관리</a> &gt; <a href="/manager/content/02board/write.asp" class="now" tabindex="<%=getTabIndex()%>"><%=is_title_str%></a>
</div>
</div>
<!-- 내용들어가는곳 -->
<div id="contents_area">
<h2 class="<%=skin%>">현재분류경로<span class="loc">: <a href="/manager/content/02board/list.asp" tabindex="<%=getTabIndex()%>">게시판리스트</a> > <strong class="orange"><%=get_bbsname(a_num)%></strong>
<%
If ref_codeno <> "" then
ref_codeno_arr = Split(ref_codeno, ";")
for z=1 To ubound(ref_codeno_arr)
ct_idx_str = replace(ref_codeno_arr(z),"C","")
ct_idx_str = replace(ct_idx_str,";","")
If ct_idx_str <> "" then
sql = "Select ct_name from board_code where ct_idx=" & ct_idx_str
Set rs_3 = dbcon.execute( sql )
If Not( rs_3.bof Or rs_3.eof ) then
ct_name_str = rs_3("ct_name")
End if
If UBound(ref_codeno_arr)-1 = z then
%>
> <a href="write.asp?a_num=<%=a_num%>&amp;ct_idx=<%=ct_idx_str%>" tabindex="<%=getTabIndex()%>"><strong class="orange"><%=ct_name_str%></strong></a>
<%
else
ref_ct_idx_str = ct_idx_str
%>
> <a href="write.asp?a_num=<%=a_num%>&amp;ct_idx=<%=ct_idx_str%>" tabindex="<%=getTabIndex()%>"><%=ct_name_str%></a>
<%
End if
End if
next
End if
%>
</span></h2>
<form id="frm" method="post" enctype="multipart/form-data" action="write_ok.asp?a_num=<%=a_num%>" onsubmit="return w_chk();">
<div>
<input type="hidden" name="a_num" value="<%=a_num%>" />
<input type="hidden" name="ct_ref" value="<%=ct_ref%>" />
<input type="hidden" name="ct_depth" value="<%=ct_depth%>" />
<input type="hidden" name="ct_codeno_ref" value="<%=ct_codeno_ref%>" />
</div>
<div class="write_info">
<div class="write_form pt7">
<ul>
<li class="text"><label for="ct_name_i">분류등록</label> :</li>
<li><input type="text" size="25" title="분류 입력" id="ct_name_i" name="ct_name" class="input_box input" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>
<li class="text"><label for="ct_file">이미지</label> :</li>
<li><input type="file" size="25" title="이미지 등록" id="ct_file" name="ct_file" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>
<li><select id="ct_chk_i" name="ct_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="ct_chk" name="ct_chk" />
<input type="hidden" id="ct_idx" name="ct_idx" />
<input type="hidden" id="ct_ref" name="ct_ref" value="<%=ct_ref%>" />
<input type="hidden" id="a_num" name="a_num" value="<%=a_num%>" />
<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>
<%
If IsNull(list_data) Then
%>
<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>
<%
else
For i = 0 To UBound(list_data, 2)
'//필드갯수만큼 ($Query_Fields).가지고온다..
Call arr2Value(Query_Fields, "list_data", i)
if ct_chk = "Y" then
ct_chk_str = "<strong>사용</strong>"
else
ct_chk_str = "중지"
End if
%>
<tr>
<td scope="row" class="center"><input type="checkbox" name="chk" value="<%=ct_idx%>" title="해당 분류 선택" tabindex="<%=getTabIndex()%>" /></td>
<td scope="row" class="center">
<a href="move.asp?a_num=<%=a_num%>&amp;move=up&amp;ct_idx=<%=ct_idx%>&amp;ct_code=<%=ct_code%>&amp;ct_ref=<%=ct_ref%>" title="순서 위로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_up.gif" width="10" height="9" alt="순서 위로 이동" /></a><a href="move.asp?a_num=<%=a_num%>&amp;move=down&amp;ct_idx=<%=ct_idx%>&amp;ct_code=<%=ct_code%>&amp;ct_ref=<%=ct_ref%>" 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="ct_name_<%=ct_idx%>" name="ct_name_<%=ct_idx%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_name%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
</td>
<td scope="row" class="left">
<input type="file" size="20" title="이미지 등록" id="ct_file_<%=ct_idx%>" name="ct_file_<%=ct_idx%>" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_file%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
<% If ct_file <> "" Then %>
<br/><div class="vam pt5"><img src = "/data/board_code/<%=ct_file%>" alt="<%=ct_name%>" />&nbsp;<input type='checkbox' name='ct_file_del_<%=ct_idx%>' value='<%=ct_file%>' tabindex="<%=getTabIndex()%>" />삭제</div>
<% End if%>
<input type="hidden" id="ct_file_org_<%=ct_idx%>" name="ct_file_org_<%=ct_idx%>" value="<%=ct_file%>" />
</td>
<td scope="row" class="center"><%=ct_chk_str%></td>
<td scope="row" class="center"><input type="button" value="수정" class="ct_bt01" onclick="m_chk(<%=ct_idx%>);" tabindex="<%=getTabIndex()%>" />
</td>
<td scope="row" class="center"><input type="button" value="삭제" class="ct_bt01" onclick="return d_chk('delete_ok.asp?a_num=<%=a_num%>&amp;ct_idx=<%=ct_idx%>&amp;ct_ref=<%=ct_ref%>');" tabindex="<%=getTabIndex()%>" /></td>
</tr>
<%
Next
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>
<li class="pt7 pl4"><span class="gray">|</span> &nbsp;선택한 분류
<select id="tot_level_chk" name="tot_level_chk" title="선택한 분류 사용여부 선택" tabindex="<%=getTabIndex()%>">
<option value="Y" selected="selected">사용</option>
<option value="N" >중지</option>
</select>으로
</li>
<li class="pt7 pl2"><div class="bt01"><a href="javascript:tot_levelchage();" tabindex="<%=getTabIndex()%>"><span>변경</span></a></div><!-- <input type="button" value="변경" class="ct_bt01" onclick="" /> --></li>
</ul>
</div>
</form>
<div class="contoll_box">
<div id="<%=skin%>_bt"><span class="button"><input type="button" value="취소" onclick="parent.dialog_close();" /></span></div>
</div>
</div>
<!-- 내용들어가는곳 -->
</div>
<!-- //내용영역 -->
<form id= "frm_m" method='post' enctype="multipart/form-data" action="">
<div>
<input type="hidden" name="ct_name" />
<input type="hidden" name="ct_file" />
<input type="hidden" name="ct_file2" />
<input type="hidden" name="ct_chk" />
<input type="hidden" name="ct_idx" />
<input type="hidden" name="ct_ref" />
</div>
</form>
<!--#include virtual="/manager/common/file/bottom_ui.asp"-->