From 4fdd586ef4e323f7fde328600909f539fdebcea4 Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 13 Oct 2009 00:53:12 +0000 Subject: [PATCH] =?UTF-8?q?1.=20captcha=20=EC=95=A0=EB=93=9C=EC=98=A8?= =?UTF-8?q?=EC=9D=98=20=ED=8A=B9=EC=A0=95=20=EB=AA=A8=EB=93=88=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=EC=8B=9C=20=EC=98=A4=EB=8F=99=EC=9E=91=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95=202.=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=EB=90=98=EC=96=B4=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=83=81=ED=83=9C=EC=97=90=EC=84=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=ED=8F=BC=EC=9D=B4=20=EB=B6=88=EB=A0=A4?= =?UTF-8?q?=EC=A7=88=20=EA=B2=BD=EC=9A=B0=20=ED=8F=BC=EC=9D=84=20=EB=8D=94?= =?UTF-8?q?=20=EC=9D=B4=EC=83=81=20=EB=B3=B4=EC=9D=B4=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6855 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/captcha/captcha.addon.php | 7 +++---- addons/captcha/captcha.js | 15 ++++++++++----- modules/member/member.view.php | 7 +++++++ modules/member/tpl/redirect.html | 3 +++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 modules/member/tpl/redirect.html diff --git a/addons/captcha/captcha.addon.php b/addons/captcha/captcha.addon.php index f50f6c600..551aaa074 100644 --- a/addons/captcha/captcha.addon.php +++ b/addons/captcha/captcha.addon.php @@ -24,7 +24,6 @@ Context::addHtmlHeader(''); - // 캡챠 인증이 되지 않은 세션이면 실행 시작 if(!$_SESSION['captcha_authed']) { @@ -32,7 +31,7 @@ Context::loadLang(_XE_PATH_.'addons/captcha/lang'); // 캡챠 세션 세팅 - if(Context::get('act')=='setCaptchaSession') { + if(Context::get('captcha_action')=='setCaptchaSession') { $f = FileHandler::readDir('./addons/captcha/icon'); shuffle($f); $key = rand(0,count($f)-1); @@ -50,7 +49,7 @@ exit(); // 캡챠 이미지 출력 - } else if(Context::get('act')=='captchaImage') { + } else if(Context::get('captcha_action')=='captchaImage') { $f = FileHandler::readDir('./addons/captcha/icon'); shuffle($f); $keyword = $_SESSION['captcha_keyword']; @@ -82,7 +81,7 @@ exit(); // 캡챠 이미지 점검 - } else if(Context::get('act')=='captchaCompare') { + } else if(Context::get('captcha_action')=='captchaCompare') { $x = Context::get('mx'); $y = Context::get('my'); $sx = $_SESSION['captcha_x']; diff --git a/addons/captcha/captcha.js b/addons/captcha/captcha.js index bda1a6e40..0a3f6b018 100644 --- a/addons/captcha/captcha.js +++ b/addons/captcha/captcha.js @@ -45,7 +45,10 @@ var calledArgs = null; if(doCheck) { calledArgs = {'module':module,'act':act,'params':params,'callback_func':callback_func,'response_tags':response_tags,'callback_func_arg':callback_func_arg,'fo_obj':fo_obj}; - oldExecXml('captcha','setCaptchaSession',new Array(),captchaXE.show,new Array('error','message','about','keyword')); + var params = new Array(); + params['captcha_action'] = 'setCaptchaSession'; + params['mid'] = current_mid; + oldExecXml(module, act, params, captchaXE.show,new Array('error','message','about','keyword')); } else { oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj); } @@ -77,7 +80,7 @@ var calledArgs = null; margin:"0 0 10px 0", cursor:"pointer" }) - .attr("src", request_uri.setQuery('act','captchaImage').setQuery('rnd',Math.round(Math.random() * 6))) + .attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd',Math.round(Math.random() * 6))) .click (captchaXE.compare) .focus( function() { this.blur(); } ); @@ -99,9 +102,11 @@ var calledArgs = null; var x = e.pageX - posX - 20; var y = e.pageY - posY - 20; var params = new Array(); - params["mx"] = x; - params["my"] = y; - oldExecXml('captcha','captchaCompare',params, function() { + params['mx'] = x; + params['my'] = y; + params['captcha_action'] = 'captchaCompare'; + params['mid'] = current_mid; + oldExecXml(calledArgs.module,calledArgs.act,params, function() { $("#captcha_screen").css({ display:"none" }); oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj); } ); diff --git a/modules/member/member.view.php b/modules/member/member.view.php index 8fb560377..a89fa19c1 100644 --- a/modules/member/member.view.php +++ b/modules/member/member.view.php @@ -210,6 +210,13 @@ * @brief 로그인 폼 출력 **/ function dispMemberLoginForm() { + if(Context::get('is_logged')) { + Context::set('redirect_url', getUrl('act','')); + $this->setTemplatePath($this->module_path.'tpl'); + $this->setTemplateFile('redirect.html'); + return; + } + // 템플릿 파일 지정 Context::set('referer_url', $_SERVER['HTTP_REFERER']); $this->setTemplateFile('login_form'); diff --git a/modules/member/tpl/redirect.html b/modules/member/tpl/redirect.html new file mode 100644 index 000000000..024ae2eb9 --- /dev/null +++ b/modules/member/tpl/redirect.html @@ -0,0 +1,3 @@ +