<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 

$url = '';
if ($g4['https_url']) {
    if (preg_match("/^\./", $urlencode))
        $url = $g4[url];
    else
        $url = $g4[url].$urlencode;
} else {
    $url = $urlencode;
}

$nhn1 = $_GET['nhn1'];
if($nhn1 != ''){
	@setcookie('lang',$nhn1,time()+3600*24,'/');
	include("$g4[path]/lang/$nhn1.php");
}else{
	$file = $_COOKIE['lang'];
	if(!$file) $file = 'kr';
	include("$g4[path]/lang/$file.php");
}

?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<script type="text/javascript" language=JavaScript>
// 엠파스 로긴 참고
var bReset = true;
function chkReset(f) 
{
    if (bReset) { if ( f.mb_id.value == '아이디' ) f.mb_id.value = ''; bReset = false; }
    document.getElementById("pw1").style.display = "none";
    document.getElementById("pw2").style.display = "";
}
</script>

<!-- 로그인 전 외부로그인 시작 -->
					





<table border="0" width="100%" id="table37" cellpadding="2">
					<form name="fhead" method="post" action="javascript:fhead_submit(document.fhead);" autocomplete="off">
		            <input type="hidden" name="url" value="<?=$url?>">
						<tr>
							<td>
							<table border="0" width="100%" id="table788" cellspacing="1">
								<tr>
									<td>
									<table border="0" id="table789" cellspacing="0" cellpadding="0" width="100%">
										<tr>
											<td>
											<table onmouseover="this.style.background='#000000'" onmouseout="this.style.background=''" cellspacing="0" id="table790" cellpadding="0" width="100%">
												<tr>
													<td>
													<input name="mb_id" type="text" size="25" maxlength="20" required itemname="<?php echo $lang['34'];?>" value='<?php echo $lang['34'];?>' onMouseOver='chkReset(this.form);' onFocus='chkReset(this.form);' class="nhn3"></td>
												</tr>
											</table></td>
										</tr>
										<tr>
											<td>
											<table onmouseover="this.style.background='#000000'" onmouseout="this.style.background=''" cellspacing="0" id="table791" cellpadding="0" width="100%">
												<tr>
													<td id=pw1>
													<input type="text" size="25" maxlength="20" required itemname="<?php echo $lang['37'];?>" value='<?php echo $lang['37'];?>' onMouseOver='chkReset(this.form);' onfocus='chkReset(this.form);' class="nhn3"></td>
													<td id=pw2 style='display:none;'>
													<input name="mb_password" type="password" size="25" maxlength="20" itemname="<?php echo $lang['37'];?>" onMouseOver='chkReset(this.form);' onfocus='chkReset(this.form);' class="nhn3"></td>
												</tr>
											</table></td>
										</tr>
									</table></td>
								</tr>
							</table>
							</td>
						</tr>
						<tr>
							<td>
					<input type="submit" value="<?php echo $lang['38'];?>" name="B1" class="nhn4" style="color:#FFFFFF; font-weight:bold; background-color:#666666"></td>
						</tr>
						<tr>
							<td>
							<b>
										<a href="<?=$g4[bbs_path]?>/register.php">
										<font color="#2F3743"><?php echo $lang['39'];?></font></a></b> 
										<font color="#D6D6D6">| 
										</font> 
										&nbsp;<a href="javascript:win_password_forget();"><font color="#848689"><?php echo $lang['40'];?></font></a></td>
						</tr>
					</form>
					</table>

<script language="JavaScript">
function fhead_submit(f)
{
    if (!f.mb_id.value)
    {
        alert("<?php echo $lang['41'];?>");
        f.mb_id.focus();
        return;
    }

    if (document.getElementById('pw2').style.display!='none' && !f.mb_password.value)
    {
        alert("<?php echo $lang['42'];?>");
        f.mb_password.focus();
        return;
    }

    <?
    if ($g4[https_url])
        echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
    else
        echo "f.action = '$g4[bbs_path]/login_check.php';";
    ?>
    f.submit();
}
</script>
<!-- 로그인 전 외부로그인 끝 -->
							