<!-- #include virtual="/manager/common/file/other_top.asp"-->
<%'//*************************************************************************************%>
<script type="text/javascript" src="/common/js/04emoticon.js"></script>
<%'//*************************************************************************************%>
<!-- #include file= "config.asp"-->
<%
Dim sql, table, idx_field, oreder_filed, Query_Fields, search_str, search_str2, Query_OrderBy
Dim s_num, s_code, s_menuname, s_chk, s_wdate

'//쓰기권한체크*************************************************************************************
if is_write <> "Y" Then
	back_back "쓰기권한이 없습니다."
End if
'//**************************************************************************************************


'//테이블 기본 환경설정 ********************************************************************************
table			= "emt_category"			'//테이블명
idx_field		= "s_num"					'//기본키
oreder_filed	= "s_code ASC"				'//정렬기준 필드
Query_Fields	= "s_num, s_code, s_menuname, s_chk, s_wdate"		'//불러올 필드
'//****************************************************************************************************

'//---------------조합 쿼리문------------------------------------
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 s_num <> '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/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> &gt; <a href="/manager/content/04emoticon/write.asp" tabindex="<%=getTabIndex()%>">이모티콘관리</a> &gt; <a href="/manager/content/04emoticon/write.asp" class="now" tabindex="<%=getTabIndex()%>">이모티콘분류관리</a>
				</div>
			</div>

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

					<h2 class="<%=skin%>">이모티콘 분류</h2>
					
					
					<form id="frm" method="post" action="write_ok.asp" onsubmit="return w_chk();">
				
					<div class="write_info">

						<div class="write_form pt7">
							

							<ul>
							<li class="text"><label for="s_menuname_i">분류등록</label> :</li>

							<li><input type="text" size="80" title="분류명 입력" id="s_menuname" name="s_menuname" class="input_box input" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" maxlength="100" tabindex="<%=getTabIndex()%>" /></li>

							<li><select id="s_chk" name="s_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=""  method='post'>
					<div>
						<input type="hidden" id="status" name="status" />
						<input type="hidden" id="s_chk" name="s_chk" />
						<input type="hidden" id="s_num" name="s_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="60" />
						<col />
						<col width="80" />
						<col width="60" />
						<col width="60" />
						</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>
						</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>
						</tr>
<%
						Else
							For zz = 1 To UBound(list_data, 2)+1
								Call arr2Value( Query_Fields, "list_data", zz-1 )

								If s_chk = "Y" then
									s_chk_str = "<strong>사용</strong>"
								else
									s_chk_str = "중지"
								End if
%>
						<tr>
							<td scope="row" class="center"><input type="checkbox" name="chk" value="<%=s_num%>" title="해당 메뉴 선택" tabindex="<%=getTabIndex()%>" /></td>
							<td scope="row" class="center">
								<a href="move.asp?move=up&amp;s_num=<%=s_num%>&amp;s_code=<%=s_code%>" title="순서 위로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_up.gif" width="10" height="9" alt="순서 위로 이동" /></a><a href="move.asp?move=down&amp;s_num=<%=s_num%>&amp;s_code=<%=s_code%>" title="순서 아래로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_down.gif" width="10" height="9" alt="순서 아래로 이동" /></a>
							</td>
							<td scope="row" class="left">
								<input type="text" size="58" title="메뉴 입력" id="s_menuname<%=zz%>" name="s_menuname<%=zz%>" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=s_menuname%>" maxlength="100" tabindex="<%=getTabIndex()%>" />
							</td>
							<td scope="row" class="center"><%=s_chk_str%></td>
							<td scope="row" class="center"><input type="button" value="수정" class="ct_bt01" onclick="frm_modify<%=zz%>(<%=s_num%>);" tabindex="<%=getTabIndex()%>" />

								
								<script type="text/javascript">
									function frm_modify<%=zz%>(s_num){
										var s_num, ct_ref;

										if (CheckSpaces(document.getElementById('frm_list').s_menuname<%=zz%>, '분류명')) { return false; }
										//else if (CheckSpaces(document.getElementById('frm').sc_sitename_en, '영문명')) { return false; }

										else {

											loading_st(1);
											document.getElementById('frm_m').s_menuname.value	= document.getElementById('frm_list').s_menuname<%=zz%>.value;
											//document.getElementById('frm_m').s_chk.value	= document.getElementById('frm_list').s_chk<?=$zz?>.value;

											document.getElementById('frm_m').s_num.value	= s_num;
											document.getElementById('frm_m').action			= "write_ok.asp";
											document.getElementById('frm_m').submit();
										
										}
									}
								</script>
							</td>
							<td scope="row" class="center">
							<%If s_num <> "9" then%>
								<input type="button" value="삭제" class="ct_bt01" onclick="return d_chk('delete_ok.asp?s_num=<%=s_num%>');"  tabindex="<%=getTabIndex()%>" />
							<%End if%>
							</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="s_menuname" />
				<input type="hidden" name="s_chk" />
				<input type="hidden" name="s_num" />
			</div>
		</form>

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