alert 코드를 수정하여 자바스크립트 off 상태에서 post 다시 값을 넘겨줄 수 있도록 수정

This commit is contained in:
chicpro
2013-02-01 14:17:43 +09:00
parent 1f773795b8
commit c48b3f4ddc
4 changed files with 41 additions and 18 deletions

View File

@ -1,8 +1,14 @@
<?
global $lo_location;
global $lo_url;
$g4['title'] = "오류가 있습니다.";
include_once('./_common.php');
if($error) {
$g4['title'] = "오류가 있습니다.";
} else {
$g4['title'] = "내용을 확인해 주세요.";
}
include_once(G4_PATH.'/head.sub.php');
// 필수 입력입니다.
// 양쪽 공백 없애기
@ -32,9 +38,6 @@ if($error) {
$header2 = "다음 내용을 확인해 주세요.";
}
?>
<div id="validation_check">
<h1><?=$header2?></h1>
<script>
alert("<? echo $msg; ?>");
@ -42,12 +45,32 @@ document.location.href = "<? echo $url; ?>";
</script>
<noscript>
<div id="validation_check">
<h1><?=$header2?></h1>
<p class="cbg">
<?=$msg2?>
</p>
<? if($post) { ?>
<form method="post" action="<?=$url?>">
<?
foreach($_POST as $key => $value) {
if(strlen($value) < 1)
continue;
if(preg_match("/pass|pwd|capt|url/", $key))
continue;
?>
<input type="hidden" name="<?=$key?>" value="<?=$value?>">
<?
}
?>
<input type="submit" value="돌아가기">
</form>
<? } else { ?>
<div class="btn_confirm">
<a href="<?=$url?>">돌아가기</a>
</div>
<? } ?>
<? /*
<article id="validation_check">
@ -70,10 +93,8 @@ document.location.href = "<? echo $url; ?>";
<a href="<?=$url?>">돌아가기</a>
</article>
*/ ?>
</noscript>
</div>
</noscript>
<?
include_once(G4_PATH.'/tail.sub.php');

View File

@ -53,22 +53,22 @@ $mb_10 = isset($_POST['mb_10']) ? escape_trim($_POST['mb_10'])
if ($w == '' || $w == 'u') {
if ($msg = empty_mb_id($mb_id)) alert($msg);
if ($msg = empty_mb_id($mb_id)) alert($msg, "", true, true); // alert($msg, $url, $error, $post);
if ($w == '' && !$mb_password)
alert('패스워드가 넘어오지 않았습니다.');
if($w == '' && $mb_password != $mb_password_re)
alert('패스워드가 일치하지 않습니다.');
if ($msg = empty_mb_name($mb_id)) alert($msg);
if ($msg = empty_mb_nick($mb_nick)) alert($msg);
if ($msg = empty_mb_email($mb_email)) alert($msg);
if ($msg = reserve_mb_id($mb_id)) alert($msg);
if ($msg = reserve_mb_nick($mb_nick)) alert($msg);
if ($msg = valid_mb_name($mb_name)) alert($msg);
if ($msg = valid_mb_nick($mb_nick)) alert($msg);
if ($msg = valid_mb_email($mb_email)) alert($msg);
if ($msg = prohibit_mb_email($mb_email))alert($msg);
if ($msg = empty_mb_name($mb_id)) alert($msg, "", true, true);
if ($msg = empty_mb_nick($mb_nick)) alert($msg, "", true, true);
if ($msg = empty_mb_email($mb_email)) alert($msg, "", true, true);
if ($msg = reserve_mb_id($mb_id)) alert($msg, "", true, true);
if ($msg = reserve_mb_nick($mb_nick)) alert($msg, "", true, true);
if ($msg = valid_mb_name($mb_name)) alert($msg, "", true, true);
if ($msg = valid_mb_nick($mb_nick)) alert($msg, "", true, true);
if ($msg = valid_mb_email($mb_email)) alert($msg, "", true, true);
if ($msg = prohibit_mb_email($mb_email))alert($msg, "", true, true);
if ($w=='') {
if ($msg = exist_mb_id($mb_id)) alert($msg);

View File

@ -128,7 +128,7 @@ function get_cookie($cookie_name)
// 경고메세지를 경고창으로
function alert($msg='', $url='', $error=true)
function alert($msg='', $url='', $error=true, $post=false)
{
global $g4, $config, $member;
global $is_admin;

View File

@ -10,6 +10,8 @@ var member_skin_url = "<?=$member_skin_url?>";
<form id="fregisterform" name="fregisterform" method="post" action="<?=$register_action_url?>" onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="url" value="<?=$urlencode?>">
<input type="hidden" name="agree" value="<?=$agree?>">
<input type="hidden" name="agree2" value="<?=$agree2?>">
<? if (isset($member['mb_sex'])) { ?><input type="hidden" name="mb_sex" value="<?=$member['mb_sex']?>"><? } ?>
<? if (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400))) { // 별명수정일이 지나지 않았다면 ?>
<input type="hidden" name="mb_nick_default" value="<?=$member['mb_nick']?>">