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

<%

' 레코드필드
R_Fields = "mc_idx, mc_addr, mc_nickname, mc_phone, mc_mobile, mc_email, mc_homepage, mc_joinlevel, mc_wdate, mc_jumin, mc_mailing, mc_sms, mc_sex, mc_birth, mc_fax, mc_marry, mc_marrydate, mc_job, mc_text, mc_nickname_req, mc_jumin_req, mc_sex_req, mc_birth_req, mc_phone_req, mc_fax_req, mc_mobile_req, mc_email_req, mc_addr_req, mc_homepage_req, mc_marry_req, mc_marrydate_req, mc_job_req, mc_text_req, mc_recom, mc_recom_point, mc_new_point, mc_agree, mc_agree_str, mc_info, mc_info_str"

sql = "SELECT top 1 "&R_Fields&" FROM member_config"
Set Rs = Dbcon.Execute (sql)
If Not rs.eof Then

	R_Fields	= replace(R_Fields, " ", "")
	R_Fields_arr	= split(R_Fields,",")

	For i=0 To UBound(R_Fields_arr)
		execute( R_Fields_arr(i) & "= rs("""&R_Fields_arr(i)&""")")
	Next
	
Else


	R_Fields	= replace(R_Fields, " ", "")
	R_Fields_arr	= split(R_Fields,",")

	For i=0 To UBound(R_Fields_arr)
		execute(R_Fields_arr(i)&" = ""N""")
	next

	mc_joinlevel	= "0"


End If
rs.close : Set rs = nothing

%>


		<!-- 내용영역 -->
		<div id="contents">

			<div id="contents_head"> 
				<div id="contents_title">
					<img src="/manager/img/tit_ic03.gif" width="22" height="21" class="<%=skin%> center" alt="" /><h1><span>회원가입 환경설정</span></h1>
				</div>
				<div id="location">
					<a href="/manager/" >Home</a> &gt; <a href="/manager/content/03member/list.asp" >회원관리</a> &gt; <a href="write.asp" class="now" >회원가입 환경설정</a>
				</div>
			</div>

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

<form id="frm" method="post" action="write_ok.asp">
<div>
	<input type="hidden" name="mc_idx" value="<%=mc_idx%>" /><!-- (수정일때사용) -->
