diff --git a/adm/member_form.php b/adm/member_form.php index dd40d6f28..b132c596f 100644 --- a/adm/member_form.php +++ b/adm/member_form.php @@ -9,7 +9,7 @@ $token = get_token(); if ($w == '') { $required_mb_id = 'required'; - $required_mb_id_class = 'required minlength=3 alnum_'; + $required_mb_id_class = 'required alnum_'; $required_mb_password = 'required'; $sound_only = '필수'; @@ -153,7 +153,7 @@ include_once('./admin.head.php'); - class="frm_input " size="15" maxlength="20" > + class="frm_input " size="15" minlength="3" maxlength="20"> 접근가능그룹보기 @@ -161,9 +161,9 @@ include_once('./admin.head.php'); - + - + @@ -219,11 +219,11 @@ include_once('./admin.head.php');
-
+ +

- 지번주소 : diff --git a/adm/member_list.php b/adm/member_list.php index cbcd77d92..9e23e76c1 100644 --- a/adm/member_list.php +++ b/adm/member_list.php @@ -186,7 +186,7 @@ $colspan = 16; if ($intercept_title == '') $intercept_title = '차단하기'; - $address = $row['mb_zip1'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3']) : ''; + $address = $row['mb_zip1'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3'], $row['mb_addr_jibeon']) : ''; $bg = 'bg'.($i%2); diff --git a/bbs/password_lost2.php b/bbs/password_lost2.php index d1bc4dbf3..10393e6b0 100644 --- a/bbs/password_lost2.php +++ b/bbs/password_lost2.php @@ -28,16 +28,19 @@ if (!$mb['mb_id']) else if (is_admin($mb['mb_id'])) alert('관리자 아이디는 접근 불가합니다.'); -// 난수 발생 -srand(time()); +// 임시비밀번호 발급 $change_password = rand(100000, 999999); $mb_lost_certify = sql_password($change_password); -$mb_datetime = sql_password($mb['mb_datetime']); -$sql = " update {$g5['member_table']} set mb_lost_certify = '$mb_lost_certify' where mb_id = '{$mb['mb_id']}' "; +// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용 +$mb_nonce = bin2hex(pack('V*', rand(), rand(), rand(), rand())); + +// 임시비밀번호와 난수를 mb_lost_certify 필드에 저장 +$sql = " update {$g5['member_table']} set mb_lost_certify = '$mb_nonce $mb_lost_certify' where mb_id = '{$mb['mb_id']}' "; sql_query($sql); -$href = G5_BBS_URL.'/password_lost_certify.php?mb_no='.$mb['mb_no'].'&mb_datetime='.$mb_datetime.'&mb_lost_certify='.$mb_lost_certify; +// 인증 링크 생성 +$href = G5_BBS_URL.'/password_lost_certify.php?mb_no='.$mb['mb_no'].'&mb_nonce='.$mb_nonce; $subject = "[".$config['cf_title']."] 요청하신 회원정보 찾기 안내 메일입니다."; @@ -69,4 +72,4 @@ $content .= ''; mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb['mb_email'], $subject, $content, 1); alert_close($email.' 메일로 회원아이디와 비밀번호를 인증할 수 있는 메일이 발송 되었습니다.\\n\\n메일을 확인하여 주십시오.'); -?> \ No newline at end of file +?> diff --git a/bbs/password_lost_certify.php b/bbs/password_lost_certify.php index ea427f04d..5307a7197 100644 --- a/bbs/password_lost_certify.php +++ b/bbs/password_lost_certify.php @@ -4,24 +4,24 @@ 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_nonce = trim($_GET['mb_nonce']); // 회원아이디가 아닌 회원고유번호로 회원정보를 구한다. -$sql = " select mb_id, mb_datetime, mb_lost_certify from {$g5['member_table']} where mb_no = '$mb_no' "; +$sql = " select mb_id, mb_lost_certify from {$g5['member_table']} where mb_no = '$mb_no' "; $mb = sql_fetch($sql); -if (!trim($mb['mb_lost_certify'])) +if (strlen($mb['mb_lost_certify']) < 33) die("Error"); // 인증 링크는 한번만 처리가 되게 한다. sql_query(" update {$g5['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 {$g5['member_table']} set mb_password = '{$mb['mb_lost_certify']}' where mb_no = '$mb_no' "); +// 인증을 위한 난수가 제대로 넘어온 경우 임시비밀번호를 실제 비밀번호로 바꿔준다. +if ($mb_nonce === substr($mb['mb_lost_certify'], 0, 32)) { + $new_password_hash = substr($mb['mb_lost_certify'], 33); + sql_query(" update {$g5['member_table']} set mb_password = '$new_password_hash' where mb_no = '$mb_no' "); alert('비밀번호가 변경됐습니다.\\n\\n회원아이디와 변경된 비밀번호로 로그인 하시기 바랍니다.', G5_BBS_URL.'/login.php'); } else { die("Error"); } -?> \ No newline at end of file +?> diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index c19f2c091..1dbf061f2 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -110,6 +110,13 @@ if ($w == '' || $w == 'u') { if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg, "", true, true); } +$mb_zip1 = preg_replace('/[^0-9]/', '', $mb_zip1); +$mb_zip2 = preg_replace('/[^0-9]/', '', $mb_zip2); +$mb_addr1 = clean_xss_tags($mb_addr1); +$mb_addr2 = clean_xss_tags($mb_addr2); +$mb_addr3 = clean_xss_tags($mb_addr3); +$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : ''; + // 사용자 코드 실행 @include_once($member_skin_path.'/register_form_update.head.skin.php'); diff --git a/bbs/zip.php b/bbs/zip.php index 55e4bc2b8..abb4ebe66 100644 --- a/bbs/zip.php +++ b/bbs/zip.php @@ -1,72 +1,15 @@ '; +} else { //http 통신 + echo ''; +} + include_once($member_skin_path.'/zip.skin.php'); include_once(G5_PATH.'/tail.sub.php'); diff --git a/common.php b/common.php index 5bab616f7..9b1885d49 100644 --- a/common.php +++ b/common.php @@ -364,17 +364,22 @@ if (isset($_REQUEST['gr_id'])) { if ($_SESSION['ss_mb_id']) { // 로그인중이라면 $member = get_member($_SESSION['ss_mb_id']); - // 오늘 처음 로그인 이라면 - if (substr($member['mb_today_login'], 0, 10) != G5_TIME_YMD) { - // 첫 로그인 포인트 지급 - insert_point($member['mb_id'], $config['cf_login_point'], G5_TIME_YMD.' 첫로그인', '@login', $member['mb_id'], G5_TIME_YMD); + // 차단된 회원이면 ss_mb_id 초기화 + if($member['mb_intercept_date'] && $member['mb_intercept_date'] <= date("Ymd", G5_SERVER_TIME)) { + set_session('ss_mb_id', ''); + $member = array(); + } else { + // 오늘 처음 로그인 이라면 + if (substr($member['mb_today_login'], 0, 10) != G5_TIME_YMD) { + // 첫 로그인 포인트 지급 + insert_point($member['mb_id'], $config['cf_login_point'], G5_TIME_YMD.' 첫로그인', '@login', $member['mb_id'], G5_TIME_YMD); - // 오늘의 로그인이 될 수도 있으며 마지막 로그인일 수도 있음 - // 해당 회원의 접근일시와 IP 를 저장 - $sql = " update {$g5['member_table']} set mb_today_login = '".G5_TIME_YMDHIS."', mb_login_ip = '{$_SERVER['REMOTE_ADDR']}' where mb_id = '{$member['mb_id']}' "; - sql_query($sql); + // 오늘의 로그인이 될 수도 있으며 마지막 로그인일 수도 있음 + // 해당 회원의 접근일시와 IP 를 저장 + $sql = " update {$g5['member_table']} set mb_today_login = '".G5_TIME_YMDHIS."', mb_login_ip = '{$_SERVER['REMOTE_ADDR']}' where mb_id = '{$member['mb_id']}' "; + sql_query($sql); + } } - } else { // 자동로그인 --------------------------------------- // 회원아이디가 쿠키에 저장되어 있다면 (3.27) diff --git a/config.php b/config.php index 518d7cae7..177d022d0 100644 --- a/config.php +++ b/config.php @@ -175,6 +175,9 @@ define('G5_LINK_COUNT', 2); // 썸네일 jpg Quality 설정 define('G5_THUMB_JPG_QUALITY', 90); +// 썸네일 png Compress 설정 +define('G5_THUMB_PNG_COMPRESS', 5); + // ip 숨김방법 설정 /* 123.456.789.012 ip의 숨김 방법을 변경하는 방법은 \\1 은 123, \\2는 456, \\3은 789, \\4는 012에 각각 대응되므로 diff --git a/js/common.js b/js/common.js index 2d1b266e2..8fcb2c09c 100644 --- a/js/common.js +++ b/js/common.js @@ -377,7 +377,7 @@ var win_homepage = function(href) { * 우편번호 창 **/ var win_zip = function(href) { - var new_win = window.open(href, 'win_zip', 'width=616, height=760, scrollbars=1'); + var new_win = window.open(href, 'win_zip', 'width=483, height=600, scrollbars=1'); new_win.focus(); } diff --git a/js/wrest.js b/js/wrest.js index e3ce98f7f..1b9c8db3a 100644 --- a/js/wrest.js +++ b/js/wrest.js @@ -204,15 +204,15 @@ function wrestAlNum_(fld) } // 최소 길이 검사 -function wrestMinLength(fld, css) +function wrestMinLength(fld) { if (!wrestTrim(fld)) return; - var str = css.split('='); // minlength=?? <-- str[1] + var minlength = fld.getAttribute("minlength"); if (wrestFld == null) { - if (fld.value.length < parseInt(str[1])) { - wrestMsg = wrestItemname(fld) + " : 최소 "+str[1]+"글자 이상 입력하세요.\n"; + if (fld.value.length < parseInt(minlength)) { + wrestMsg = wrestItemname(fld) + " : 최소 "+minlength+"글자 이상 입력하세요.\n"; wrestFld = fld; } } @@ -282,6 +282,10 @@ function wrestSubmit() wrestRequired(el); } + if (el.getAttribute("minlength") != null) { + wrestMinLength(el); + } + var array_css = el.className.split(" "); // class 를 공백으로 나눔 el.style.backgroundColor = wrestFldDefaultColor; @@ -305,10 +309,7 @@ function wrestSubmit() case "telnum" : wrestTelNum(el); break; // 김선용 2006.3 - 전화번호 형식 검사 case "imgext" : wrestImgExt(el); break; default : - // css 가 minlength= 로 시작한다면 = 뒤의 숫자는 최소길이값 - if (/^minlength\=/.test(css)) { - wrestMinLength(el, css); break; - } else if (/^extension\=/.test(css)) { + if (/^extension\=/.test(css)) { wrestExtension(el, css); break; } } // switch (css) diff --git a/lib/common.lib.php b/lib/common.lib.php index cefddb0aa..c0dfc9ae0 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2579,19 +2579,23 @@ function module_exec_check($exe, $type) return $error; } -// 도로명주소 출력 // 주소출력 -function print_address($addr1, $addr2, $addr3) +function print_address($addr1, $addr2, $addr3, $addr4) { $address = trim($addr1); $addr2 = trim($addr2); $addr3 = trim($addr3); - if($addr2) - $address .= ', '.$addr2; + if($addr4 == 'N') { + if($addr2) + $address .= ' '.$addr2; + } else { + if($addr2) + $address .= ', '.$addr2; - if($addr3) - $address .= ' '.$addr3; + if($addr3) + $address .= ' '.$addr3; + } return $address; } diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index a338770f9..50d7b0d2f 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit; @ini_set('memory_limit', '512M'); // 게시글리스트 썸네일 생성 -function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=true, $um_value='80/0.5/3') +function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3') { global $g5, $config; $filename = $alt = ""; @@ -184,15 +184,13 @@ function get_view_thumbnail($contents, $thumb_width=0) return $contents; } -function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop=false, $crop_mode='center', $is_sharpen=true, $um_value='80/0.5/3') +function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_height, $is_create, $is_crop=false, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3') { global $g5; if(!$thumb_width && !$thumb_height) return; - $thumb_filename = preg_replace("/\.[^\.]+$/i", "", $filename); // 확장자제거 - $thumb_file = "$target_path/thumb-{$thumb_filename}_{$thumb_width}x{$thumb_height}.jpg"; $source_file = "$source_path/$filename"; if(!is_file($source_file)) // 원본 파일이 없다면 @@ -217,6 +215,11 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h return basename($source_file); } + $ext = array(1 => 'gif', 2 => 'jpg', 3 => 'png'); + + $thumb_filename = preg_replace("/\.[^\.]+$/i", "", $filename); // 확장자제거 + $thumb_file = "$target_path/thumb-{$thumb_filename}_{$thumb_width}x{$thumb_height}.".$ext[$size[2]]; + $thumb_time = @filemtime($thumb_file); $source_time = @filemtime($source_file); @@ -266,6 +269,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } } else if ($size[2] == 3) { $src = imagecreatefrompng($source_file); + imagealphablending($src, true); } else { return; } @@ -324,6 +328,11 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } $dst = imagecreatetruecolor($dst_w, $dst_h); + + if($size[2] == 3) { + imagealphablending($dst, false); + imagesavealpha($dst, true); + } } else { $dst = imagecreatetruecolor($dst_w, $dst_h); @@ -345,8 +354,15 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } } - $bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색 - imagefill($dst, 0, 0, $bgcolor); + if($size[2] == 3) { + $bgcolor = imagecolorallocatealpha($dst, 0, 0, 0, 127); + imagefill($dst, 0, 0, $bgcolor); + imagealphablending($dst, false); + imagesavealpha($dst, true); + } else { + $bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색 + imagefill($dst, 0, 0, $bgcolor); + } } imagecopyresampled($dst, $src, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); @@ -357,12 +373,24 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h UnsharpMask($dst, $val[0], $val[1], $val[2]); } - if(!defined('G5_THUMB_JPG_QUALITY')) - $jpg_quality = 90; - else - $jpg_quality = G5_THUMB_JPG_QUALITY; + if($size[2] == 1) { + imagegif($dst, $thumb_file); + } else if($size[2] == 3) { + if(!defined('G5_THUMB_PNG_COMPRESS')) + $png_compress = 5; + else + $png_compress = G5_THUMB_PNG_COMPRESS; + + imagepng($dst, $thumb_file, $png_compress); + } else { + if(!defined('G5_THUMB_JPG_QUALITY')) + $jpg_quality = 90; + else + $jpg_quality = G5_THUMB_JPG_QUALITY; + + imagejpeg($dst, $thumb_file, $jpg_quality); + } - imagejpeg($dst, $thumb_file, $jpg_quality); chmod($thumb_file, G5_FILE_PERMISSION); // 추후 삭제를 위하여 파일모드 변경 imagedestroy($src); diff --git a/mobile/skin/member/basic/register_form.skin.php b/mobile/skin/member/basic/register_form.skin.php index 555487936..19313c9e2 100644 --- a/mobile/skin/member/basic/register_form.skin.php +++ b/mobile/skin/member/basic/register_form.skin.php @@ -31,17 +31,17 @@ add_stylesheet('', 영문자, 숫자, _ 만 입력 가능. 최소 3자이상 입력하세요. - > + > - > + > - > + > @@ -150,11 +150,11 @@ add_stylesheet('', class="frm_input frm_address " size="50">
-
+ +
- -
- + + @@ -262,7 +262,6 @@ add_stylesheet('', - -
-

- -
- - - - -
- -
-

- 시도 및 시군구 선택없이 도로명, 읍/면/동, 건물명 등으로 검색하실 수 있습니다.
- 만약 검색결과에 찾으시는 주소가 없을 때는 시도와 시군구를 선택하신 후 다시 검색해 주십시오.
- (검색결과는 최대 1,000건만 표시됩니다.) -

- -
- -
- - - - -
- - - -
-
- -
- -
검색어를 입력해주세요.
-
-
-

직접 주소를 입력하실 경우 우편번호와 기본주소는 반드시 입력하셔야 합니다.

-
- 우편번호 - - - - -
- -
- -
- -
- - - -
- -
-
-
- -
- -
- -
+
- \ No newline at end of file + \ No newline at end of file diff --git a/skin/member/basic/register_form.skin.php b/skin/member/basic/register_form.skin.php index 50b4980d1..d96a93368 100644 --- a/skin/member/basic/register_form.skin.php +++ b/skin/member/basic/register_form.skin.php @@ -34,17 +34,17 @@ add_stylesheet('', 영문자, 숫자, _ 만 입력 가능. 최소 3자이상 입력하세요. - class="frm_input minlength=3 " maxlength="20"> + class="frm_input " minlength="3" maxlength="20"> - class="frm_input minlength=3 " maxlength="20"> + class="frm_input " minlength="3" maxlength="20"> - class="frm_input minlength=3 " maxlength="20"> + class="frm_input " minlength="3" maxlength="20"> @@ -155,11 +155,11 @@ add_stylesheet('', class="frm_input frm_address " size="50">
-
- -
+ +
+ + - @@ -270,7 +270,6 @@ add_stylesheet('', - -
-

- -
- - - - -
- -
-

- 시도 및 시군구 선택없이 도로명, 읍/면/동, 건물명 등으로 검색하실 수 있습니다.
- 만약 검색결과에 찾으시는 주소가 없을 때는 시도와 시군구를 선택하신 후 다시 검색해 주십시오.
- (검색결과는 최대 1,000건만 표시됩니다.) -

- -
- -
- - - - -
-
정확하고 빠른 검색을 위해 아래의 예시처럼 입력해 주세요.

입력예1) 강남대로37길 24-6
입력예2) 서초동 1362-19
입력예3) 서초2동 1362-19
- - - -
-
- -
- -
검색어를 입력해주세요.
-
- -
-

직접 주소를 입력하실 경우 우편번호와 기본주소는 반드시 입력하셔야 합니다.

-
- 우편번호 - - - - -
- -
- -
- -
- - - -
-
- -
- -
- -
+
- \ No newline at end of file + \ No newline at end of file