<?
if (!defined("_GNUBOARD_")) exit;
if(!$is_member) alert("회원만 접근 가능합니다.", "./login.php?url=zm.userinfo.php?pcd=leave");

?>
<link rel="stylesheet" href="<?=$member_skin_path?>/zm.style.css" type="text/css">
<style type="text/css">
table tr	{  }
table tr td	{ border-top:1px solid #EFEFEF; padding:15px; }
table tr:last-child td	{ border-bottom:1px solid #EFEFEF; }
table tr td:first-child	{ background:#FBFBFB; font-weight:bold; }

table tr td input	{ border:1px solid #DFDFDF; border-radius:3px; padding:10px; }
table tr td select	{ border:1px solid #DFDFDF; border-radius:3px; padding:10px; cursor:pointer; }
</style>

<div style="text-align:center;"><img src="<?=$member_skin_path?>/img/title_mem_leave.gif"></div>
<form id="fregisterform" name=fregisterform method=post onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
<table width="600" align="center" cellpadding="0" cellspacing="0">
<tr>
	<td width="160">아이디</td>
	<td><?=$member[mb_id]?></td>
</tr>
<tr>
	<td>이름</td>
	<td><input name="mb_name" required itemname="이름"></td>
</tr>
<tr>
	<td>별명</td>
	<td><input name="mb_nick" required itemname="별명"></td>
</tr>
<tr>
	<td width="140">비밀번호</td>
	<td><input type="password" name="mb_password" required itemname="비밀번호"></td>
</tr>
<? if($zm_config[usepasswdq]) : ?>
<tr>
	<td>비밀번호 분실 질문</td>
	<td><?=$member[mb_password_q]?></td>
</tr>
<tr>
	<td>비밀번호 질문 답변</td>
	<td><input name="mb_passworda" required itemname="비밀번호 질문의 답변"></td>
</tr>
<? endif; ?>
<tr>
	<td>이메일</td>
	<td><input name="mb_email" required itemname="이메일" size="50"></td>
</tr>
<tr>
	<td>탈퇴 이유</td>
	<td><select name="whyleave">
	<option value="">탈퇴하는 이유를 선택 해 주세요.</option>
	<option>개인정보 노출 우려</option>
	<option>서비스 불만</option>
	<option>서비스가 필요 없게 되서</option>
	<option>기타</option>
	</select>
	</td>
</tr>
</table>

<?
if($member[mb_id])	$backurl	= $g4[bbs_path] . "/zm.userinfo.php?pcd=home";
else				$backurl	= $g4[bbs_path] . "/register.php";
?>
<div style="margin:10px; text-align:center; color:#454545;">
다시 가입을 원하실 때는 고객센터에 문의 바랍니다.<br>
보다 나은 서비스를 위해 노력하겠습니다.<br><br>
	<input type=button value="이전단계" class="btn_pre" onclick="zm_gourl('<?=$backurl?>');">
	<input type=submit value="다음단계" class="btn_next">
</div>
</form>

<script type="text/javascript">
function fregisterform_submit(f) {
	if(!confirm('탈퇴를 진행 할까요?')) return false;

    <?
    if ($g4[https_url])
        echo "f.action = '$g4[https_url]/$g4[bbs]/member_leave.php';";
    else
        echo "f.action = './member_leave.php';";
    ?>

    return true;
}
</script>