From 508d060219e83d677181a5383c3d2bc87bcf1bdd Mon Sep 17 00:00:00 2001 From: gnuboard Date: Sat, 12 Jan 2013 15:52:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BA=A1=EC=B0=A8=EC=9D=B4=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=EC=99=80=20=EC=BA=A1=EC=B1=A0=EC=9D=8C=EC=84=B1=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EC=9D=84=20=EB=AF=B8=EB=A6=AC=20=EB=A7=8C=EB=93=A4?= =?UTF-8?q?=EC=96=B4=20=EB=86=93=EA=B3=A0=20img=20src=20=EC=97=90=20?= =?UTF-8?q?=EB=85=B8=EC=B6=9C=ED=95=98=EB=8A=94=20=EB=B0=A9=EC=8B=9D?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/register_form.php | 3 +- config.php | 4 ++ extend/captcha.extend.php | 11 +++- head.sub.php | 3 - lib/common.lib.php | 30 ++++++++++ plugin/captcha/captcha.lib.php | 83 +++++++++++++++++++++++--- plugin/captcha/wav.php | 1 + skin/member/neo/register_form.skin.php | 4 +- test.php | 41 +------------ 9 files changed, 124 insertions(+), 56 deletions(-) diff --git a/bbs/register_form.php b/bbs/register_form.php index 5e996d4c3..150396459 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -1,7 +1,7 @@ lib) include_once($captcha->lib); // 불법접근을 막도록 토큰생성 $token = md5(uniqid(rand(), true)); @@ -102,7 +102,6 @@ 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'); diff --git a/config.php b/config.php index cad60347a..780bdbdea 100644 --- a/config.php +++ b/config.php @@ -13,6 +13,10 @@ $g4['bbs_path'] = $g4['path'] . '/' . $g4['bbs']; $g4['bbs_img'] = 'img'; $g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img']; +$g4['data_dir'] = 'data'; +$g4['cache_dir'] = 'cache'; +$g4['captcha_dir'] = 'captcha'; + $g4['admin'] = 'adm'; $g4['admin_path'] = $g4['path'] . '/' . $g4['admin']; diff --git a/extend/captcha.extend.php b/extend/captcha.extend.php index c70a26aef..c09359805 100644 --- a/extend/captcha.extend.php +++ b/extend/captcha.extend.php @@ -2,12 +2,17 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (defined('_CAPTCHA_')) { - $captcha = (object)array( - 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", - 'js' => $g4['path']."/plugin/captcha/captcha.js" + $captcha = (object)Array( + 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", + 'js' => $g4['path']."/plugin/captcha/captcha.js", + 'fonts' => $g4['path']."/plugin/captcha/fonts" ); include_once($captcha->lib); + $g4['js_file'][] = $captcha->js; + + $captcha_obj = new captcha(); + $captcha_obj->run(); } else { unset($_SESSION['ss_captcha_use']); } diff --git a/head.sub.php b/head.sub.php index fc3584c1e..997f9c794 100644 --- a/head.sub.php +++ b/head.sub.php @@ -79,9 +79,6 @@ if (defined('_EDITOR_')) { $g4['js_file'][] = $editor->js; $g4['js_file'][] = $editor->config_js; } -if (defined('_CAPTCHA_')) { - $g4['js_file'][] = $captcha->js; -} ?>