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

//-- 회원 비빌번호 변경 ziumsoft

//-- 로그인 돼 있을 때 회원정보 관리 메뉴 포함
if($is_member) include_once($member_skin_path."/zm.userinfo_menu.skin.php");
?>
<style type="text/css">
#zmb_pswd_modify_box	{ text-align:center; margin:50px; }
#zmb_pswd_modify_box table tr	{ background:#FFFFFF; }
#zmb_pswd_modify_box table td	{ color:#4D4D4D; font-weight:bold; text-align:left; }
</style>

<div style="text-align:center;"><img src="<?=$member_skin_path?>/img/title_passwd_change.gif"></div>
<form id="fregisterform" name=fregisterform method=post onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
<div id="zmb_pswd_modify_box">
<input type=hidden name=w                value="pu">
<input type=hidden name=url              value="zm.userinfo.php?pcd=pwmodify">
<table width="600" cellspacing="1" cellpadding="6" align="center" bgcolor="#EBEBEB">
<tr>
	<td bgcolor="#F7F7F7">비밀번호 :</td>
	<td><INPUT class=ed type=password name="mb_password" size=20 maxlength=20 <?=($w=="")?"required":"";?> itemname="비밀번호"></td>
</tr>
<tr>
	<td bgcolor="#F7F7F7">새 비밀번호 : </td>
	<td><INPUT class=ed type=password name="mb_new_password" size=20 maxlength=20 <?=($w=="")?"required":"";?> itemname="새 비밀번호"> <span style="font-weight:normal;">(6자 이상, 영문은 대소문자 구분합니다.)</span></td>
</tr>
<tr>
	<td bgcolor="#F7F7F7">새 비밀번호 확인 :</td>
	<td><INPUT class=ed type=password name="mb_new_password_re" size=20 maxlength=20 <?=($w=="")?"required":"";?> itemname="새 비밀번호 확인"></td>
</tr>
</table>
<div style="margin:40px;"><INPUT type=image src="<?=$member_skin_path?>/img/join_ok_btn.gif" border=0 accesskey='s'></div>
</div>
</form>

<script language="javascript">
function fregisterform_submit(f) 
{
    if (f.mb_new_password.value != f.mb_new_password_re.value) {
        alert('패스워드가 같지 않습니다.');
        f.mb_new_password_re.focus();
        return false;
    }

    if (f.mb_new_password.value.length > 0) {
        if (f.mb_new_password_re.value.length < 6) {
            alert('패스워드를 6글자 이상 입력하십시오.');
            f.mb_new_password_re.focus();
            return false;
        }
    }

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

    // 보안인증관련 코드로 반드시 포함되어야 합니다.
    set_cookie("<?=md5($token)?>", "<?=base64_encode($token)?>", 1, "<?=$g4['cookie_domain']?>");

    return true;
}
</script>