diff --git a/adm/menu_form.php b/adm/menu_form.php index 15592bd33..8dee73269 100644 --- a/adm/menu_form.php +++ b/adm/menu_form.php @@ -8,6 +8,8 @@ if ($is_admin != 'super') $g5['title'] = '메뉴 추가'; include_once(G5_PATH.'/head.sub.php'); +$code = isset($code) ? preg_replace('/[^0-9a-zA-Z]/', '', strip_tags($code)) : ''; + // 코드 if($new == 'new' || !$code) { $code = base_convert(substr($code,0, 2), 36, 10); diff --git a/bbs/password_lost2.php b/bbs/password_lost2.php index 6c20c0a03..1dbb5209a 100644 --- a/bbs/password_lost2.php +++ b/bbs/password_lost2.php @@ -4,7 +4,7 @@ include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); include_once(G5_LIB_PATH.'/mailer.lib.php'); if ($is_member) { - alert('이미 로그인중입니다.'); + alert_close('이미 로그인중입니다.', G5_URL); } if (!chk_captcha()) { diff --git a/config.php b/config.php index f6ce17cc0..9253fe2c8 100644 --- a/config.php +++ b/config.php @@ -5,8 +5,8 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.2.9.5'); -define('G5_YOUNGCART_VER', '5.2.9.5'); +define('G5_GNUBOARD_VER', '5.2.9.6'); +define('G5_YOUNGCART_VER', '5.2.9.6'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); diff --git a/js/common.js b/js/common.js index 49c9c56fd..02ce71a7b 100644 --- a/js/common.js +++ b/js/common.js @@ -69,6 +69,8 @@ function number_format(data) var cutlen = 3; var comma = ','; var i; + + data = data + ''; var sign = data.match(/^[\+\-]/); if(sign) { diff --git a/lib/common.lib.php b/lib/common.lib.php index c393b1794..5ddb9c022 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2021,8 +2021,12 @@ function sql_real_escape_string($str, $link=null) if(!$link) $link = $g5['connect_db']; + + if(function_exists('mysqli_connect') && G5_MYSQLI_USE) { + return mysqli_real_escape_string($link, $str); + } - return mysqli_real_escape_string($link, $str); + return mysql_real_escape_string($str, $link); } function escape_trim($field) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 15ff52513..3f6c20866 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -284,6 +284,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h $is_large = true; // width, height 설정 + if($thumb_width) { if(!$thumb_height) { $thumb_height = round(($thumb_width * $size[1]) / $size[0]); @@ -348,7 +349,6 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } else { // 비율에 맞게 생성 $dst = imagecreatetruecolor($dst_w, $dst_h); $bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색 - if($src_w > $src_h) { $tmp_h = round(($dst_w * $src_h) / $src_w); $dst_y = round(($dst_h - $tmp_h) / 2); @@ -384,8 +384,14 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h if($src_w < $dst_w) { if($src_h >= $dst_h) { - $dst_x = round(($dst_w - $src_w) / 2); - $src_h = $dst_h; + if( $src_h > $src_w ){ + $tmp_w = round(($dst_h * $src_w) / $src_h); + $dst_x = round(($dst_w - $tmp_w) / 2); + $dst_w = $tmp_w; + } else { + $dst_x = round(($dst_w - $src_w) / 2); + $src_h = $dst_h; + } } else { $dst_x = round(($dst_w - $src_w) / 2); $dst_y = round(($dst_h - $src_h) / 2); @@ -394,9 +400,15 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h } } else { if($src_h < $dst_h) { - $dst_y = round(($dst_h - $src_h) / 2); - $dst_h = $src_h; - $src_w = $dst_w; + if( $src_w > $dst_w ){ + $tmp_h = round(($dst_w * $src_h) / $src_w); + $dst_y = round(($dst_h - $tmp_h) / 2); + $dst_h = $tmp_h; + } else { + $dst_y = round(($dst_h - $src_h) / 2); + $dst_h = $src_h; + $src_w = $dst_w; + } } } diff --git a/plugin/lgxpay/AuthOnlyRes.php b/plugin/lgxpay/AuthOnlyRes.php index cc6b882cc..c16bfa633 100644 --- a/plugin/lgxpay/AuthOnlyRes.php +++ b/plugin/lgxpay/AuthOnlyRes.php @@ -80,9 +80,6 @@ if ($xpay->TX()) { echo "

"; */ - // 인증내역기록 - @insert_cert_history($member['mb_id'], 'lg', 'hp'); - if( "0000" == $xpay->Response_Code() ) { //인증요청 결과 성공 DB처리 //echo "인증요청 결과 성공 DB처리하시기 바랍니다.
"; @@ -153,6 +150,10 @@ if ($xpay->TX()) { set_session("ss_cert_birth", $birth_day); set_session("ss_cert_sex", $mb_sex); set_session('ss_cert_dupinfo', $mb_dupinfo); + + // 인증내역기록 + @insert_cert_history($member['mb_id'], 'lg', 'hp'); + } else { //인증요청 결과 실패 DB처리 //echo "인증요청 결과 실패 DB처리하시기 바랍니다.
"; @@ -161,10 +162,10 @@ if ($xpay->TX()) { echo ''.PHP_EOL; } else { - alert_close('인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg()); + alert_close('인증요청이 취소 또는 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg()); } exit; }