Merge branch 'g4s'

This commit is contained in:
chicpro
2013-08-06 18:32:17 +09:00
8 changed files with 140 additions and 19 deletions

View File

@ -3,6 +3,16 @@ include_once('./_common.php');
include_once(G4_PATH.'/head.sub.php');
?>
<script>
var conf = "<?php echo strip_tags($msg); ?>";
if (confirm(conf)) {
document.location.replace("<?php echo $url1; ?>");
} else {
document.location.replace("<?php echo $url2; ?>");
}
</script>
<noscript>
<article id="confirm_check">
<header>
<hgroup>
@ -18,6 +28,7 @@ include_once(G4_PATH.'/head.sub.php');
<a href="<?php echo $url2; ?>">취소</a><br><br>
<a href="<?php echo $url3; ?>">돌아가기</a>
</article>
</noscript>
<?php
include_once(G4_PATH.'/tail.sub.php');

View File

@ -13,7 +13,7 @@ if ($mb_md5)
{
sql_query(" update {$g4['member_table']} set mb_email_certify = '".G4_TIME_YMDHIS."' where mb_id = '{$mb_id}' ");
alert('E-mail 인증 처리를 완료 하였습니다.', G4_URL);
alert("메일인증 처리를 완료 하였습니다.\\n\\n지금부터 {$mb_id} 아이디로 로그인 가능합니다.", G4_URL);
}
}

View File

@ -30,8 +30,9 @@ if ($mb['mb_leave_date'] && $mb['mb_leave_date'] <= date("Ymd", G4_SERVER_TIME))
alert('탈퇴한 아이디이므로 접근하실 수 없습니다.\n탈퇴일 : '.$date);
}
if ($config['cf_use_email_certify'] && !preg_match("/[1-9]/", $mb['mb_email_certify']))
alert('메일인증을 받으셔야 로그인 하실 수 있습니다.\\n회원님의 메일주소는 '.$mb['mb_email'].' 입니다.');
if ($config['cf_use_email_certify'] && !preg_match("/[1-9]/", $mb['mb_email_certify'])) {
confirm("{$mb['mb_email']} 메일로 메일인증을 받으셔야 로그인 가능합니다. 다른 메일주소로 인증하시려면 취소를 클릭하시기 바랍니다.", G4_URL, G4_BBS_URL.'/register_email.php?mb_id='.$mb_id);
}
@include_once($member_skin_path.'/login_check.skin.php');

View File

