<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
?>
<div class="page-header">
    <h1>회원아이디 &middot; 비밀번호 찾기</h1>
</div>

<form name="fpasswordlost" method="post" onsubmit="return fpasswordlost_submit(this);" autocomplete="off" class="form-horizontal" role="form">
    <div class="form-group">
        <label class="control-label col-sm-2">이메일 주소</label>
        <div class="col-sm-10">
            <input type="text" name="mb_email" class="form-control" required email itemname="이메일주소" size="45" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-2"><img id='kcaptcha_image' /></label>
        <div class="col-sm-10">
            <input type=text name='wr_key' class="form-control" size=10 required itemname='자동등록방지'>
            숫자를 입력하세요.
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-10 col-sm-offset-2">
            <button type="submit" class="btn btn-100 btn-primary">다음</button>
        </label>
    </div>
</form>

<script type="text/javascript" src="<?php echo "{$g4['path']}/js/md5.js"?>"></script>
<script type="text/javascript" src="<?php echo "{$g4['path']}/js/jquery.kcaptcha.js"?>"></script>
<script type="text/javascript">
function fpasswordlost_submit(f)
{
    if (!check_kcaptcha(f.wr_key)) {
        return false;
    }

    <?php
    if ($g4['https_url'])
        echo "f.action = '{$g4['https_url']}/{$g4['bbs']}/password_lost2.php?v=update';";
    else
        echo "f.action = './password_lost2.php?v=update';";
    ?>

    return true;
}

self.focus();
document.fpasswordlost.mb_email.focus();

$(function() {
    var sw = screen.width;
    var sh = screen.height;
    var cw = document.body.clientWidth;
    var ch = document.body.clientHeight;
    var top  = sh / 2 - ch / 2 - 100;
    var left = sw / 2 - cw / 2;
    moveTo(left, top);
});
</script>