<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
 * g4m basic login skin
 * login.skin.php
 * 
 */
?>
 
<script type="text/javascript" src="<?php echo $g4['path']?>/js/capslock.js"></script>

<div class="page-header">
    <h1>로그인</h1>
</div>
<form name="flogin" method="post" onsubmit="return flogin_submit(this);" autocomplete="off" action="<?php echo $g4['bbs_path'] ?>/login_check.php" class="well form-horizontal" role="form">
    <input type="hidden" name="url" value='<?php echo $login_url ?>'/>
    <div class="form-group">
        <label class="col-sm-2 control-label" for="login_mb_id">아이디</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" maxlength="26" name="mb_id" id="login_mb_id" placeholder="아이디" />
            <p class="help-block"></p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label" for="login_mb_password">비밀번호</label>
        <div class="col-sm-10">
            <input type="password" class="form-control" maxlength="16" name="mb_password" id="login_mb_password" placeholder="비밀번호"/>
            <p class="help-block"></p>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <div class="checkbox">
                <label><input type="checkbox" name="auto_login" id="login_auto_login" value="1" /> 자동로그인</label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" id="btn" class="btn btn-primary btn-100">로그인</button>
        </div>
    </div>

    
</form>

<ol class="breadcrumb">
    <li><a href="<?php echo $g4['g4m_bbs_path']?>/register.php">회원가입</a></li>
    <li><a href="<?php echo $g4['g4m_bbs_path']?>/password_lost.php">아이디&middot;비밀번호찾기</a></li>
</ol>
<div class='msg'></div>

                
            

<script type="text/javascript">
    
    function flogin_submit(f){
        if (!f.mb_id.value.trim()) {
            alert('아이디를 입력하세요!');
            f.mb_id.focus();
            return false;
        }

        if (!f.mb_password.value.trim()) {
            alert("비밀번호를 입력하십시오.");
            f.mb_password.focus();
            return false;
        }

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

        return true;
    }
</script>