겸손한 javascript 로 수정중

This commit is contained in:
gnuboard
2013-01-14 17:25:50 +09:00
parent 49036302da
commit 39cafe9ffc
19 changed files with 649 additions and 772 deletions

View File

@ -1,44 +1,16 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($g4['https_url']) {
$login_url = $_GET['url'];
if ($login_url) {
if (preg_match("/^\.\.\//", $url)) {
$login_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $login_url));
}
else {
$purl = parse_url($g4[url]);
if ($purl[path]) {
$path = urlencode($purl[path]);
$urlencode = preg_replace("/".$path."/", "", $urlencode);
}
$login_url = $g4[url].$urlencode;
}
}
else {
$login_url = $g4[url];
}
}
else {
$login_url = $urlencode;
}
if ($g4['https_url'])
$action_url = "{$g4['https_url']}/$g4[bbs]/login_check.php";
else
$action_url = "{$g4['bbs_path']}/login_check.php";
?>
<form name="flogin" method="post" action="<?=$action_url?>" onsubmit="return flogin_submit(this);">
<form name="flogin" method="post" action="<?=$login_action_url?>" onsubmit="return flogin_submit(this);">
<input type="hidden" name="url" value='<?=$login_url?>'>
<fieldset>
<label for="login_mb_id">아이디</label>
<input type="text" id="login_mb_id" name="mb_id" maxLength="20" size="15" required>
<label for="login_mb_id">회원아이디</label>
<input type="text" id="login_mb_id" name="mb_id" maxLength="20" size="15" required title="회원아이디">
<label for="login_mb_password">패스워드</label>
<input type="password" id="login_mb_password" name="mb_password" maxLength="20" size="15" required>
<input type="checkbox" id="login_auto_login" name="auto_login" onclick="if (this.checked) { if (confirm('자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n\공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?')) { this.checked = true; } else { this.checked = false;} }">
<input type="password" id="login_mb_password" name="mb_password" maxLength="20" size="15" required title="패스워드">
<input type="checkbox" id="login_auto_login" name="auto_login">
<label for="login_auto_login">자동로그인</label>
<input type="submit" value="로그인">
</fieldset>
@ -49,14 +21,20 @@ else
회원아이디 및 패스워드가 기억 안나실 때는 아이디/패스워드 찾기를 이용하십시오.<br>
아직 회원이 아니시라면 회원으로 가입 후 이용해 주십시오.
</p>
<a href="javascript:;" onclick="win_password_lost();">아이디/패스워드 찾기</a>
<a href="<?=$g4['bbs_url']?>/password_lost.php" id="login_password_lost" target="win_password_lost">아이디/패스워드 찾기</a>
<a href="./register.php">회원가입</a>
</section>
</form>
<script>
document.flogin.mb_id.focus();
$(document).ready(function(){
$("#login_auto_login").click(function(){
if (this.checked) {
this.checked = confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?");
}
});
}
function flogin_submit(f)
{

View File

@ -4,36 +4,24 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<h1>아이디/패스워드 찾기</h1>
<form name="fpasswordlost" method="post" onsubmit="return fpasswordlost_submit(this);" autocomplete="off">
<form name="fpasswordlost" method="post" action="<?=$action_url?>" onsubmit="return fpasswordlost_submit(this);" autocomplete="off">
<fieldset>
<legend>이메일 주소 입력</legend>
<p>회원가입 시 등록하신 이메일 주소를 입력해 주시면, 해당 이메일로 아이디와 패스워드 정보를 보내드립니다.</p>
<label for="mb_email">이메일 주소</label>
<input type="text" id="mb_email" name="mb_email" required size="45">
<img id="kcaptcha_image">
<input type="text" name="wr_key" size="10" required>
<label for="mb_email">E-mail 주소</label>
<input type="text" id="mb_email" name="mb_email" class="email" required size="45" title="E-mail 주소">
</fieldset>
<? echo captcha_html(); ?>
<div class="btn_confirm">
<input type="submit" value="확인">
<a href="javascript:window.close();">창닫기</a>
</div>
</form>
<script src="<?="$g4[path]/js/md5.js"?>"></script>
<script src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script>
function fpasswordlost_submit(f)
{
if (!check_kcaptcha(f.wr_key)) {
return false;
}
<?
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/password_lost2.php';";
else
echo "f.action = './password_lost2.php';";
?>
<? echo chk_captcha_js(); ?>
return true;
}