최초등록

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
+19
View File
@@ -0,0 +1,19 @@
<%
'//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 = "6"
%>
+58
View File
@@ -0,0 +1,58 @@
<!-- #include virtual = "/common/lib/dbcon.asp" -->
<!-- #include virtual = "/common/lib/func.asp" -->
<%
Dim ct_idx, status, ct_ref, ct_codeno
Dim sql, ok_url
'//파라미터정보 *************************************************************************************
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 from manager_menu where ct_idx=" & chk(z)
Set rs_3 = dbcon.execute( sql )
sql = " delete from manager_menu where ct_codeno like '%" & rs_3("ct_codeno") & "%'"
dbcon.execute sql
'//자주 쓰는 메뉴부분
sql = " delete from manager_favorites where mm_ct_idx=" & chk(z)
dbcon.execute sql
next
Set rs_3 = Nothing
Else '//일반삭제
'//삭제하기
sql = "Select ct_codeno from manager_menu where ct_idx=" & ct_idx
Set rs_3 = dbcon.execute( sql )
ct_codeno = rs_3("ct_codeno")
sql = " delete from manager_menu where ct_codeno like '%" & rs_3("ct_codeno") & "%'"
dbcon.execute sql
'//자주 쓰는 메뉴부분
sql = " delete from manager_favorites where mm_ct_idx=" & ct_idx
dbcon.execute sql
End if
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?ct_idx=" & ct_ref
Call loding ("0", ok_url)
%>
+57
View File
@@ -0,0 +1,57 @@
<!-- #include virtual = "/common/lib/dbcon.asp" -->
<!-- #include virtual = "/common/lib/func.asp" -->
<%
Dim status, tot_level_chk, ct_chk, ct_idx, ct_ref, chk, sql, ok_url
'//파라미터정보 ***********************************************
status = InputValue( request.Form("status") )
tot_level_chk = InputValue( request.Form("tot_level_chk") )
ct_chk = InputValue( request.Form("ct_chk") )
ct_idx = InputValue( request.Form("ct_idx") )
ct_ref = InputValue( request.Form("ct_ref") )
chk = InputValue( request.Form("chk") )
chk = Replace(chk, " ", "")
chk = split(chk, ",")
'//************************************************************
If status = "totlevel" Then '//다중삭제
For z=0 To UBound(chk)
sql = " Update manager_menu set ct_chk = '" & tot_level_chk & "' Where ct_idx = " & chk(z)
dbcon.execute sql
'//자주쓰는 메뉴 부분 (
sql = "update manager_favorites set ct_chk='" & tot_level_chk & "' WHERE mm_ct_idx = " & chk(z)
dbcon.execute sql
next
Else
sql = " Update manager_menu set ct_chk = '" & ct_chk & "' Where ct_idx = " & ct_idx
dbcon.execute sql
'//자주쓰는 메뉴 부분 (
sql = "update manager_favorites set ct_chk='" & ct_chk & "' WHERE mm_ct_idx = " & ct_idx
dbcon.execute sql
End if
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?ct_idx=" & ct_ref
Call loding ("0", ok_url)
dbcon.close
Set dbcon = nothing
%>
+46
View File
@@ -0,0 +1,46 @@
<!-- #include virtual = "/common/lib/dbcon.asp" -->
<!-- #include virtual = "/common/lib/func.asp" -->
<%
Dim ct_idx, ct_code, move, ct_ref
Dim sql, sql1, sql2
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 manager_menu where 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 manager_menu where 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 manager_menu set ct_code = " & ct_code & " where ct_idx = " & v_rsct_idx
sql2 = "update manager_menu 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?ct_idx=" & ct_ref
Call loding ("0", ok_url)
dbcon.close
Set dbcon = nothing
%>
+363
View File
@@ -0,0 +1,363 @@
<!-- #include virtual="/manager/common/file/basic_top.asp"-->
<%'//*************************************************************************************%>
<script type="text/javascript" src="/common/js/01menu.js"></script>
<%'//*************************************************************************************%>
<!-- #include file= "config.asp"-->
<%
Dim sql, table, idx_field, oreder_filed, Query_Fields, search_str, search_str2, Query_OrderBy
Dim ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_url
'//쓰기권한체크*************************************************************************************
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 manager_menu 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
Set rs_2 = nothing
End if
'//echo "<br>현재단계 : " . $ct_depth . "단계";
'//쓰기권한체크*************************************************************************************
if CInt( ct_depth ) > CInt( max_depth_option ) then
back_back "최대 " & max_depth_option & " 단계 까지 가능합니다.."
End if
'//**************************************************************************************************
'//테이블 기본 환경설정 ********************************************************************************
table = "manager_menu" '//테이블명
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_url" '//불러올 필드
'//****************************************************************************************************
'//---------------조합 쿼리문------------------------------------
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 ct_idx <> '0'"
sql = sql & search_str & search_str2 & Query_OrderBy
'response.write sql
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/01info/write.asp" tabindex="<%=getTabIndex()%>">기본환경관리</a> &gt; <a href="/manager/content/01info/write.asp" tabindex="<%=getTabIndex()%>">기본관리</a> &gt; <a href="/manager/content/01menu/write.asp" class="now" tabindex="<%=getTabIndex()%>">메뉴관리</a>
</div>
</div>
<!-- 내용들어가는곳 -->
<div id="contents_area">
<h2 class="<%=skin%>">현재메뉴경로<span class="loc">: <a href="write.asp" tabindex="<%=getTabIndex()%>">메뉴관리홈</a>
<%
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 manager_menu 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
Set rs_3 = nothing
If ubound(ref_codeno_arr)-1 = z then
%>
> <a href="write.asp?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?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" action="write_ok.asp" onsubmit="return w_chk();">
<div>
<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>
<%=ct_dept%>
<%If ct_depth = 1 then%>
<li><input type="text" size="80" 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>
<%elseif CInt(ct_depth) <= max_depth_option then%>
<li><input type="text" size="62" 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>
<%End if%>
<li><select id="ct_chk_i" name="ct_chk" title="메뉴 사용여부 선택" tabindex="<%=getTabIndex()%>">
<option value="Y" selected="selected">사용</option>
<option value="N" >중지</option>
</select></li>
<%If CInt(ct_depth) = 1 Then %>
<li><div id="<%=skin%>_bt"><span class="button"><input type="submit" value="등록" tabindex="<%=getTabIndex()%>" /></span></div></li>
<%elseIf ct_depth <= max_depth_option then%>
<li><div id="<%=skin%>_bt"><span class="button"><input type="submit" value="등록" tabindex="<%=getTabIndex()%>" /></span></div></li>
<li><div id="w01_bt"><span class="button"><input type="button" value="상위메뉴 이동" onclick="location.href='write.asp?ct_idx=<%=ref_ct_idx_str%>';" /></span></div></li>
<%End if%>
</ul>
</div>
</div>
</form>
<form id= "frm_list" action="" 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="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 />
<%If ct_depth < max_depth_option then%>
<col width="64" />
<%End if%>
<%If ct_depth = "3" Then %>
<col />
<%End if%>
<col width="70" />
<col width="50" />
<col width="50" />
</colgroup>
<thead>
<tr>
<th scope="col">선택</th>
<th scope="col">순서</th>
<th scope="col">메뉴</th>
<%If CInt(ct_depth) < CInt(max_depth_option) then%>
<th scope="col">하위메뉴</th>
<%end if%>
<%If ct_depth = "3" Then%>
<th scope="col">경로</th>
<%End if%>
<th scope="col">사용여부</th>
<th scope="col">수정</th>
<th scope="col">삭제</th>
</tr>
</thead>
<tbody>
<%
'//bbs_list_data
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>
</tr>
<%
Else
For zz = 1 To UBound(list_data, 2)+1
Call arr2Value( Query_Fields, "list_data", zz-1 )
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?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?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>
<%If CInt( ct_depth ) < CInt( max_depth_option ) then%>
<td scope="row" class="center">
<input type="text" size="58" title="메뉴 입력" id="ct_name<%=zz%>" name="ct_name<%=zz%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_name%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
</td>
<td scope="row" class="center">
<input type="button" value="보기" class="ct_bt01" onclick="page_go1('write.asp?ct_idx=<%=ct_idx%>');" tabindex="<%=getTabIndex()%>" />
</td>
<%End if%>
<%If ct_depth = 3 then%>
<td scope="row" class="center">
<input type="text" size="30" title="메뉴 입력" id="ct_name<%=zz%>" name="ct_name<%=zz%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_name%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
</td>
<td scope="row" class="center"><input type="text" size="33" title="경로 입력" id="ct_url<%=zz%>" name="ct_url<%=zz%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=ct_url%>" maxlength="150" tabindex="<%=getTabIndex()%>" /></td>
<%End if%>
<td scope="row" class="center"><%=ct_chk_str%></td>
<td scope="row" class="center"><input type="button" value="수정" class="ct_bt01" onclick="frm_modify<%=zz%>(<%=ct_idx%>,<%=ct_ref%>);" tabindex="<%=getTabIndex()%>" />
<script type="text/javascript">
function frm_modify<%=zz%>(ct_idx,ct_ref){
var ct_idx, ct_ref;
if (CheckSpaces(document.getElementById('frm_list').ct_name<%=zz%>, '메뉴명')) { return false; }
//else if (CheckSpaces(document.getElementById('frm').sc_sitename_en, '영문명')) { return false; }
else {
loading_st(1);
document.getElementById('frm_m').ct_name.value = document.getElementById('frm_list').ct_name<%=zz%>.value;
//document.getElementById('frm_m').ct_chk.value = document.getElementById('frm_list').ct_chk<?=$zz?>.value;
<%If ct_depth = "3" then%>
document.getElementById('frm_m').ct_url.value = document.getElementById('frm_list').ct_url<%=zz%>.value;
<%end if%>
document.getElementById('frm_m').ct_idx.value = ct_idx;
document.getElementById('frm_m').ct_ref.value = ct_ref;
document.getElementById('frm_m').action = "write_ok.asp";
document.getElementById('frm_m').submit();
}
}
</script>
</td>
<td scope="row" class="center"><input type="button" value="삭제" class="ct_bt01" onclick="return d_chk('delete_ok.asp?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' action="">
<div>
<input type="hidden" name="ct_name" />
<input type="hidden" name="ct_url" />
<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"-->
+87
View File
@@ -0,0 +1,87 @@
<!-- #include virtual = "/common/lib/dbcon.asp" -->
<!-- #include virtual = "/common/lib/func.asp" -->
<%
Dim R_Fields, rs
Dim ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_url, ct_codeno_ref
R_Fields = "ct_idx, ct_code, ct_name, ct_ref, ct_depth, ct_chk, ct_wdate, ct_codeno, ct_url, ct_codeno_ref"
Call RequestAll (R_Fields, "request.form")
If ct_idx = "" then '//저장
'//순서
'//*****************************************
sql = "select max(ct_code) as ct_code from manager_menu WHERE ct_ref = " & ct_ref
'response.write sql
'response.end
Set rs = dbcon.execute( sql )
ct_code = rs("ct_code")
if IsNull( ct_code ) or 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, ct_url"
ct_wdate = getDateFm(Now(), 3)
Call InsertQuery (R_Fields_i, "manager_menu")
'//메뉴값 적용-----------------------------------------------------------------------------
sql = "select max(ct_idx) as ct_idx from manager_menu"
Set rs1 = dbcon.execute( sql )
max_ct_idx = rs1("ct_idx")
ct_codeno = ct_codeno_ref & "C" & max_ct_idx & ";"
sql = "update manager_menu set ct_codeno='" & ct_codeno & "' WHERE ct_idx = " & max_ct_idx
dbcon.execute sql
//-----------------------------------------------------------------------------------------
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?ct_idx=" & ct_ref
Else '//수정
R_Fields = "ct_name, ct_wdate, ct_url"
ct_wdate = getDateFm(Now(), 3)
Call UpdateQuery (R_Fields, "manager_menu", "where ct_idx=" & ct_idx)
'//자주쓰는 메뉴 부분 (
sql = "update manager_favorites set ct_name='" & ct_name & "' WHERE mm_ct_idx = " & ct_idx
dbcon.execute sql
'//자주쓰는 메뉴도 변경 되어야 된다.
If ct_ref = "0" then ct_ref = ""
ok_url = "write.asp?ct_idx=" & ct_ref
End if
dbcon.close
Set dbcon = nothing
Call loding("0",ok_url)
%>