@ -26,10 +26,9 @@ else {
}
}
$sql = " select * from {$g4['board_table']} a,
{$g4['group_table']} b
where a.gr_id = b.gr_id
and bo_table <> '$bo_table' ";
//$sql = " select * from {$g4['board_table']} a, {$g4['group_table']} b where a.gr_id = b.gr_id and bo_table <> '$bo_table' ";
// 원본 게시판을 선택 할 수 있도록 함.
$sql = " select * from {$g4['board_table']} a, {$g4['group_table']} b where a.gr_id = b.gr_id ";
if ($is_admin == 'group')
$sql .= " and b.gr_admin = '{$member['mb_id']}' ";
else if ($is_admin == 'board')
@ -59,7 +58,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<caption><?php echo $act ?>할 게시판을 한개 이상 선택하여 주십시오.</caption>
<thead>
<tr>
<th scope="col">선택</th>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
</th>
<th scope="col">게시판</th>
</tr>
</thead>
@ -67,6 +69,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<?php for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td class="td_chk">
<label for="chk<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['bo_table'] ?></label>
<input type="checkbox" id="chk<?php echo $i ?>" name="chk_bo_table[]" value="<?php echo $list[$i]['bo_table'] ?>">
</td>
<td>
@ -76,6 +79,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$save_gr_subject = $list[$i]['gr_subject'];
?>
<?php echo $list[$i]['bo_subject'] ?> (<?php echo $list[$i]['bo_table'] ?>)
<?php
if ($list[$i]['bo_table'] == $bo_table) {
echo " <- 원본 게시판";
}
?>
</label>
</td>
</tr>
@ -99,6 +107,15 @@ $(function() {
});
});
function all_checked(sw) {
var f = document.fboardmoveall;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_bo_table[]")
f.elements[i].checked = sw;
}
}
function fboardmoveall_submit(f)
{
var check = false;

View File

@ -68,6 +68,7 @@ while ($row = sql_fetch_array($result))
wr_email = '".addslashes($row2['wr_email'])."',
wr_homepage = '".addslashes($row2['wr_homepage'])."',
wr_datetime = '{$row2['wr_datetime']}',
wr_file = '{$row2['wr_file']}',
wr_last = '{$row2['wr_last']}',
wr_ip = '{$row2['wr_ip']}',
wr_1 = '".addslashes($row2['wr_1'])."',

45
bbs/register_email.php Normal file
View File

@ -0,0 +1,45 @@
<?php
include_once('./_common.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
$sql = " select mb_email, mb_datetime, mb_email_certify from {$g4['member_table']} where mb_id = '{$mb_id}' ";
$mb = sql_fetch($sql);
if (substr($mb['mb_email_certify'],0,1)!=0) {
alert("이미 메일인증 하신 회원입니다.", G4_URL);
}
$g4['title'] = '메일인증 메일주소 변경';
include_once('./_head.php');
?>
<p>메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.</p>
<form method="post" name="fregister_email" onsubmit="return fregister_email_submit(this);">
<input type="hidden" name="mb_id" value="<?php echo $mb_id; ?>">
<table class="frm_tbl">
<caption>사이트 이용정보 입력</caption>
<tr>
<th scope="row"><label for="reg_mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="mb_email" id="reg_mb_email" required class="frm_input email required" size="50" maxlength="100" value="<?php echo $mb['mb_email']; ?>"></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td><?php echo captcha_html(); ?></td>
</tr>
</table>
<input type="submit" id="btn_submit" class="btn_submit" value="인증메일변경">
<a href="<?php echo G4_URL ?>" class="btn_cancel">취소</a>
</form>
<script>
function fregister_email_submit(f)
{
<?php echo chk_captcha_js(); ?>
f.action = "<?php echo G4_HTTPS_BBS_URL.'/register_email_update.php'; ?>";
return true;
}
</script>
<?
include_once('./_tail.php');
?>

View File

@ -0,0 +1,44 @@
<?php
include_once('./_common.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
$mb_id = escape_trim($_POST['mb_id']);
$mb_email = escape_trim($_POST['mb_email']);
$sql = " select mb_datetime from {$g4['member_table']} where mb_id = '{$mb_id}' and mb_email_certify <> '' ";
$mb = sql_fetch($sql);
if (!$mb) {
alert("이미 메일인증 하신 회원입니다.", G4_URL);
}
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_id <> '{$mb_id}' and mb_email = '$mb_email' ";
$row = sql_fetch($sql);
if ($row['cnt']) {
alert("{$mb_email} 메일은 이미 존재하는 메일주소 입니다.\\n\\n다른 메일주소를 입력해 주십시오.");
}
// 인증메일 발송
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
$mb_datetime = $mb['mb_datetime'] ? $mb['mb_datetime'] : G4_TIME_YMDHIS;
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime);
$certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
ob_start();
include_once ('./register_form_update_mail3.php');
$content = ob_get_contents();
ob_end_clean();
$admin = get_admin('super');
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
$sql = " update {$g4['member_table']} set mb_email = '$mb_email' where mb_id = '$mb_id' ";
sql_query($sql);
alert("인증메일을 {$mb_email} 메일로 다시 보내 드렸습니다.\\n\\n{$mb_email} 메일을 확인하여 주십시오.", G4_URL);
?>

View File

@ -321,21 +321,23 @@ if ($w == '') {
{$sql_hp_certify}
where mb_id = '$mb_id' ";
sql_query($sql);
}
// 인증메일 발송
if ($old_email != $mb_email && $config['cf_use_email_certify']) {
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
$mb_md5 = md5($mb_id.$mb_email.$member['mb_datetime']);
$certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
// 인증메일 발송
if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
ob_start();
include_once ('./register_form_update_mail3.php');
$content = ob_get_contents();
ob_end_clean();
$mb_datetime = $member['mb_datetime'] ? $member['mb_datetime'] : G4_TIME_YMDHIS;
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime);
$certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
}
ob_start();
include_once ('./register_form_update_mail3.php');
$content = ob_get_contents();
ob_end_clean();
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
}