<!--#include virtual="/common/file/head_03address.asp"-->
<%
Dim bdm_idx, info_url, bdm_depth, bdm_code, bdm_ref, bdm_menuname, bdm_t_clr, bdm_ro_clr, bdm_chk, bdm_type, bdm_target, bdm_bbs, bdm_editor, bdm_url, bdm_wdate, bdm_id
Dim prepage

prepage = Request.ServerVariables("path_info") & "?" & Request.ServerVariables("query_string")

r_fields_s	= "bdm_idx, info_url, bdm_depth, bdm_code, bdm_ref, bdm_menuname, bdm_t_clr, bdm_ro_clr, bdm_chk, bdm_type, bdm_target, bdm_bbs, bdm_editor, bdm_url, bdm_wdate, bdm_id"
table		= "bd_address"
Where		= " where bdm_id = '" & session("ss_m_id") & "'"
Orderby		= " order by bdm_code asc "

sql = "select " & r_fields_s & " from " & table & Where & Orderby
Set rs = dbcon.execute( sql )

If rs.bof Or rs.eof Then
	list_data = null
Else
	list_data = rs.getrows
End if

Set rs = nothing


%>

<script type="text/javascript">
//<![CDATA[

function sendit(eForm){
	//var eForm = document.frm;
	if(!valueChk(eForm.bdm_menuname, "그룹명")){return false;}
	//alert("OK");
}
function valueChk(obj, objName){	//text필드
	if(obj.value.split(" ").join("") == ""){
		alert(objName+"을(를) 입력하세요");
		try{
			obj.focus();
			return false;
		}catch(e){
			return false;
		}
	}else{
		return true;
	}
}

function SetNum(obj){			//숫자만 입력
	val=obj.value;
	re=/[^0-9]/gi;
	obj.value=val.replace(re,"");
}

//삭제
function DelOk(bdm_idx){
	if (confirm("주소록 그룹을 삭제하면 하위 주소록까지 삭제됩니다.\n\n삭제하시겠습니까?")){
		location.href="addr_grp_delete_ok.asp?bdm_idx="+bdm_idx;
	}return;
}

//]]>
</script>



<!-- 컨텐츠 부분-->
        <td width="720" align="left" valign="top">
		<table width="720" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="560" align="left" valign="top" style="padding-bottom:30px;"><img src="/sms_img/sub/stit_03.gif" height="69" /></td>
            <td width="300" align="right" valign="bottom" style="padding-bottom:30px;"><img src="/sms_img/sub/home.gif" width="14" height="10" /><img src="/sms_img/sub/arrow.gif" width="14" height="10" /><span class="style11">주소록</span></td>
          </tr>

<!-- 핸드폰 전송 부분-->
          <tr>
			<td colspan="2">


<link rel="Stylesheet" type="text/css" href="/manager/common/css/sub_layout.css" />
<link rel="Stylesheet" type="text/css" href="/manager/common/css/all.css" />

<link rel="Stylesheet" type="text/css" href="/content/board/nninc_simple/css/common.css" />


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

			<div>
 


					<form id="frm_list" name="frm_list" method="post" action="addr_grp_write_ok.asp" onsubmit="return sendit(this);">
					<input type="hidden" id="chk_all" name="chk_all" />
					<input type="hidden" id="prepage" name="prepage" value="<%=prepage%>" />
					<div class="write_info">

						<div class="write_form pt7" style="width:700px;">
 
							<ul>
							<li class="text"><label for="bdm_menuname">그룹등록</label> :</li>
 
							<li><input type="text" size="68" title="그룹명 입력" id="bdm_menuname" name="bdm_menuname" class="input_box input" value="" maxlength="50" /></li>
  
							<li><div id="blue_bt"><span class="button"><input type="submit" value="등록" /></span></div></li>
							</ul>
 

						</div>
 
					</div>
					</form>
 
 <div class="table_blist">


						<table cellspacing="0" summary="주소록에 사용하는 그룹를 관리합니다.">
						<caption>그룹관리 서식</caption>
						<colgroup>
						<col width="60" />
						<col />
						<col width="60" />
						<col width="60" />
						</colgroup>
 
						<thead>
						<tr>
							<th scope="col" style="border-left:1px solid #E5E5E5;">순서</th>
							<th scope="col">그룹</th>
							<th scope="col">수정</th>
							<th scope="col" style="background:none;border-right:1px solid #E5E5E5;">삭제</th>
						</tr>
						</thead>
						<tbody>
<%
If Not( isnull( list_data ) ) Then
	For i = 0 To Ubound(list_data, 2)
		Call arr2Value(r_fields_s, "list_data", i)
%>
						<form id="editfrm_<%=i%>" name="editfrm_<%=i%>" method="post" action="addr_grp_write_ok.asp" onsubmit="return sendit(this);">
						<input type="hidden" name="bdm_idx" value="<%=bdm_idx%>" />
						<tr>
							<td scope="row" class="center">
								<a href="move.asp?move=up&amp;s_num=9&amp;s_code=1" title="순서 위로 이동" tabindex="5046"><img src="/manager/img/ic_up.gif" width="10" height="9" alt="순서 위로 이동" /></a><a href="move.asp?move=down&amp;s_num=9&amp;s_code=1" title="순서 아래로 이동" tabindex="5047"><img src="/manager/img/ic_down.gif" width="10" height="9" alt="순서 아래로 이동" /></a>
							</td>
							<td scope="row" class="left" style="text-align:left;">
								<input type="text" size="98" title="메뉴 입력" id="bdm_menuname" name="bdm_menuname" class="input_box" value="<%=bdm_menuname%>" maxlength="50" />
							</td>
							<td scope="row" class="center"><input type="submit" value="수정" class="ct_bt01" />
 							</td>
							<td scope="row" class="center">
								<input type="button" value="삭제" class="ct_bt01" onclick="DelOk('<%=bdm_idx%>');" />
							</td>

						</tr>
						</form>

<%
	next
End if
%>


						</tbody>
						</table>

 
					<!-- <div class="contoll_box2">
						<ul>
							<li class="pt7"><div class="bt01"><a href="./index.asp"><span>주소록보기</span></a></div></li>
						</ul>
					</div> -->

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





			</td>
           </tr>
        </table>
		</td>
      </tr>
    </table>
<!--#include virtual="/common/file/bottom.asp"-->