1. captcha 애드온의 특정 모듈 선택시 오동작하는 문제 수정

2. 로그인되어 있는 상태에서 로그인 폼이 불려질 경우 폼을 더 이상 보이지 않도록 수정


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6855 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-10-13 00:53:12 +00:00
parent 8b5b3625c2
commit 4fdd586ef4
4 changed files with 23 additions and 9 deletions

View file

@ -24,7 +24,6 @@
Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>'); Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>');
// 캡챠 인증이 되지 않은 세션이면 실행 시작 // 캡챠 인증이 되지 않은 세션이면 실행 시작
if(!$_SESSION['captcha_authed']) { if(!$_SESSION['captcha_authed']) {
@ -32,7 +31,7 @@
Context::loadLang(_XE_PATH_.'addons/captcha/lang'); Context::loadLang(_XE_PATH_.'addons/captcha/lang');
// 캡챠 세션 세팅 // 캡챠 세션 세팅
if(Context::get('act')=='setCaptchaSession') { if(Context::get('captcha_action')=='setCaptchaSession') {
$f = FileHandler::readDir('./addons/captcha/icon'); $f = FileHandler::readDir('./addons/captcha/icon');
shuffle($f); shuffle($f);
$key = rand(0,count($f)-1); $key = rand(0,count($f)-1);
@ -50,7 +49,7 @@
exit(); exit();
// 캡챠 이미지 출력 // 캡챠 이미지 출력
} else if(Context::get('act')=='captchaImage') { } else if(Context::get('captcha_action')=='captchaImage') {
$f = FileHandler::readDir('./addons/captcha/icon'); $f = FileHandler::readDir('./addons/captcha/icon');
shuffle($f); shuffle($f);
$keyword = $_SESSION['captcha_keyword']; $keyword = $_SESSION['captcha_keyword'];
@ -82,7 +81,7 @@
exit(); exit();
// 캡챠 이미지 점검 // 캡챠 이미지 점검
} else if(Context::get('act')=='captchaCompare') { } else if(Context::get('captcha_action')=='captchaCompare') {
$x = Context::get('mx'); $x = Context::get('mx');
$y = Context::get('my'); $y = Context::get('my');
$sx = $_SESSION['captcha_x']; $sx = $_SESSION['captcha_x'];

View file

@ -45,7 +45,10 @@ var calledArgs = null;
if(doCheck) { 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}; 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 { } else {
oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj); 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", margin:"0 0 10px 0",
cursor:"pointer" 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) .click (captchaXE.compare)
.focus( function() { this.blur(); } ); .focus( function() { this.blur(); } );
@ -99,9 +102,11 @@ var calledArgs = null;
var x = e.pageX - posX - 20; var x = e.pageX - posX - 20;
var y = e.pageY - posY - 20; var y = e.pageY - posY - 20;
var params = new Array(); var params = new Array();
params["mx"] = x; params['mx'] = x;
params["my"] = y; params['my'] = y;
oldExecXml('captcha','captchaCompare',params, function() { params['captcha_action'] = 'captchaCompare';
params['mid'] = current_mid;
oldExecXml(calledArgs.module,calledArgs.act,params, function() {
$("#captcha_screen").css({ display:"none" }); $("#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); oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
} ); } );

View file

@ -210,6 +210,13 @@
* @brief 로그인 출력 * @brief 로그인 출력
**/ **/
function dispMemberLoginForm() { 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']); Context::set('referer_url', $_SERVER['HTTP_REFERER']);
$this->setTemplateFile('login_form'); $this->setTemplateFile('login_form');

View file

@ -0,0 +1,3 @@
<script type="text/javascript">
location.href = "{$redirect_url}";
</script>