따옴표 및 php_eol 수정

This commit is contained in:
chicpro
2013-01-21 11:19:16 +09:00
parent 926281afa4
commit 346e4acf41
2 changed files with 26 additions and 26 deletions

View File

@ -16,12 +16,12 @@ $email = trim($_POST['mb_email']);
if (!$email)
alert_close('메일주소 오류입니다.');
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_email = '{$email}' ";
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_email = '$email' ";
$row = sql_fetch($sql);
if ($row['cnt'] > 1)
alert('동일한 메일주소가 2개 이상 존재합니다.\n\n관리자에게 문의하여 주십시오.');
alert('동일한 메일주소가 2개 이상 존재합니다.\\n\\n관리자에게 문의하여 주십시오.');
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g4['member_table']} where mb_email = '{$email}' ";
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g4['member_table']} where mb_email = '$email' ";
$mb = sql_fetch($sql);
if (!$mb['mb_id'])
alert('존재하지 않는 회원입니다.');
@ -35,17 +35,17 @@ $randval = rand(4, 6);
$change_password = substr(md5(get_microtime()), 0, $randval);
$mb_lost_certify = sql_password($change_password);
$mb_datetime = sql_password($mb[mb_datetime]);
$mb_datetime = sql_password($mb['mb_datetime']);
// 회원테이블에 필드를 추가
sql_query(" ALTER TABLE `{$g4[member_table]}` ADD `mb_lost_certify` VARCHAR( 255 ) NOT NULL AFTER `mb_memo` ", false);
sql_query(" ALTER TABLE `{$g4['member_table']}` ADD `mb_lost_certify` VARCHAR( 255 ) NOT NULL AFTER `mb_memo` ", false);
$sql = " update {$g4[member_table]}
set mb_lost_certify = '{$mb_lost_certify}'
where mb_id = '{$mb[mb_id]}' ";
$sql = " update {$g4['member_table']}
set mb_lost_certify = '$mb_lost_certify'
where mb_id = '{$mb['mb_id']}' ";
sql_query($sql);
$href = $g4[url].'/'.$g4[bbs].'/password_lost_certify.php?mb_no='.$mb[mb_no].'&mb_datetime='.$mb_datetime.'&mb_lost_certify='.$mb_lost_certify;
$href = $g4['url'].'/'.$g4['bbs'].'/password_lost_certify.php?mb_no='.$mb['mb_no'].'&mb_datetime='.$mb_datetime.'&mb_lost_certify='.$mb_lost_certify;
$subject = '요청하신 회원아이디/패스워드 정보입니다.';
@ -54,13 +54,13 @@ $content .= '<div style="line-height:180%;">';
$content .= '<p>요청하신 계정정보는 다음과 같습니다.</p>';
$content .= '<hr>';
$content .= '<ul>';
$content .= '<li>회원아이디 : '.$mb[mb_id].'</li>';
$content .= '<li>회원아이디 : '.$mb['mb_id'].'</li>';
$content .= '<li>변경 패스워드 : <span style="color:#ff3300; font:13px Verdana;"><strong>'.$change_password.'</strong></span></li>';
$content .= '<li>이름 : '.addslashes($mb[mb_name]).'</li>';
$content .= '<li>별명 : '.addslashes($mb[mb_nick]).'</li>';
$content .= '<li>이메일주소 : '.addslashes($mb[mb_email]).'</li>';
$content .= '<li>요청일시 : '.$g4[time_ymdhis].'</li>';
$content .= '<li>홈페이지 : '.$g4[url].'</li>';
$content .= '<li>이름 : '.addslashes($mb['mb_name']).'</li>';
$content .= '<li>별명 : '.addslashes($mb['mb_nick']).'</li>';
$content .= '<li>이메일주소 : '.addslashes($mb['mb_email']).'</li>';
$content .= '<li>요청일시 : '.$g4['time_ymdhis'].'</li>';
$content .= '<li>홈페이지 : '.$g4['url'].'</li>';
$content .= '</ul>';
$content .= '<hr>';
$content .= '<p><a href="'.$href.'" target="_blank">'.$href.'</a></p>';
@ -75,7 +75,7 @@ $content .= '<p>[끝]</p>';
$content .= '</div>';
$admin = get_admin('super');
mailer($admin[mb_nick], $admin[mb_email], $mb[mb_email], $subject, $content, 1);
mailer($admin['mb_nick'], $admin['mb_email'], $mb['mb_email'], $subject, $content, 1);
alert_close($email.' 메일로 회원아이디와 패스워드를 인증할 수 있는 메일이 발송 되었습니다.\n\n메일을 확인하여 주십시오.');
alert_close($email.' 메일로 회원아이디와 패스워드를 인증할 수 있는 메일이 발송 되었습니다.\\n\\n메일을 확인하여 주십시오.');
?>

View File

@ -3,23 +3,23 @@ include_once('./_common.php');
// 오류시 공히 Error 라고 처리하는 것은 회원정보가 있는지? 패스워드가 틀린지? 를 알아보려는 해킹에 대비한것
$mb_no = trim($_GET[mb_no]);
$mb_datetime = trim($_GET[mb_datetime]);
$mb_lost_certify = trim($_GET[mb_lost_certify]);
$mb_no = trim($_GET['mb_no']);
$mb_datetime = trim($_GET['mb_datetime']);
$mb_lost_certify = trim($_GET['mb_lost_certify']);
// 회원아이디가 아닌 회원고유번호로 회원정보를 구한다.
$sql = " select mb_id, mb_datetime, mb_lost_certify from {$g4[member_table]} where mb_no = '{$mb_no}' ";
$sql = " select mb_id, mb_datetime, mb_lost_certify from {$g4['member_table']} where mb_no = '$mb_no' ";
$mb = sql_fetch($sql);
if (!trim($mb[mb_lost_certify]))
if (!trim($mb['mb_lost_certify']))
die("Error");
// 인증 링크는 한번만 처리가 되게 한다.
sql_query(" update {$g4[member_table]} set mb_lost_certify = '' where mb_no = '{$mb_no}' ");
sql_query(" update {$g4['member_table']} set mb_lost_certify = '' where mb_no = '$mb_no' ");
// 변경될 패스워드가 넘어와야하고 저장된 변경패스워드를 md5 로 변환하여 같으면 정상
if ($mb_lost_certify && $mb_datetime === sql_password($mb[mb_datetime]) && $mb_lost_certify === $mb[mb_lost_certify]) {
sql_query(" update {$g4[member_table]} set mb_password = '{$mb[mb_lost_certify]}' where mb_no = '{$mb_no}' ");
alert('이메일로 보내드린 패스워드로 변경 하였습니다.'.PHP_EOL.PHP_EOL.'회원아이디와 변경된 패스워드로 로그인 하시기 바랍니다.', $g4[url].'/'.$g4[bbs].'/login.php');
if ($mb_lost_certify && $mb_datetime === sql_password($mb['mb_datetime']) && $mb_lost_certify === $mb['mb_lost_certify']) {
sql_query(" update {$g4['member_table']} set mb_password = '{$mb['mb_lost_certify']}' where mb_no = '$mb_no' ");
alert('이메일로 보내드린 패스워드로 변경 하였습니다.\\n\\n회원아이디와 변경된 패스워드로 로그인 하시기 바랍니다.', $g4['url'].'/'.$g4['bbs'].'/login.php');
}
else {
die("Error");