</div>


		<h2 class="<%=skin%>">약관 정보 <span>약관정보를 입력해주세요.</span></h2>
		<fieldset>
			<legend>약관정보 서식 작성</legend>
			<table cellspacing="0" class="bbs_<%=skin%>" summary="회원가입 약관정보를 위한 입력 양식입니다.">
			<caption>약관정보 서식</caption>
			<colgroup>
			<col width="120" />
			<col />
			</colgroup>
			<tr>
				<th scope="row">이용약관</th>
				<td class="left">
					<label for="mc_agree_Y"><input type="radio" id="mc_agree_Y" name="mc_agree" value="Y" title="사용 선택" onclick="document.getElementById('agree').style.display='block'" <%=chkRadio(mc_agree,"Y")%> />사용</label>
					<label for="mc_agree_N"><input type="radio" id="mc_agree_N" name="mc_agree" value="N" title="사용안함 선택" onclick="document.getElementById('agree').style.display='none'" <%=chkRadio(mc_agree,"N")%>  />사용안함</label>

					<div id="agree" style="display:block;" class="pt4">
						<textarea style="width: 98%; height: 180px;" id="mc_agree_str" name="mc_agree_str" title="약관 내용 입력" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" ><%=mc_agree_str%></textarea>
					</div>

					<%If mc_agree = "N" then%>
					<script type='text/javascript'>
					<!--
						document.getElementById('agree').style.display='none'
					//-->
					</script>
					<%End if%>
				</td>
			</tr>
			<tr>
				<th scope="row">개인정보취급방침</th>
				<td class="left">
					<label for="mc_info_Y"><input type="radio" id="mc_info_Y" name="mc_info" value="Y" title="사용 선택" onclick="document.getElementById('info').style.display='block'" <%=chkRadio(mc_info,"Y")%>/>사용</label>
					<label for="mc_info_N"><input type="radio" id="mc_info_N" name="mc_info" value="N" title="사용안함 선택" onclick="document.getElementById('info').style.display='none'" <%=chkRadio(mc_info,"N")%> />사용안함</label>

					<div id="info" style="display:block;" class="pt4">
						<textarea style="width: 98%; height: 180px;" id="mc_info_str" name="mc_info_str" title="약관 내용 입력" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" ><%=mc_info_str%></textarea>
					</div>

					<%If mc_info = "N" then%>
					<script type='text/javascript'>
					<!--
						document.getElementById('info').style.display='none'
					//-->
					</script>
					<%End if%>
				</td>
			</tr>
			</table>
		</fieldset>



		<h2 class="<%=skin%>">필드관리 <span>필드정보를 선택해주세요.</span></h2>
		<fieldset>
		<legend>필드정보 서식 선택/수정</legend>
		<table cellspacing="0" class="bbs_<%=skin%>" summary="회원가입 필드정보를 위한 선택 양식입니다.">
		<caption>필드정보 서식</caption>
		<colgroup>
		<col width="120" />
		<col width="235" />
		<col width="120" />
		<col width="235" />
		</colgroup>

		<tr>
			<th scope="row">닉네임</th>
			<td class="left">
				<label for="mc_nickname_Y"><input type="radio" id="mc_nickname_Y" name="mc_nickname" value="Y" title="사용 선택" <% if mc_nickname = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_nickname_N"><input type="radio" id="mc_nickname_N" name="mc_nickname" value="N" title="사용안함 선택" <% if mc_nickname = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_nickname_req"><input type="checkbox" id="mc_nickname_req" name="mc_nickname_req" value="Y" <% if mc_nickname_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			<th scope="row">주민등록번호</th>
			<td class="left">
				<label for="mc_jumin_Y"><input type="radio" id="mc_jumin_Y" name="mc_jumin" value="Y" title="사용 선택" <% if mc_jumin = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_jumin_N"><input type="radio" id="mc_jumin_N" name="mc_jumin" value="N" title="사용안함 선택" <% if mc_jumin = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_jumin_req"><input type="checkbox" id="mc_jumin_req" name="mc_jumin_req" value="Y" <% if mc_jumin_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
		</tr>

		<tr>
			<th scope="row">성별</th>
			<td class="left">
				<label for="mc_sex_Y"><input type="radio" id="mc_sex_Y" name="mc_sex" value="Y" title="사용 선택" <% if mc_sex = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_sex_N"><input type="radio" id="mc_sex_N" name="mc_sex" value="N" title="사용안함 선택" <% if mc_sex = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_sex_req"><input type="checkbox" id="mc_sex_req" name="mc_sex_req" value="Y" <% if mc_sex_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			<th scope="row">생년월일</th>
			<td class="left">
				<label for="mc_birth_Y"><input type="radio" id="mc_birth_Y" name="mc_birth" value="Y" title="사용 선택" <% if mc_birth = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_birth_N"><input type="radio" id="mc_birth_N" name="mc_birth" value="N" title="사용안함 선택" <% if mc_birth = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_birth_req"><input type="checkbox" id="mc_birth_req" name="mc_birth_req" value="Y" <% if mc_birth_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			
		</tr>

		<tr>
			<th scope="row">연락처</th>
			<td class="left">
				<label for="mc_phone_Y"><input type="radio" id="mc_phone_Y" name="mc_phone" value="Y" title="사용 선택" <% if mc_phone = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_phone_N"><input type="radio" id="mc_phone_N" name="mc_phone" value="N" title="사용안함 선택" <% if mc_phone = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_phone_req"><input type="checkbox" id="mc_phone_req" name="mc_phone_req" value="Y" <% if mc_phone_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			<th scope="row">팩스번호</th>
			<td class="left">
				<label for="mc_fax_Y"><input type="radio" id="mc_fax_Y" name="mc_fax" value="Y" title="사용 선택" <% if mc_fax = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_fax_N"><input type="radio" id="mc_fax_N" name="mc_fax" value="N" title="사용안함 선택" <% if mc_fax = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_fax_req"><input type="checkbox" id="mc_fax_req" name="mc_fax_req" value="Y" <% if mc_fax_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>			
		</tr>

		<tr>
			
			<th scope="row">휴대폰</th>
			<td class="left">
				<label for="mc_mobile_Y"><input type="radio" id="mc_mobile_Y" name="mc_mobile" value="Y" title="사용 선택" <% if mc_mobile = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_mobile_N"><input type="radio" id="mc_mobile_N" name="mc_mobile" value="N" title="사용안함 선택" <% if mc_mobile = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_mobile_req"><input type="checkbox" id="mc_mobile_req" name="mc_mobile_req" value="Y" <% if mc_mobile_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>

			<th scope="row">SMS수신동의</th>
			<td class="left">
				<label for="mc_sms_Y"><input type="radio" id="mc_sms_Y" name="mc_sms" value="Y" title="사용 선택" <% if mc_sms = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_sms_N"><input type="radio" id="mc_sms_N" name="mc_sms" value="N" title="사용안함 선택" <% if mc_sms = "N" then response.write "checked='checked'" %> />사용안함</label>
			</td>
		</tr>

		<tr>
			<th scope="row">이메일</th>
			<td class="left">
				<label for="mc_email_Y"><input type="radio" id="mc_email_Y" name="mc_email" value="Y" title="사용 선택" <% if mc_email = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_email_N"><input type="radio" id="mc_email_N" name="mc_email" value="N" title="사용안함 선택" <% if mc_email = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_email_req"><input type="checkbox" id="mc_email_req" name="mc_email_req" value="Y" <% if mc_email_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			<th scope="row">메일수신동의</th>
			<td class="left">
				<label for="mc_mailing_Y"><input type="radio" id="mc_mailing_Y" name="mc_mailing" value="Y" title="사용 선택" <% if mc_mailing = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_mailing_N"><input type="radio" id="mc_mailing_N" name="mc_mailing" value="N" title="사용안함 선택" <% if mc_mailing = "N" then response.write "checked='checked'" %> />사용안함</label>				
			</td>
			
		</tr>



		<tr>
			<th scope="row">주소</th>
			<td class="left">
				<label for="mc_addr_Y"><input type="radio" id="mc_addr_Y" name="mc_addr" value="Y" title="사용 선택" <% if mc_addr = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_addr_N"><input type="radio" id="mc_addr_N" name="mc_addr" value="N" title="사용안함 선택" <% if mc_addr = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_addr_req"><input type="checkbox" id="mc_addr_req" name="mc_addr_req" value="Y" <% if mc_addr_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			<th scope="row">홈페이지</th>
			<td class="left">
				<label for="mc_homepage_Y"><input type="radio" id="mc_homepage_Y" name="mc_homepage" value="Y" title="사용 선택" <% if mc_homepage = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_homepage_N"><input type="radio" id="mc_homepage_N" name="mc_homepage" value="N" title="사용안함 선택" <% if mc_homepage = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_homepage_req"><input type="checkbox" id="mc_homepage_req" name="mc_homepage_req" value="Y" <% if mc_homepage_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
		</tr>

		<tr>
			
			<th scope="row">결혼여부</th>
			<td class="left">
				<label for="mc_marry_Y"><input type="radio" id="mc_marry_Y" name="mc_marry" value="Y" title="사용 선택" <% if mc_marry = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_marry_N"><input type="radio" id="mc_marry_N" name="mc_marry" value="N" title="사용안함 선택" <% if mc_marry = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_marry_req"><input type="checkbox" id="mc_marry_req" name="mc_marry_req" value="Y" <% if mc_marry_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>

			<th scope="row">결혼기념일</th>
			<td class="left">
				<label for="mc_marrydate_Y"><input type="radio" id="mc_marrydate_Y" name="mc_marrydate" value="Y" title="사용 선택" <% if mc_marrydate = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_marrydate_N"><input type="radio" id="mc_marrydate_N" name="mc_marrydate" value="N" title="사용안함 선택" <% if mc_marrydate = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_marrydate_req"><input type="checkbox" id="mc_marrydate_req" name="mc_marrydate_req" value="Y" <% if mc_marrydate_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
		</tr>

		<tr>
			<th scope="row">직업</th>
			<td class="left">
				<label for="mc_job_Y"><input type="radio" id="mc_job_Y" name="mc_job" value="Y" title="사용 선택" <% if mc_job = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_job_N"><input type="radio" id="mc_job_N" name="mc_job" value="N" title="사용안함 선택" <% if mc_job = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_job_req"><input type="checkbox" id="mc_job_req" name="mc_job_req" value="Y" <% if mc_job_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
			<th scope="row">남기는말씀</th>
			<td class="left">
				<label for="mc_text_Y"><input type="radio" id="mc_text_Y" name="mc_text" value="Y" title="사용 선택" <% if mc_text = "Y" then response.write "checked='checked'" %> />사용</label>
				<label for="mc_text_N"><input type="radio" id="mc_text_N" name="mc_text" value="N" title="사용안함 선택" <% if mc_text = "N" then response.write "checked='checked'" %> />사용안함</label>
				&nbsp;&nbsp;
				<label for="mc_text_req"><input type="checkbox" id="mc_text_req" name="mc_text_req" value="Y" <% if mc_text_req = "Y" then response.write "checked='checked'" %> />필수</label>
			</td>
		</tr>



		<tr>
			<th scope="row"><label for="mc_joinlevel">회원가입시 등급</label></th>
			<td class="left" colspan="3">
				<select id="mc_joinlevel" name="mc_joinlevel" title="회원가입시 등급 선택" >


				<%
				'회원권한 부분

				R_Fields_mg = "g_num, g_menuname"
				sql2 = "Select "&R_Fields_mg&" from member_group where g_chk='Y' order by g_code "
				Set Rs2 = Dbcon.Execute (sql2)
				Do While Not Rs2.eof
				%>
				<option value="<%=Rs2("g_num")%>" <% if CStr(mc_joinlevel) = CStr(Rs2("g_num")) Then response.write "selected='selected'" %>><%=Rs2("g_menuname")%></option>
				<%
					Rs2.movenext
				loop
				%>

				</select>
			</td>
		</tr>

		</table>
		</fieldset>



		<div class="contoll_box">
			<div id="<%=skin%>_bt"><span class="button"><input type="submit" value="등록" /></span> <span class="button"><input type="button" value="취소" onclick="page_go1('write.asp');" /></span></div>
		</div>

</form>

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

		</div>
		<!-- '내용영역 -->


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