diff --git a/bbs/register_form.php b/bbs/register_form.php
index 925ab48f7..57b5eeb53 100644
--- a/bbs/register_form.php
+++ b/bbs/register_form.php
@@ -1,5 +1,6 @@
include_once('./_common.php');
+include_once($g4['path'].'/plugin/captcha/captcha.lib.php');
// 불법접근을 막도록 토큰생성
$token = md5(uniqid(rand(), true));
@@ -17,11 +18,11 @@ if ($w == "") {
// 리퍼러 체크
referer_check();
- if (!$_POST['agree']) {
+ if (!isset($_POST['agree']) || !$_POST['agree']) {
alert('회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.', './register.php');
}
- if (!$_POST['agree2']) {
+ if (!isset($_POST['agree2']) || !$_POST['agree2']) {
alert('개인정보취급방침의 내용에 동의하셔야 회원가입 하실 수 있습니다.', './register.php');
}
@@ -100,8 +101,17 @@ if ($w == "") {
// 회원아이콘 경로
$mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
+$g4['js_file'][] = "{$g4['path']}/plugin/captcha/captcha.js";
include_once('./_head.php');
+
+if ($g4['https_url'])
+ $register_action_url = "{$g4['https_url']}/{$g4['bbs']}/register_form_update.php";
+else
+ $register_action_url = "{$g4['url']}/{$g4['bbs']}/register_form_update.php";
+
+$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400)));
+
include_once($member_skin_path.'/register_form.skin.php');
include_once('./_tail.php');
?>
\ No newline at end of file
diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php
index 1017e87fd..33c2d11d5 100644
--- a/bbs/register_form_update.php
+++ b/bbs/register_form_update.php
@@ -1,44 +1,22 @@
include_once('./_common.php');
include_once($g4['path'].'/lib/mailer.lib.php');
-
-/*
-// 081022 : CSRF 에서 토큰 비교는 의미 없음
-// 세션에 저장된 토큰과 폼값으로 넘어온 토큰을 비교하여 틀리면 에러
-if ($_POST["token"] && get_session("ss_token") == $_POST["token"])
-{
- // 이전 폼 전송 바로전에 만들어진 쿠키가 없다면 에러
- //if (!get_cookie($_POST["token"])) alert_close("쿠키 에러");
-
- // 맞으면 세션과 쿠키를 지워 다시 입력폼을 통해서 들어오도록 한다.
- set_session("ss_token", "");
- set_cookie($_POST["token"], 0, 0);
-}
-else
-{
- alert_close("토큰 에러");
- exit;
-}
-*/
+include_once($g4['path'].'/plugin/captcha/captcha.lib.php');
// 리퍼러 체크
-//referer_check();
+referer_check();
-if (!($w == '' || $w == 'u'))
+if (!($w == '' || $w == 'u')) {
alert('w 값이 제대로 넘어오지 않았습니다.');
+}
if ($w == 'u' && $is_admin == 'super') {
if (file_exists($g4['path'].'/DEMO'))
alert('데모 화면에서는 하실(보실) 수 없는 작업입니다.');
}
-// 자동등록방지 검사
-//include_once ("./norobot_check.inc.php");
-
-$key = get_session("captcha_keystring");
-if (!($key && $key == $_POST[wr_key])) {
- session_unregister("captcha_keystring");
- alert('정상적인 접근이 아닌것 같습니다.');
+if (!chk_tcaptcha("user_answer")) {
+ alert("정상적인 접근이 아닌것 같습니다.");
}
$mb_id = trim(strip_tags(mysql_escape_string($_POST[mb_id])));
diff --git a/lib/common.lib.php b/lib/common.lib.php
index 76441150f..a6e5e65d5 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -1560,4 +1560,71 @@ function convert_charset($from_charset, $to_charset, $str)
else
die("Not found 'iconv' or 'mbstring' library in server.");
}
+
+
+// 회원가입시 회원아이디 오류 검사
+function check_mb_id($reg_mb_id, $length=3)
+{
+ global $config, $g4;
+
+ if (!isset($reg_mb_id) || !$reg_mb_id)
+ return "회원아이디를 입력해 주십시오.";
+
+ if (preg_match("/[^0-9a-z_]+/i", $reg_mb_id)) {
+ return "회원아이디는 영문자, 숫자, _ 만 입력하세요."; // 유효하지 않은 회원아이디
+ } else if (strlen($reg_mb_id) < $length) {
+ return "회원아이디는 최소 {$length}글자 이상 입력하세요.";
+ } else {
+ $row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_id = '$reg_mb_id' ");
+ if ($row['cnt']) {
+ return "이미 사용중인 회원아이디 입니다."; // 이미 존재하는 회원아이디
+ } else {
+ if (preg_match("/[\,]?{$reg_mb_id}/i", $config['cf_prohibit_id'])) {
+ return "이미 예약된 단어로 사용할 수 없는 회원아이디 입니다."; // 예약어로 금지된 회원아이디
+ }
+ }
+ }
+ return ""; // 사용해도 좋은 회원아이디
+}
+
+
+function check_mb_nick($reg_mb_nick)
+{
+ global $g4;
+
+ if (!isset($reg_mb_nick) || !$reg_mb_nick)
+ return "별명을 입력해 주십시오.";
+
+ // 별명은 한글, 영문, 숫자만 가능
+ if (!check_string($reg_mb_nick, _G4_HANGUL_ + _G4_ALPHABETIC_ + _G4_NUMERIC_)) {
+ return "공백없이 한글, 영문, 숫자만 입력 가능합니다.";
+ } else if (strlen($reg_mb_nick) < 4) {
+ return "한글 2글자, 영문 4글자 이상 입력 가능합니다.";
+ } else {
+ $row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_nick = '$reg_mb_nick' ");
+ if ($row['cnt']) {
+ return "이미 존재하는 별명입니다.";
+ }
+ }
+ return ""; // 사용해도 좋은 별명
+}
+
+
+function check_mb_email($reg_mb_id, $reg_mb_email)
+{
+ global $g4;
+
+ if (!isset($reg_mb_email) || !$reg_mb_email)
+ return "E-mail 주소를 입력해 주십시오.";
+
+ if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $reg_mb_email)) {
+ return "E-mail 주소가 형식에 맞지 않습니다.";
+ } else {
+ $row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_id <> '$reg_mb_id' and mb_email = '$reg_mb_email' ");
+ if ($row['cnt']) {
+ return "이미 사용중인 E-mail 주소입니다.";
+ }
+ }
+ return "";
+}
?>
\ No newline at end of file
diff --git a/plugin/captcha/_common.php b/plugin/captcha/_common.php
new file mode 100644
index 000000000..d82224eec
--- /dev/null
+++ b/plugin/captcha/_common.php
@@ -0,0 +1,4 @@
+
+$g4_path = "../.."; // common.php 의 상대 경로
+include_once("$g4_path/common.php");
+?>
\ No newline at end of file
diff --git a/plugin/captcha/captcha.js b/plugin/captcha/captcha.js
new file mode 100644
index 000000000..be50abe14
--- /dev/null
+++ b/plugin/captcha/captcha.js
@@ -0,0 +1,32 @@
+function chk_captcha(input_key)
+{
+ if (typeof(input_key) != 'undefined') {
+ var captcha_result = false;
+ $.ajax({
+ type: 'POST',
+ url: g4_path+'/plugin/captcha/get.php',
+ data: { 'captcha_key': input_key.value },
+ cache: false,
+ async: false,
+ success: function(result) {
+ captcha_result = result;
+ }
+ });
+ if (!captcha_result) {
+ alert('숫자가 틀렸거나 입력 횟수가 넘었습니다.\n\n이미지를 클릭하여 다시 입력해 주십시오.');
+ input_key.select();
+ return false;
+ }
+ }
+ return true;
+}
+
+$(function() {
+ $('#captcha').click(function() {
+ this.setAttribute('src', g4_path+'/plugin/captcha/run.php?t='+(new Date).getTime());
+ //$('#captcha_key').focus();//이미지 새로고침 후 입력박스에 포커스 : 지운아빠 2012-07-13
+ //캡챠 클릭 시에 포커스 줘야 하는데 페이지 새로 고침되면 포커스를 줘서 주석처리 : 지운아빠 2012-08-03
+ })
+ .css('cursor', 'pointer')
+ .trigger('click');
+});
\ No newline at end of file
diff --git a/plugin/captcha/captcha.lib.php b/plugin/captcha/captcha.lib.php
new file mode 100644
index 000000000..487fc1354
--- /dev/null
+++ b/plugin/captcha/captcha.lib.php
@@ -0,0 +1,176 @@
+255, 'g'=>255, 'b'=>255);
+ // 글자색상 rgb
+ var $text = array('r'=>0, 'g'=>0, 'b'=>0);
+ // 그림자 글자색상 rgb
+ var $shadow = array('r'=>128, 'g'=>128, 'b'=>128);
+
+ var $captcha_length = 5;
+
+ // 이미지 크기
+ function set_box_size($width, $height) {
+ $this->width = $width;
+ $this->height = $height;
+ }
+
+ // 폰트 사이즈
+ function set_size($size) {
+ $this->size = $size;
+ }
+
+ // 폰트 기울기
+ function set_angle($angle) {
+ $this->angle = $angle;
+ }
+
+ // 폰트 위치
+ function set_position($x, $y) {
+ $this->x = $x;
+ $this->y = $y;
+ }
+
+ function set_captcha_length($length)
+ {
+ $this->captcha_length = $length;
+ }
+
+ function set_back_color($r, $g, $b) {
+ $this->back['r'] = $r;
+ $this->back['g'] = $g;
+ $this->back['b'] = $b;
+ }
+
+ function set_text_color($r, $g, $b) {
+ $this->text['r'] = $r;
+ $this->text['g'] = $g;
+ $this->text['b'] = $b;
+ }
+
+ function set_shadow_color($r, $g, $b) {
+ $this->shadow['r'] = $r;
+ $this->shadow['g'] = $g;
+ $this->shadow['b'] = $b;
+ }
+
+ function get_captcha_key()
+ {
+ $from = (int)('1'.str_repeat('0', $this->captcha_length - 1));
+ $to = (int)(str_repeat('9', $this->captcha_length));
+ return mt_rand($from, $to);
+ }
+
+ function run() {
+
+ // The text to draw
+ $captcha_key = $this->get_captcha_key();
+ /*
+ $_SESSION['ss_captcha_key'] = $captcha_key;
+ $_SESSION['ss_captcha_cnt'] = 0;
+ */
+
+ set_session('ss_captcha_key', $captcha_key);
+ set_session('ss_captcha_cnt', 0);
+
+ // Set the content-type
+ header('Content-Type: image/gif');
+ // Create the image
+ $im = imagecreatetruecolor($this->width, $this->height);
+
+ // Create some colors
+ $white = imagecolorallocate($im, $this->back['r'], $this->back['g'], $this->back['b']);
+ $grey = imagecolorallocate($im, $this->shadow['r'], $this->shadow['g'], $this->shadow['b']);
+ $black = imagecolorallocate($im, $this->text['r'], $this->text['g'], $this->text['b']);
+ imagefilledrectangle($im, 0, 0, $this->width, $this->height, $white);
+
+ // Replace path by your own font path
+ $fonts = Array();
+ foreach (glob('fonts/*.ttf') as $filename) {
+ $fonts[] = $filename;
+ }
+ $font = $fonts[mt_rand(0, count($fonts)-1)];
+
+ $size = $this->size;
+ $angle = $this->angle;
+ $x = $this->x;
+ $y = $this->y;
+
+ // Add some shadow to the text
+ imagettftext($im, $size, $angle, $x, $y, $grey, $font, $captcha_key);
+ // Add the text
+ imagettftext($im, $size, $angle, $x-1, $y-1, $black, $font, $captcha_key);
+ if (mt_rand(0,1)) {
+ imagettftext($im, $size, $angle, $x-2, $y-2, $white, $font, $captcha_key);
+ } else if (mt_rand(0,1)) {
+ imagettftext($im, $size, $angle, $x-2, $y-2, $grey, $font, $captcha_key);
+ }
+
+ // Using imagepng() results in clearer text compared with imagejpeg()
+ imagegif($im);
+ imagedestroy($im);
+ }
+}
+
+/*
+사용법 :
+$captcha = new captcha();
+$captcha->set_captcha_length(mt_rand(4, 6));
+$captcha->set_position(mt_rand(0, 10), mt_rand(15, 20));
+$captcha->set_angle(mt_rand(-3, 3));
+$captcha->set_size(mt_rand(15, 16));
+$captcha->set_back_color(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));
+$captcha->set_text_color(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
+$captcha->set_shadow_color(mt_rand(100,200), mt_rand(100,200), mt_rand(100,200));
+$captcha->run();
+*/
+
+// 캡챠이미지는 한개만 사용 가능함.
+function get_captcha($input_name, $captcha_no)
+{
+ global $g4;
+
+ // 세션생성을 한후 다음페이지에서 해당 세션이 있을때만 올바른 캡챠코드인지 비교합니다.
+ set_session('ss_captcha_use', true);
+ $captcha_class = str_pad($captcha_no,2,'0',STR_PAD_LEFT);// 캡챠 클래스를 선택할 수 있도록 지운아빠 2012-07-24
+
+ $s = "";
+ $s .= "
\n";
+ return $s;
+}
+
+
+function chk_captcha($input_name)
+{
+ if (get_session('ss_captcha_use')) {
+ $key = get_session('ss_captcha_key');
+ if (!($key && $key == $_POST[$input_name])) {
+ set_session('ss_captcha_key', '');
+ return false;
+ }
+ }
+ return true;
+}
+?>
\ No newline at end of file
diff --git a/plugin/captcha/example.php b/plugin/captcha/example.php
new file mode 100644
index 000000000..493fdef66
--- /dev/null
+++ b/plugin/captcha/example.php
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/plugin/captcha/fonts/.htaccess b/plugin/captcha/fonts/.htaccess
new file mode 100644
index 000000000..55fa648e1
--- /dev/null
+++ b/plugin/captcha/fonts/.htaccess
@@ -0,0 +1,4 @@
+
+ Order allow,deny
+ Deny from all
+
\ No newline at end of file
diff --git a/plugin/captcha/fonts/DAUM_FONTS_LICENSE.txt b/plugin/captcha/fonts/DAUM_FONTS_LICENSE.txt
new file mode 100644
index 000000000..5aefe4b26
--- /dev/null
+++ b/plugin/captcha/fonts/DAUM_FONTS_LICENSE.txt
@@ -0,0 +1,8 @@
+http://info.daum.net/Daum/info/introduceOfCI.do
+
+다음체의 저작권은 Daum에 있습니다.
+다음체는 개인 및 기업 사용자에게 무료로 제공되며, 사용자들은 다른 이에게 자유롭게 배포할 수 있습니다.
+단, 이 과정에서 어떠한 이유로든 복사 및 배포의 대가로 요금을 부과할 수 없습니다.
+다음체는 어떠한 이유로도 지적 재산권자 이외의 사용자가 수정 및 판매할 수 없으며, 배포되는 형태 그대로 사용해야 합니다.
+다음체를 이용하여 출판물 및 제작물을 만들거나 기업의 BI, CI 및 상품에 사용하시려면 반드시 Daum의 명시적인 승인을 받으셔야 하며,
+협의 후 글꼴 출처를 표시해야 합니다. 이 외의 다음체 사용 관련된 문의는 jadeinrain@daumcorp.com로 해주시면 됩니다.
\ No newline at end of file
diff --git a/plugin/captcha/fonts/NAVER_FONTS_LICENSE.txt b/plugin/captcha/fonts/NAVER_FONTS_LICENSE.txt
new file mode 100644
index 000000000..ae6ddd4ff
--- /dev/null
+++ b/plugin/captcha/fonts/NAVER_FONTS_LICENSE.txt
@@ -0,0 +1,112 @@
+http://help.naver.com/ops/step2/faq.nhn?faqId=15879
+
+네이버 나눔글꼴의 지적 재산권은 NHN에 있습니다.
+네이버 나눔글꼴은 개인 및 기업 사용자를 포함한 모든 사용자에게
+무료로 제공되며 자유롭게 수정하고 재배포하실 수 있습니다.
+
+단, 글꼴 자체를 유료로 판매하는 것은 금지하며,
+네이버 나눔글꼴은 본 저작권 안내와 라이선스 전문을 포함해서
+다른 소프트웨어와 번들하거나 재배포 또는 판매가 가능합니다.
+네이버 나눔글꼴 라이선스 전문을 포함하기 어려울 경우,
+나눔글꼴의 출처 표기를 권장합니다.
+예) 이 페이지에는 네이버에서 제공한 나눔글꼴이 적용되어 있습니다
+
+네이버 나눔글꼴을 사용한 인쇄물, 광고물(온라인 포함)의 이미지는
+나눔글꼴 프로모션을 위해 활용될 수 있습니다.
+이를 원치 않는 사용자는 언제든지 당사에 요청하실 수 있습니다.
+정확한 사용 조건은 아래 네이버 나눔글꼴 라이선스 전문을 참고하시기 바랍니다.
+
+
+*나눔글꼴 라이선스 전문의 한글은 이용자의 이해를 돕기 위해 영문 원본을 번역해 서비스하고 있으며
+ 법적 효력은 영문에 한합니다. 이 점 참고하시기 바랍니다.
+
+Copyright (c) 2010, NHN Corporation (http://www.nhncorp.com),
+with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+SIL OPEN FONT LICENSE
+Version 1.1 - 26 February 2007
+
+‘나눔, 네이버 나눔, 나눔고딕, 네이버 나눔고딕, 나눔명조, 네이버 나눔명조, 나눔손글씨, 네이버 나눔손글씨, 나눔펜, 네이버 나눔펜, 네이버 나눔고딕에코, 나눔고딕에코, 네이버 나눔명조에코, 나눔명조에코, 네이버 나눔고딕라이트, 나눔고딕라이트’ 폰트명에 대해 NHN (http://www.nhncorp.com)이 저작권을 소유하고 있습니다.
+본 폰트 소프트웨어는 SIL 오픈 폰트 라이선스 버전 1.1에 따라 라이선스 취득을 하였습니다.
+본 라이선스는 하단에 복사되었고 http://scripts.sil.org/OFL의 FAQ란 에서도 열람가능 합니다.
+
+SIL 오픈 폰트 라이선스
+버전 1.1 (2007년 2월 26일)
+
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting, or substituting in part or in whole any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.‘
+
+"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
+
+정의
+‘폰트 소프트웨어’는 본 라이선스에 입거해 저작권자가 배포하고 명확하게 같은 표시가 된 파일들의 집합을 뜻하며, 여기에는 소스 파일, 빌드 스크립트와 문서가 이에 포함됩니다.
+
+‘저작권이 있는 폰트명’은 저작권 정책에 따라서 지정된 이름을 말합니다.
+
+‘원본’은 저작권자가 배포한 폰트 소프트웨어 구성요소를 의미합니다.
+
+‘수정본’은 포맷의 변경이나 폰트 소프트웨어를 새로운 환경에 포팅시켜, 원본의 일부 혹은 전체에 추가, 삭제 대체해 만든 파생 저작물을 의미합니다.
+
+‘저자’는 폰트 소프트웨어에 기여한 디자이너, 엔지니어, 프로그래머, 기술 전문가 등을 의미합니다.
+
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects,
+to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework
+in which fonts may be shared and improved in partnership with others.
+The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold
+by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works.
+The fonts and derivatives, however, cannot be released under any other type of license.
+The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
+
+전문
+본 폰트 라이선스를 오픈 하는 것은(이하 OFL)는 전 세계 폰트 개발 프로젝트를 지원하고 학계와 언어 관련 학계의 폰트 개발을 위한 연구를 지지하기 위해서인 동시에, 폰트 제휴를 통해 폰트가 공유되고 개선될 수 있는 자유롭게 개방된 환경을 만들기 위해서 입니다.
+OFL은 라이선스를 취득한 폰트가 그 자체로 판매되지 않는 한 자유롭게 사용, 연구, 수정, 재배포 하는 것을 허가합니다. 수정된 폰트를 포함한 폰트는 저작권 명이 사용되지 않는 한 기타 소프트웨어와 함께 묶이거나 삽입, 재배포 할 수 있습니다. 단 폰트와 수정된 폰트는 기타 다른 라이선스에 포함되어 배포될 수는 없습니다. 이 라이선스 하에 있기 위한 폰트에 대한 요구사항은 본 폰트나 수정본을 사용하여 제작된 어떠한 문서에도 적용되지 않습니다.
+
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
+
+허가 및 조건
+본 폰트 소프트웨어를 사용하도록 허가 받은 개인/기업/단체 누구라도 다음 명시된 조건에 따라 폰트 소프트웨어의 수정 혹은 수정되지 않은 복사본을 무료로 사용, 연구, 복사, 통합, 삽입, 수정, 재배포할 수 있도록 허가합니다.
+
+1) Neither the Font Software nor any of its individual components,in Original or Modified Versions, may be sold by itself.
+ 원본이나 수정본의 폰트 소프트웨어 혹은 개별 구성요소인 폰트 자체가 판매되어서는 안됩니다.
+
+2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
+
+본 폰트 소프트웨어의 원본 혹은 수정본은 상기 저작권 안내와 본 라이선스에 대한 내용을 포함하는 경우에는 다른 소프트웨어와 함께 묶이거나 재배포 혹은 판매가 가능합니다. 이는 독립 텍스트 파일과 가독성이 있는 헤더 혹은 유저가 용이하게 열람 가능한 이상 텍스트파일 혹은 이진파일 내 기계가 읽을 수 있는 메타데이터 형태를 모두 의미 합니다.
+
+3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written
+permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
+
+본 폰트 소프트웨어의 어떠한 수정본도 동일한 저작권자가 명시적 허가서를 부여하지 않는 한 저작권이 있는 폰트명을 사용해서는 안 됩니다. 본 제한 사항은 유저들에게 제공된 기존 폰트명을 뜻합니다.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
+
+본 폰트 소프트웨어의 저작권자 혹은 저자의 이름은 그들의 명시적 서면 허가가 있거나 또는 그들의 공헌을 인정하기 위한 경우를 제외하고는 수정본에 대한 사용을 유도,추천 혹은 광고하기 위한 목적으로 사용할 수 없습니다.
+
+5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
+
+본 폰트 소프트웨어는 전체나 부분, 혹은 수정 여부에 상관없이 본 라이선스 하에 배포가 되어야 하며 기타 다른 라이선스 하에서는 배포를 할 수 없습니다. 폰트에 대한 요구조건은 이 라이선스 하에서만 유효하며 이 라이선스 하에 있기 위한 폰트에 대한 요구사항은 본 폰트 소프트웨어를 사용해 제작한 어떠한 문서에도 적용되지 않습니다.
+
+
+TERMINATION 계약의 종료
+This license becomes null and void if any of the above conditions are not met.
+본 라이선스는 상기 조건 중 일부라도 부합되지 않으면 무효가 될 수 있습니다.
+
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+
+면책조항
+본 폰트 소프트웨어는 저작권, 특허권, 상표권 및 기타 권리의 비침해성과 특정 목적에의 적합성 포함한 명시적, 묵시적인 어떠한 종류의 보증 없이 “있는 그대로” 제공됩니다. 어떠한 경우에도 저작권자는 본 폰트 소프트웨어의 사용 또는 이의 사용불가, 그밖에 폰트 소프트웨어의 취급과 관련하여 발생하는 모든 계약, 불법행위 혹은 다른 일로 하여금 발생하는 일반적, 특수적, 간접적, 부차적 혹은 필연적 손해를 포함하는 소송, 손해, 혹은 기타 책임에 대한 의무를 가지지 않습니다.
\ No newline at end of file
diff --git a/plugin/captcha/fonts/NanumGothic.ttf b/plugin/captcha/fonts/NanumGothic.ttf
new file mode 100644
index 000000000..009887a15
Binary files /dev/null and b/plugin/captcha/fonts/NanumGothic.ttf differ
diff --git a/plugin/captcha/fonts/NanumMyeongjo.ttf b/plugin/captcha/fonts/NanumMyeongjo.ttf
new file mode 100644
index 000000000..5d753f0aa
Binary files /dev/null and b/plugin/captcha/fonts/NanumMyeongjo.ttf differ
diff --git a/plugin/captcha/get.php b/plugin/captcha/get.php
new file mode 100644
index 000000000..a2afcedeb
--- /dev/null
+++ b/plugin/captcha/get.php
@@ -0,0 +1,18 @@
+= MAX_CAPTCHA_COUNT) {
+ $_SESSION['ss_captcha_key'] = '';
+ echo false;
+} else {
+ if ($_POST['captcha_key'] == $_SESSION['ss_captcha_key']) {
+ echo true;
+ } else {
+ $_SESSION['ss_captcha_cnt'] = $captcha_cnt + 1;
+ echo false;
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugin/captcha/img/dot.gif b/plugin/captcha/img/dot.gif
new file mode 100644
index 000000000..35d42e808
Binary files /dev/null and b/plugin/captcha/img/dot.gif differ
diff --git a/plugin/captcha/run.php b/plugin/captcha/run.php
new file mode 100644
index 000000000..b8c2ea574
--- /dev/null
+++ b/plugin/captcha/run.php
@@ -0,0 +1,6 @@
+run();
+?>
\ No newline at end of file
diff --git a/plugin/captcha/wav.php b/plugin/captcha/wav.php
new file mode 100644
index 000000000..b0a8dbc8e
--- /dev/null
+++ b/plugin/captcha/wav.php
@@ -0,0 +1,70 @@
+ 16){
+ $header .= fread($fp,($info['Subchunk1Size']-16));
+ }
+
+ // read SubChunk2ID
+ $header .= fread($fp,4);
+
+ // read Subchunk2Size
+ $size = unpack('vsize',fread($fp, 4));
+ $size = $size['size'];
+
+ // read data
+ $data .= fread($fp,$size);
+ }
+
+ return $header.pack('V',strlen($data)).$data;
+}
+
+exit;
+?>
diff --git a/plugin/captcha/wavs/0.wav b/plugin/captcha/wavs/0.wav
new file mode 100644
index 000000000..c5c0d1b96
Binary files /dev/null and b/plugin/captcha/wavs/0.wav differ
diff --git a/plugin/captcha/wavs/1.wav b/plugin/captcha/wavs/1.wav
new file mode 100644
index 000000000..4a4b45669
Binary files /dev/null and b/plugin/captcha/wavs/1.wav differ
diff --git a/plugin/captcha/wavs/2.wav b/plugin/captcha/wavs/2.wav
new file mode 100644
index 000000000..620799b1c
Binary files /dev/null and b/plugin/captcha/wavs/2.wav differ
diff --git a/plugin/captcha/wavs/3.wav b/plugin/captcha/wavs/3.wav
new file mode 100644
index 000000000..e11a976b2
Binary files /dev/null and b/plugin/captcha/wavs/3.wav differ
diff --git a/plugin/captcha/wavs/4.wav b/plugin/captcha/wavs/4.wav
new file mode 100644
index 000000000..c5f1f3cc7
Binary files /dev/null and b/plugin/captcha/wavs/4.wav differ
diff --git a/plugin/captcha/wavs/5.wav b/plugin/captcha/wavs/5.wav
new file mode 100644
index 000000000..793ddffae
Binary files /dev/null and b/plugin/captcha/wavs/5.wav differ
diff --git a/plugin/captcha/wavs/6.wav b/plugin/captcha/wavs/6.wav
new file mode 100644
index 000000000..b64f0c719
Binary files /dev/null and b/plugin/captcha/wavs/6.wav differ
diff --git a/plugin/captcha/wavs/7.wav b/plugin/captcha/wavs/7.wav
new file mode 100644
index 000000000..203f0f284
Binary files /dev/null and b/plugin/captcha/wavs/7.wav differ
diff --git a/plugin/captcha/wavs/8.wav b/plugin/captcha/wavs/8.wav
new file mode 100644
index 000000000..b74ab28c0
Binary files /dev/null and b/plugin/captcha/wavs/8.wav differ
diff --git a/plugin/captcha/wavs/9.wav b/plugin/captcha/wavs/9.wav
new file mode 100644
index 000000000..1ea0103f7
Binary files /dev/null and b/plugin/captcha/wavs/9.wav differ
diff --git a/plugin/captcha/wavs/delay0.wav b/plugin/captcha/wavs/delay0.wav
new file mode 100644
index 000000000..309d2b8b4
Binary files /dev/null and b/plugin/captcha/wavs/delay0.wav differ
diff --git a/plugin/captcha/wavs/delay1.wav b/plugin/captcha/wavs/delay1.wav
new file mode 100644
index 000000000..dca3357e6
Binary files /dev/null and b/plugin/captcha/wavs/delay1.wav differ
diff --git a/skin/member/neo/ajax_mb_email_check.php b/skin/member/neo/ajax_mb_email_check.php
index bb019124c..dc3c30c70 100644
--- a/skin/member/neo/ajax_mb_email_check.php
+++ b/skin/member/neo/ajax_mb_email_check.php
@@ -1,20 +1,5 @@
include_once("_common.php");
-if (trim($reg_mb_email)=='') {
- echo "110"; // 입력이 없습니다.
-} else if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $reg_mb_email)) {
- echo "120"; // E-mail 주소 형식에 맞지 않음
-} else {
- $row = sql_fetch(" select count(*) as cnt from $g4[member_table] where mb_id <> '$reg_mb_id' and mb_email = '$reg_mb_email' ");
- if ($row[cnt]) {
- echo "130"; // 이미 존재하는 회원아이디
- } else {
- //if (preg_match("/[\,]?{$reg_mb_email}\,/i", $config[cf_prohibit_id].","))
- if (preg_match("/[\,]?{$reg_mb_email}/i", $config[cf_prohibit_id]))
- echo "140"; // 예약어로 금지된 회원아이디
- else
- echo "000"; // 정상
- }
-}
+echo check_mb_email($_POST['reg_mb_id'], $_POST['reg_mb_email']);
?>
\ No newline at end of file
diff --git a/skin/member/neo/ajax_mb_id_check.php b/skin/member/neo/ajax_mb_id_check.php
index 612ed7b51..a62ed0816 100644
--- a/skin/member/neo/ajax_mb_id_check.php
+++ b/skin/member/neo/ajax_mb_id_check.php
@@ -1,22 +1,5 @@
include_once("_common.php");
-// echo "한글"로 출력하지 않는 이유는 Ajax 는 euc_kr 에서 한글을 제대로 인식하지 못하기 때문
-// 여기에서 영문으로 echo 하여 Request 된 값을 Javascript 에서 한글로 메세지를 출력함
-
-if (preg_match("/[^0-9a-z_]+/i", $reg_mb_id)) {
- echo "110"; // 유효하지 않은 회원아이디
-} else if (strlen($reg_mb_id) < 3) {
- echo "120"; // 3보다 작은 회원아이디
-} else {
- $row = sql_fetch(" select count(*) as cnt from $g4[member_table] where mb_id = '$reg_mb_id' ");
- if ($row[cnt]) {
- echo "130"; // 이미 존재하는 회원아이디
- } else {
- if (preg_match("/[\,]?{$reg_mb_id}/i", $config[cf_prohibit_id]))
- echo "140"; // 예약어로 금지된 회원아이디
- else
- echo "000"; // 정상
- }
-}
+echo check_mb_id($_POST['reg_mb_id']);
?>
\ No newline at end of file
diff --git a/skin/member/neo/ajax_mb_nick_check.php b/skin/member/neo/ajax_mb_nick_check.php
index da47eab5a..9b7d0ae84 100644
--- a/skin/member/neo/ajax_mb_nick_check.php
+++ b/skin/member/neo/ajax_mb_nick_check.php
@@ -1,40 +1,5 @@
include_once("_common.php");
-if (!function_exists('convert_charset')) {
- /*
- -----------------------------------------------------------
- Charset 을 변환하는 함수
- -----------------------------------------------------------
- iconv 함수가 있으면 iconv 로 변환하고
- 없으면 mb_convert_encoding 함수를 사용한다.
- 둘다 없으면 사용할 수 없다.
- */
- function convert_charset($from_charset, $to_charset, $str) {
-
- if( function_exists('iconv') )
- return iconv($from_charset, $to_charset, $str);
- elseif( function_exists('mb_convert_encoding') )
- return mb_convert_encoding($str, $to_charset, $from_charset);
- else
- die("Not found 'iconv' or 'mbstring' library in server.");
- }
-}
-
-if (strtolower($g4[charset]) == 'euc-kr')
- $reg_mb_nick = convert_charset('UTF-8','CP949',$reg_mb_nick);
-
-// 별명은 한글, 영문, 숫자만 가능
-if (!check_string($reg_mb_nick, _G4_HANGUL_ + _G4_ALPHABETIC_ + _G4_NUMERIC_)) {
- echo "110"; // 별명은 공백없이 한글, 영문, 숫자만 입력 가능합니다.
-} else if (strlen($reg_mb_nick) < 4) {
- echo "120"; // 4글자 이상 입력
-} else {
- $row = sql_fetch(" select count(*) as cnt from $g4[member_table] where mb_nick = '$reg_mb_nick' ");
- if ($row[cnt]) {
- echo "130"; // 이미 존재하는 별명
- } else {
- echo "000"; // 정상
- }
-}
+echo check_mb_nick($_POST['reg_mb_nick']);
?>
\ No newline at end of file
diff --git a/skin/member/neo/ajax_register_form.jquery.js b/skin/member/neo/ajax_register_form.jquery.js
index cd6509ca2..83ee0edc7 100644
--- a/skin/member/neo/ajax_register_form.jquery.js
+++ b/skin/member/neo/ajax_register_form.jquery.js
@@ -1,51 +1,41 @@
var reg_mb_id_check = function() {
+ var result = "";
$.ajax({
- type: 'POST',
- url: member_skin_path+'/ajax_mb_id_check.php',
+ type: "POST",
+ url: member_skin_path+"/ajax_mb_id_check.php",
data: {
- 'reg_mb_id': encodeURIComponent($('#reg_mb_id').val())
+ "reg_mb_id": encodeURIComponent($("#reg_mb_id").val())
},
cache: false,
async: false,
- success: function(result) {
- var msg = $('#msg_mb_id');
- switch(result) {
- case '110' : msg.html('영문자, 숫자, _ 만 입력하세요.').css('color', 'red'); break;
- case '120' : msg.html('최소 3자이상 입력하세요.').css('color', 'red'); break;
- case '130' : msg.html('이미 사용중인 아이디 입니다.').css('color', 'red'); break;
- case '140' : msg.html('예약어로 사용할 수 없는 아이디 입니다.').css('color', 'red'); break;
- case '000' : msg.html('사용하셔도 좋은 아이디 입니다.').css('color', 'blue'); break;
- default : alert( '잘못된 접근입니다.\n\n' + result ); break;
- }
- $('#mb_id_enabled').val(result);
+ success: function(data) {
+ result = data;
}
});
+ return result;
}
+
var reg_mb_nick_check = function() {
+ var result = "";
$.ajax({
- type: 'POST',
- url: member_skin_path+'/ajax_mb_nick_check.php',
+ type: "POST",
+ url: member_skin_path+"/ajax_mb_nick_check.php",
data: {
- 'reg_mb_nick': ($('#reg_mb_nick').val())
+ "reg_mb_nick": ($("#reg_mb_nick").val())
},
cache: false,
async: false,
- success: function(result) {
- var msg = $('#msg_mb_nick');
- switch(result) {
- case '110' : msg.html('별명은 공백없이 한글, 영문, 숫자만 입력 가능합니다.').css('color', 'red'); break;
- case '120' : msg.html('한글 2글자, 영문 4글자 이상 입력 가능합니다.').css('color', 'red'); break;
- case '130' : msg.html('이미 존재하는 별명입니다.').css('color', 'red'); break;
- case '000' : msg.html('사용하셔도 좋은 별명 입니다.').css('color', 'blue'); break;
- default : alert( '잘못된 접근입니다.\n\n' + result ); break;
- }
- $('#mb_nick_enabled').val(result);
+ success: function(data) {
+ result = data;
}
});
+ return result;
}
+
var reg_mb_email_check = function() {
+ var result = "";
$.ajax({
type: 'POST',
url: member_skin_path+'/ajax_mb_email_check.php',
@@ -55,16 +45,9 @@ var reg_mb_email_check = function() {
},
cache: false,
async: false,
- success: function(result) {
- var msg = $('#msg_mb_email');
- switch(result) {
- case '110' : msg.html('E-mail 주소를 입력하십시오.').css('color', 'red'); break;
- case '120' : msg.html('E-mail 주소가 형식에 맞지 않습니다.').css('color', 'red'); break;
- case '130' : msg.html('이미 존재하는 E-mail 주소입니다.').css('color', 'red'); break;
- case '000' : msg.html('사용하셔도 좋은 E-mail 주소입니다.').css('color', 'blue'); break;
- default : alert( '잘못된 접근입니다.\n\n' + result ); break;
- }
- $('#mb_email_enabled').val(result);
+ success: function(data) {
+ result = data;
}
});
+ return result;
}
\ No newline at end of file
diff --git a/skin/member/neo/register_form.skin.php b/skin/member/neo/register_form.skin.php
index 18f27dbeb..10e3c4714 100644
--- a/skin/member/neo/register_form.skin.php
+++ b/skin/member/neo/register_form.skin.php
@@ -7,7 +7,7 @@ var member_skin_path = "=$member_skin_path?>";
-