merge sandbox to trunk for 1.4.3.1

git-svn-id: http://xe-core.googlecode.com/svn/trunk@7659 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2010-08-25 06:19:21 +00:00
parent 289973781a
commit 200d63636c
195 changed files with 8166 additions and 3576 deletions

BIN
addons/captcha/audio/F_A.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_B.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_C.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_D.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_E.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_F.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_G.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_H.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_I.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_J.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_K.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_L.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_M.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_N.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_O.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_P.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_Q.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_R.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_S.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_T.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_U.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_V.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_W.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_X.mp3 Executable file

Binary file not shown.

BIN
addons/captcha/audio/F_Y.mp3 Executable file

Binary file not shown.

View file

@ -3,41 +3,68 @@
/**
* @file captcha.addon.php
* @author zero (zero@nzeo.com)
* @brief 특정 action을 실행할때 captcah를 띄우도록
* @author zero (zero@nzeo.com), sol(ngleader@gmail.com)
* @brief 특정 action을 실행할때 captcha를 띄우도록
* 영어 알파벳을 입력, 음성기능 추가
**/
// before_module_proc 일 경우 && act_type != everytime 이면 세션 초기화
if($called_position == "before_module_proc" && $addon_info->act_type == 'everytime' && $_SESSION['captcha_authed']) {
unset($_SESSION['captcha_authed']);
if(!class_exists('AddonCaptcha'))
{
class AddonCaptcha
{
var $addon_info;
// before_module_init 일때에 captcha 동작
} else if($called_position == 'before_module_init') {
function setInfo(&$addon_info)
{
$this->addon_info = $addon_info;
}
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) return;
if($addon_info->target != 'all' && Context::get('is_logged')) return;
function before_module_proc()
{
if($this->addon_info->act_type == 'everytime' && $_SESSION['captcha_authed']) {
unset($_SESSION['captcha_authed']);
}
}
$target_acts = array('procBoardInsertDocument','procBoardInsertComment','procIssuetrackerInsertIssue','procIssuetrackerInsertHistory','procTextyleInsertComment');
if($addon_info->apply_find_account=='apply') $target_acts[] = 'procMemberFindAccount';
if($addon_info->apply_resend_auth_mail=='apply') $target_acts[] = 'procMemberResendAuthMail';
if($addon_info->apply_signup=='apply') $target_acts[] = 'procMemberInsert';
function before_module_init(&$ModuleHandler)
{
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) return false;
if($this->addon_info->target != 'all' && Context::get('is_logged')) return false;
Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>');
$target_acts = array('procBoardInsertDocument','procBoardInsertComment','procIssuetrackerInsertIssue','procIssuetrackerInsertHistory','procTextyleInsertComment');
if($this->addon_info->apply_find_account=='apply') $target_acts[] = 'procMemberFindAccount';
if($this->addon_info->apply_resend_auth_mail=='apply') $target_acts[] = 'procMemberResendAuthMail';
if($this->addon_info->apply_signup=='apply') $target_acts[] = 'procMemberInsert';
// 캡챠 인증이 되지 않은 세션이면 실행 시작
if(!$_SESSION['captcha_authed']) {
if(Context::getRequestMethod()!='XMLRPC' && Context::getRequestMethod()!=='JSON')
{
Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>');
Context::addJsFile('./addons/captcha/captcha.js',false);
}
// 언어파일 로드
Context::loadLang(_XE_PATH_.'addons/captcha/lang');
// 게시판/ 이슈트래커의 글쓰기/댓글쓰기 액션 호출시 세션 비교
if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $target_acts)) {
Context::loadLang('./addons/captcha/lang');
$ModuleHandler->error = "captcha_denied";
}
return true;
}
function before_module_init_setCaptchaSession()
{
if($_SESSION['captcha_authed']) return false;
// 언어파일 로드
Context::loadLang(_XE_PATH_.'addons/captcha/lang');
// 키워드 생성
$arr = range('A','Y');
shuffle($arr);
$arr = array_slice($arr,0,6);
$_SESSION['captcha_keyword'] = join('', $arr);
// 캡챠 세션 세팅
if(Context::get('captcha_action')=='setCaptchaSession') {
$f = FileHandler::readDir('./addons/captcha/icon');
shuffle($f);
$key = rand(0,count($f)-1);
$keyword = str_replace('.gif','',$f[$key]);
$_SESSION['captcha_keyword'] = $keyword;
$target = Context::getLang('target_captcha');
header("Content-Type: text/xml; charset=UTF-8");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@ -45,50 +72,161 @@
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
printf("<response>\r\n<error>0</error>\r\n<message>success</message>\r\n<about><![CDATA[%s]]></about>\r\n<keyword><![CDATA[%s]]></keyword>\r\n</response>",Context::getLang('about_captcha'),$target[$keyword]);
printf("<response>\r\n <error>0</error>\r\n <message>success</message>\r\n <about_captcha><![CDATA[%s]]></about_captcha>\r\n <captcha_reload><![CDATA[%s]]></captcha_reload>\r\n <captcha_play><![CDATA[%s]]></captcha_play>\r\n <cmd_input><![CDATA[%s]]></cmd_input>\r\n <cmd_cancel><![CDATA[%s]]></cmd_cancel>\r\n </response>"
,Context::getLang('about_captcha')
,Context::getLang('captcha_reload')
,Context::getLang('captcha_play')
,Context::getLang('cmd_input')
,Context::getLang('cmd_cancel')
);
Context::close();
exit();
}
// 캡챠 이미지 출력
} else if(Context::get('captcha_action')=='captchaImage') {
$f = FileHandler::readDir('./addons/captcha/icon');
shuffle($f);
$keyword = $_SESSION['captcha_keyword'];
for($key=0,$c=count($f);$key<$c;$key++) {
if($keyword.".gif" == $f[$key]) break;
}
function before_module_init_captchaImage()
{
if($_SESSION['captcha_authed']) return false;
// 이미지 만들기
$thumb = imagecreatetruecolor(250,100);
for($i=0,$c=count($f);$i<$c;$i++) {
$x = ($i%5)*50;
$y = $i>4?0:50;
imagedestroy($dummy);
$dummy = imagecreatefromgif('./addons/captcha/icon/'.$f[$i]);
imagecopyresampled($thumb, $dummy, $x, $y, 0, 0, 50, 50, 50, 50);
$keyword = $_SESSION['captcha_keyword'];
$im = $this->createCaptchaImage($keyword);
if($i==$key) {
$_SESSION['captcha_x'] = $x;
$_SESSION['captcha_y'] = $y;
}
}
imagedestroy($dummy);
header("Cache-Control: ");
header("Pragma: ");
header("Content-Type: image/png");
imagepng($thumb, null,9);
imagedestroy($thumb);
Context::close();
imagepng($im);
imagedestroy($im);
Context::close();
exit();
}
// 캡챠 이미지 점검
} else if(Context::get('captcha_action')=='captchaCompare') {
$x = Context::get('mx');
$y = Context::get('my');
$sx = $_SESSION['captcha_x'];
$sy = $_SESSION['captcha_y'];
function createCaptchaImage($string)
{
$arr = array();
for($i=0,$c=strlen($string);$i<$c;$i++) $arr[] = $string{$i};
if($x>=$sx && $x<=$sx+50 && $y>=$sy && $y<=$sy+50) $_SESSION['captcha_authed'] = true;
// 글자 하나 사이즈
$w = 18;
$h = 25;
// 글자 수
$c = count($arr);
// 글자 이미지
$im = array();
// 총사이즈로 바탕 이미지 생성
$im[] = imagecreate(($w+2)*count($arr), $h);
$deg = range(-30,30);
shuffle($deg);
// 글자별 이미지 생성
foreach($arr as $i => $str)
{
$im[$i+1] = @imagecreate($w, $h);
$background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
$text_color = imagecolorallocate($im[$i+1], 0, 0, 0);
// 글자폰트(사이즈) 조절
$ran = range(1,20);
shuffle($ran);
if(function_exists('imagerotate'))
{
imagestring($im[$i+1], (array_pop($ran)%3)+3, 2, (array_pop($ran)%8), $str, $text_color);
$im[$i+1] = imagerotate($im[$i+1], array_pop($deg), 0);
$background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
imagecolortransparent($im[$i+1], $background_color);
}
else
{
imagestring($im[$i+1], (array_pop($ran)%3)+3, 2, (array_pop($ran)%4), $str, $text_color);
}
}
// 각글자 이미지를 합침
for($i=1;$i<count($im);$i++)
{
imagecopy($im[0],$im[$i],(($w+2)*($i-1)),0,0,0,$w,$h);
imagedestroy($im[$i]);
}
// 이미지 확대
$big_count = 2;
$big = imagecreatetruecolor(($w+2)*$big_count*$c, $h*$big_count);
imagecopyresized($big, $im[0], 0, 0, 0, 0, ($w+2)*$big_count*$c, $h*$big_count, ($w+2)*$c, $h);
imagedestroy($im[0]);
if(function_exists('imageantialias')) imageantialias($big,true);
// 배경 라인 및 점찍기
$line_color = imagecolorallocate($big, 0, 0, 0);
$w = ($w+2)*$big_count*$c;
$h = $h*$big_count;
$d = array_pop($deg);
for($i=-abs($d);$i<$h+abs($d);$i=$i+7) imageline($big,0,$i+$d,$w,$i,$line_color);
$x = range(0,($w-10));
shuffle($x);
for($i=0;$i<200;$i++) imagesetpixel($big,$x[$i]%$w,$x[$i+1]%$h,$line_color);
return $big;
}
function before_module_init_captchaAudio()
{
if($_SESSION['captcha_authed']) return false;
$keyword = strtoupper($_SESSION['captcha_keyword']);
$data = $this->createCaptchaAudio($keyword);
header('Content-type: audio/mpeg');
header("Content-Disposition: attachment; filename=\"captcha_audio.mp3\"");
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
header('Content-Length: ' . strlen($data));
echo $data;
Context::close();
exit();
}
function createCaptchaAudio($string)
{
$data = '';
$_audio = './addons/captcha/audio/F_%s.mp3';
for($i=0,$c=strlen($string);$i<$c;$i++)
{
$_data = FileHandler::readFile(sprintf($_audio, $string{$i}));
$start = rand(5, 68); // 해더 4바이트, 데이터 영역 64바이트 정도 랜덤하게 시작
$datalen = strlen($_data) - $start - 256; // 마지막 unchanged 256 바이트
for($j=$start;$j<$datalen;$j+=64)
{
$ch = ord($_data{$j});
if($ch<9 || $ch>119) continue;
$_data{$j} = chr($ch+rand(-8,8));
}
$data .= $_data;
}
return $data;
}
function before_module_init_captchaCompare()
{
if($_SESSION['captcha_authed']) return false;
if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text'))) $_SESSION['captcha_authed'] = true;
else $_SESSION['captcha_authed'] = false;
header("Content-Type: text/xml; charset=UTF-8");
@ -100,15 +238,25 @@
print("<response>\r\n<error>0</error>\r\n<message>success</message>\r\n</response>");
Context::close();
exit();
}
Context::addJsFile('./addons/captcha/captcha.min.js',false);
}
}
$GLOBALS['__AddonCaptcha__'] = new AddonCaptcha;
$GLOBALS['__AddonCaptcha__']->setInfo($addon_info);
}
$oAddonCaptcha = &$GLOBALS['__AddonCaptcha__'];
if(method_exists(&$oAddonCaptcha, $called_position))
{
if(!call_user_func(array(&$oAddonCaptcha, $called_position), &$this)) return false;
}
$addon_act = Context::get('captcha_action');
if($addon_act && method_exists(&$oAddonCaptcha, $called_position.'_'.$addon_act))
{
if(!call_user_func(array(&$oAddonCaptcha, $called_position.'_'.$addon_act), &$this)) return false;
}
// 게시판/ 이슈트래커의 글쓰기/댓글쓰기 액션 호출시 세션 비교
if(in_array(Context::get('act'), $target_acts)) {
$this->error = "msg_not_permitted";
}
}
}
?>

View file

@ -11,103 +11,111 @@ var calledArgs = null;
function xeCaptcha() {
var body = $(document.body);
var captchaIma;
if (!captchaXE) {
captchaXE = $("<div>")
.attr("id","captcha_screen")
.css({
position:"absolute",
display:"none",
backgroundColor:"#111",
backgroundRepeat:"repeat",
backgroundPosition:"0 0",
zIndex:500
});
$('<div id="captchaBox" style="display:none;*zoom:1;overflow:hidden;height:200px;">'+
'<img src="about:blank" id="captcha_image" />'+
'<p style="color:#666;width:250px;padding:0;margin:10px 0 20px 0; " id="captchaAbout">&nbsp;</p>'+
'<p style="color:#DDD;width:250px;font-size:15px;padding:0; margin:0 0 10px; font-weight:bold; text-align:center;" id="captchaText">&nbsp;</p>'+
'</div>').appendTo(captchaXE);
body.append(captchaXE);
if (!captchaXE) {
var fc_isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var fc_isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var fc_isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var _swfURL_ = request_uri + 'addons/captcha/swf/play.swf';
if(fc_isIE && fc_isWin && !fc_isOpera){
_object_ ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="captcha_audio" align="middle">';
_object_ += '<param name="allowScriptAccess" value="always" />';
_object_ += '<param name="quality" value="high" />';
_object_ += '<param name="movie" value="'+_swfURL_+'" />';
_object_ += '<param name="wmode" value="window" />';
_object_ += '<param name="allowFullScreen" value="false">';
_object_ += '<param name="bgcolor" value="#fffff" />';
_object_ += '</object>';
}else{
_object_ = '<embed src="'+_swfURL_+'" quality="high" wmode="window" allowFullScreen="false" bgcolor="#ffffff" width="0" height="0" name="captcha_audio" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
}
captchaXE = $('<div id="captcha_layer" style="position:fixed; _position:absolute; top:0; left:0; width:100%; height:100%;display:none;z-index:10">').appendTo(document.body);
var $div = $('<div style="position:absolute; top:0; left:0; width:100%; height:100%; background:#000; opacity:.5; filter:alpha(opacity=50);"></div>'+
'<div style="z-index:1000;position:absolute; width:310px; margin:-105px 0 0 -105px; top:50%; left:50%; background:#fff; border:3px solid #ccc;">'+
'<form method="post" action="">'+
'<div style="position:relative; margin:25px 20px 15px 20px">'+
'<img src="about:blank" id="captcha_image" alt="CAPTCHA" width="240" height="50" style="display:block; width:240px; height:50px; border:1px solid #b0b0b0" />'+
'<button type="button" class="reload" title="" style="position:absolute; top:0; left:245px; width:25px; height:25px; padding:0; overflow:visible; border:1px solid #575757; background:#747474 url('+request_uri + 'addons/captcha/img/icon.gif) no-repeat center 5px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
'<button type="button" class="play" title="" style="position:absolute; top:27px; left:245px; width:25px; height:25px; padding:0; overflow:visible; border:1px solid #575757; background:#747474 url('+request_uri + 'addons/captcha/img/icon.gif) no-repeat center -20px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
'</div>'+
'<label id="captchaAbout" for="captcha" style="display:block; border-top:1px dashed #c5c5c5; padding:15px 0; margin:0 20px; font-size:12px; color:#5f5f5f;"></label>'+
'<input name="" type="text" id="secret_text" style="margin:0 20px; width:232px; border:1px solid #bdbdbd; padding:3px 4px; font-size:18px; font-weight:bold;" />'+
'<div style="margin:20px; border-top:1px dashed #c5c5c5; padding:15px 0 0 0; text-align:center">'+
'<button type="submit" style="height:31px; line-height:31px; padding:0 15px; margin:0 2px; font-size:12px; font-weight:bold; color:#fff; overflow:visible; border:1px solid #5c8a16; background:#6faa13;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #666 inset;-moz-box-shadow:0 0 3px #666 inset;-webkit-box-shadow:0 0 3px #666 inset;"></button>'+
'<button type="button" class="cancel" style="height:31px; line-height:31px; padding:0 15px; margin:0 2px; font-size:12px; font-weight:bold; color:#fff; overflow:visible; border:1px solid #575757; background:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
'</div>'+
'</form>'+_object_ +
'</div>').appendTo(captchaXE);
$div.find('form')
.submit(function(){
if(!$('#secret_text').val()){
$div.find('input[type=text]').val('').focus();
return false;
}
captchaXE.compare(); return false;
});
$div.find('button.cancel')
.click(function(){ $('#captcha_layer').hide(); });
$div.find('button.play')
.click(function(){
var swf = window['captcha_audio'] || document['captcha_audio'];
var audio = current_url.setQuery('captcha_action','captchaAudio').setQuery('rnd', (new Date).getTime());
$div.find('input[type=text]').focus();
swf.setSoundTarget(audio,'1');
});
$div.find('button.reload')
.click(function(){
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
oldExecXml('','',params, function() {
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd', (new Date).getTime()));
});
});
captchaXE.exec = function(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) {
var doCheck = false;
if(typeof(captchaTargetAct)!='undefined') {
for(var i in captchaTargetAct) {
if(captchaTargetAct[i]==act) {
doCheck = true;
break;
}
}
}
if(doCheck) {
$.each(captchaTargetAct || {}, function(key,val){ if (val == act){ doCheck = true; return false; } });
if (doCheck) { // captcha 를 사용하는 경우
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};
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, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
} else {
oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj);
}
}
return true;
};
captchaXE.show = function(ret_obj) {
var clientWidth = $(window).width();
var clientHeight = $(window).height();
$(document).scrollTop(0);
$(document).scrollLeft(0);
$("#captcha_screen").css({
display:"block",
width : clientWidth+"px",
height : clientHeight+"px",
left : 0,
top : 0
});
$("#captchaAbout").html(ret_obj['about']);
$("#captchaText").html(ret_obj['keyword']);
$("#captcha_image")
.css( {
width:"250px",
height:"100px",
margin:"0 0 10px 0",
cursor:"pointer"
})
.attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd',Math.round(Math.random() * 6)))
.click (captchaXE.compare)
.focus( function() { this.blur(); } );
$("#captchaBox")
.css({
display:"block",
border:"10px solid #222222",
padding:"10px",
position:"absolute",
backgroundColor:"#2B2523",
left : (clientWidth/2-125)+"px",
top : (clientHeight/2-100)+"px"
})
$('#captcha_layer').show();
$("#captchaAbout").html(ret_obj['about_captcha']);
$("#captcha_layer .reload").attr('title',ret_obj['captcha_reload']);
$("#captcha_layer .play").attr('title',ret_obj['captcha_play']);
$("#captcha_layer button[type=submit]").html(ret_obj['cmd_input']);
$("#captcha_layer button.cancel").html(ret_obj['cmd_cancel']);
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd', (new Date).getTime()));
$div.find('input[type=text]').val('').focus();
};
captchaXE.compare = function(e) {
var posX = parseInt($("#captchaBox").css("left").replace(/px$/,''),10);
var posY = parseInt($("#captchaBox").css("top").replace(/px$/,''),10);
var x = e.pageX - posX - 20;
var y = e.pageY - posY - 20;
var params = new Array();
params['mx'] = x;
params['my'] = y;
params['captcha_action'] = 'captchaCompare';
params['mid'] = current_mid;
params['secret_text'] = $('#secret_text').val();
oldExecXml(calledArgs.module,calledArgs.act,params, function() {
$("#captcha_screen").css({ display:"none" });
$("#captcha_layer").hide();
oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
} );
};

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon version="0.2">
<title xml:lang="ko">Captcha 애드온</title>
<title xml:lang="en">CAPTCHA addon</title>
<title xml:lang="en">CAPTCHA</title>
<title xml:lang="vi">Captcha Addon</title>
<title xml:lang="zh-CN">验证码插件</title>
<title xml:lang="jp">Captchaアドオン</title>
<title xml:lang="ru">Аддон Captcha</title>
<title xml:lang="zh-TW">圖形驗證</title>
<description xml:lang="ko">
프로그램 글 등록기를 막기 위해 게시판/ issueTracker에서 글/ 댓글을 입력하려 할 때 이미지를 보여주고 글에 해당하는 이미지를 선택하게 하는 애드온입니다.
프로그램 글 등록기를 막기 위해 게시판/ issueTracker에서 글/ 댓글을 입력하려 할 때 알파벳을 입력해야 글/댓글이 입력되는 애드온 입니다.
로그인하지 않은 경우에만 해당됩니다.
</description>
<description xml:lang="en">
@ -34,51 +34,51 @@
<description xml:lang="zh-TW">
此元件可防止機器人程式的垃圾留言,非註冊用戶在討論板/問題追蹤發表主題或評論時,必須要先選對畫面中所顯示的圖案才能發表。
</description>
<version>0.2</version>
<date>2009-02-20</date>
<version>1.0</version>
<date>2010-08-19</date>
<author email_address="developers@xpressengine.com" link="http://www.xpressengine.com">
<name xml:lang="ko">XE</name>
<name xml:lang="zh-CN">XE</name>
<name xml:lang="jp">XE</name>
<name xml:lang="zh-CN">XE</name>
<name xml:lang="jp">XE</name>
<name xml:lang="zh-TW">XE</name>
<name xml:lang="en">XE</name>
<name xml:lang="ru">XE</name>
<name xml:lang="en">XE</name>
<name xml:lang="ru">XE</name>
<name xml:lang="vi">XE</name>
</author>
<extra_vars>
<var name="target" type="select">
<title xml:lang="ko">Captcha 표시 대상</title>
<title xml:lang="zh-CN">应用对象</title>
<title xml:lang="jp">Captchaを表示する対象</title>
<title xml:lang="zh-TW">選擇目標</title>
<title xml:lang="zh-CN">应用对象</title>
<title xml:lang="jp">Captchaを表示する対象</title>
<title xml:lang="zh-TW">選擇目標</title>
<title xml:lang="en">Captcha Target</title>
<title xml:lang="ru">Captcha Target</title>
<title xml:lang="ru">Captcha Target</title>
<title xml:lang="vi">Mục tiêu Captcha hiển thị</title>
<description xml:lang="ko">글/댓글 등록시 captcha가 동작할 대상을 정할 수 있습니다. 관리자는 무조건 제외됩니다</description>
<description xml:lang="zh-CN">可以指定验证码应用对象(管理员除外)。</description>
<description xml:lang="jp">管理者を除き、書き込み・コメントを入力する際にcaptchaイメージを見せる対象を設定します。</description>
<description xml:lang="zh-TW">除了管理員,在發表主題或評論時,設定圖形驗證應用的對象。</description>
<description xml:lang="zh-CN">可以指定验证码应用对象(管理员除外)。</description>
<description xml:lang="jp">管理者を除き、書き込み・コメントを入力する際にcaptchaイメージを見せる対象を設定します。</description>
<description xml:lang="zh-TW">除了管理員,可以選擇圖形驗證應用的對象。</description>
<description xml:lang="en">You may specify targets CAPTCHA work. It's not applied when administrator writes.</description>
<description xml:lang="ru">You may specify targets CAPTCHA work. It's not applied when administrator writes.</description>
<description xml:lang="ru">You may specify targets CAPTCHA work. It's not applied when administrator writes.</description>
<description xml:lang="vi">Khi gửi bài, bình luận, Capcha sẽ hiển thị để xác nhận hành động của người sử dụng. Chức năng này không hoạt động với người quản lý.</description>
<options value="">
<title xml:lang="ko">로그인하지 않은 사용자</title>
<title xml:lang="zh-CN">非登录用户</title>
<title xml:lang="jp">ログインしてないユーザー</title>
<title xml:lang="zh-TW">非用戶</title>
<title xml:lang="zh-CN">非登录用户</title>
<title xml:lang="jp">ログインしてないユーザー</title>
<title xml:lang="zh-TW">非用戶</title>
<title xml:lang="en">Not logged-in users</title>
<title xml:lang="ru">Not logged-in users</title>
<title xml:lang="ru">Not logged-in users</title>
<title xml:lang="vi">Người dùng chưa đăng nhập</title>
</options>
<options value="all">
<title xml:lang="ko">모든 사용자</title>
<title xml:lang="zh-CN">所有用户</title>
<title xml:lang="jp">すべてのユーザー</title>
<title xml:lang="zh-CN">所有用户</title>
<title xml:lang="jp">すべてのユーザー</title>
<title xml:lang="zh-TW">所有用戶</title>
<title xml:lang="en">All users</title>
<title xml:lang="ru">All users</title>
<title xml:lang="ru">All users</title>
<title xml:lang="vi">Tất cả mọi người</title>
</options>
</var>
@ -86,16 +86,16 @@
<title xml:lang="ko">동작 방식</title>
<title xml:lang="zh-CN">验证方式</title>
<title xml:lang="jp">動作方式</title>
<title xml:lang="zh-TW">行為模式</title>
<title xml:lang="zh-TW">驗證模式</title>
<title xml:lang="en">How it works</title>
<title xml:lang="ru">How it works</title>
<title xml:lang="ru">How it works</title>
<title xml:lang="vi">Sử dụng</title>
<description xml:lang="ko">"1번만 동작"을 선택하시면 1번만 동작후 상태를 저장해서 다음부터 물어보지 않고 그렇지 않으면 매번 물어보게 됩니다</description>
<description xml:lang="zh-CN">"一次"就是每个IP只出现一次验证。</description>
<description xml:lang="zh-CN">"一次"就是每个IP只出现一次验证。</description>
<description xml:lang="jp">「1回だけ表示」を選択すると、最初だけ動作した後、その情報を記憶して次回からはCaptchaを見せないようにします。また、もう一つのオプションは毎回Captchaを表示します。</description>
<description xml:lang="zh-TW">選擇"單次"產生第一次動作後,下次不會再顯示;選擇"每次"則會一直顯示。</description>
<description xml:lang="zh-TW">選擇"單次",下次不會再顯示;選擇"每次"則會一直顯示。</description>
<description xml:lang="en">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="ru">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="ru">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="vi">Nếu chọn "Chỉ một lần" thì sau lần hiển thị đó Capcha sẽ không hiển thị với người sử dụng đó nữa.</description>
<options value="onetime">
<title xml:lang="ko">1번만 동작</title>
@ -104,7 +104,7 @@
<title xml:lang="zh-TW">單次</title>
<title xml:lang="vi">Chỉ một lần</title>
<title xml:lang="en">once</title>
<title xml:lang="ru">1 раз</title>
<title xml:lang="ru">1 раз</title>
</options>
<options value="everytime">
<title xml:lang="ko">매번 동작</title>
@ -112,7 +112,7 @@
<title xml:lang="jp">毎回表示</title>
<title xml:lang="zh-TW">每次</title>
<title xml:lang="en">every time</title>
<title xml:lang="ru">каждый раз</title>
<title xml:lang="ru">каждый раз</title>
<title xml:lang="vi">Luôn sử dụng</title>
</options>
</var>
@ -122,14 +122,14 @@
<title xml:lang="jp">비밀번호 찾기 적용</title>
<title xml:lang="zh-TW">忘記密碼</title>
<title xml:lang="en">applying to an action finding account</title>
<title xml:lang="ru">applying to an action finding account</title>
<title xml:lang="ru">applying to an action finding account</title>
<title xml:lang="vi">Khi lấy lại mật khẩu</title>
<description xml:lang="ko">적용으로 하시면 비밀번호 찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截以查找密码名义发送的垃圾邮件。</description>
<description xml:lang="jp">적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在忘記密碼時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="vi">Nếu áp dụng, khi thành viên cần lấy lại mật khẩu khi lỡ quên, Capcha sẽ hiện thị để xác nhận việc này.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
@ -137,7 +137,7 @@
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
@ -146,7 +146,7 @@
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
@ -156,14 +156,14 @@
<title xml:lang="jp">인증 메일 재발송 적용</title>
<title xml:lang="zh-TW">重寄認證信</title>
<title xml:lang="en">apply to an action resending authmail</title>
<title xml:lang="ru">apply to an action resending authmail</title>
<title xml:lang="ru">apply to an action resending authmail</title>
<title xml:lang="vi">Khi lấy lại mã kích hoạt</title>
<description xml:lang="ko">적용으로 하시면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截以重新发送认证邮件名义发送的垃圾邮件。</description>
<description xml:lang="jp">적용으로 하시면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">적용으로 하시면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在重寄認證信時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="vi">Nếu áp dụng, khi thành viên cần lấy lại mã kích hoạt thành viên, Capcha sẽ hiện thị để xác nhận việc này.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
@ -171,7 +171,7 @@
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
@ -180,7 +180,7 @@
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
@ -190,12 +190,12 @@
<title xml:lang="jp">인증 메일 재발송 적용</title>
<title xml:lang="zh-TW">會員註冊</title>
<title xml:lang="en">Apply to member signup</title>
<title xml:lang="ru">Apply to member signup</title>
<title xml:lang="ru">Apply to member signup</title>
<title xml:lang="vi">Apply to member signup</title>
<description xml:lang="ko">적용으로 하시면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截自动注册软件的施虐。</description>
<description xml:lang="jp">적용으로 하시면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="zh-TW">開啟功能後在註冊時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="vi">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
@ -205,7 +205,7 @@
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
@ -214,7 +214,7 @@
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>

BIN
addons/captcha/img/icon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

View file

@ -1,21 +1,6 @@
<?php
/**
* @file en.lang.php
* @author haneul (haneul0318@gmail.com)
* @brief English Language Pack
**/
$lang->about_captcha = "Please choose an image whose name is listed below";
$lang->target_captcha = array(
"airplane" => "airplane",
"apple" => "apple",
"book" => "book",
"camera" => "camera",
"dog" => "dog",
"earth" => "earth",
"flag" => "flag",
"mobile" => "mobile",
"note" => "note",
"skeleton" => "skeleton",
);
$lang->about_captcha = "Please type alphabets above in order. They are not case-sensitive.";
$lang->captcha_reload = 'Refresh Image';
$lang->captcha_play = 'Play sound of words';
$lang->captcha_denied = 'You have typed wrong alphabets.';
?>

View file

@ -1,21 +1,6 @@
<?php
/**
* @file addons/captcha/lang/jp.lang.php
* @author zero (zero@nzeo.com) 翻訳:ミニミ
* @brief 日本語言語パッケージ
**/
$lang->about_captcha = "ボットbotのスパム登録を防ぐため、下の単語と一致するイメージを選択して下さい。";
$lang->target_captcha = array(
"airplane" => "飛行機",
"apple" => "りんご",
"book" => "",
"camera" => "カメラ",
"dog" => "",
"earth" => "地球",
"flag" => "",
"mobile" => "携帯",
"note" => "音符",
"skeleton" => "がいこつ",
);
$lang->about_captcha = "위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.";
$lang->captcha_reload = '이미지 새로고침';
$lang->captcha_play = '음성으로 듣기';
$lang->captcha_denied = '잘못 입력하셨습니다';
?>

View file

@ -1,21 +1,6 @@
<?php
/**
* @file ko.lang.php
* @author zero (zero@nzeo.com)
* @brief 한국어 언어팩
**/
$lang->about_captcha = "프로그램 등록을 방지하기 위하여 아래 알려주는 이름과 일치하는 이미지를 선택해주세요";
$lang->target_captcha = array(
"airplane" => "비행기",
"apple" => "사과",
"book" => "",
"camera" => "카메라",
"dog" => "강아지",
"earth" => "지구",
"flag" => "깃발",
"mobile" => "핸드폰",
"note" => "음표",
"skeleton" => "해골",
);
$lang->about_captcha = "위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.";
$lang->captcha_reload = '이미지 새로고침';
$lang->captcha_play = '음성으로 듣기';
$lang->captcha_denied = '잘못 입력하셨습니다';
?>

View file

@ -1,21 +1,6 @@
<?php
/**
* @file ko.lang.php
* @author zero (zero@nzeo.com)
* @brief 한국어 언어팩
**/
$lang->about_captcha = "Пожалуйста, выберите картинки, соответсвующие словам внизу";
$lang->target_captcha = array(
"airplane" => "самолет",
"apple" => "яблоко",
"book" => "книга",
"camera" => "камера",
"dog" => "собака",
"earth" => "планета",
"flag" => "флаг",
"mobile" => "мобильный телефон",
"note" => "нота",
"skeleton" => "череп",
);
$lang->about_captcha = "위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.";
$lang->captcha_reload = '이미지 새로고침';
$lang->captcha_play = '음성으로 듣기';
$lang->captcha_denied = '잘못 입력하셨습니다';
?>

View file

@ -1,23 +1,6 @@
<?php
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░ * @File : common/lang/vi.lang.php ░░
░░ * @Author : zero (zero@nzeo.com) ░░
░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░
░░ * @Website: http://vietxe.net ░░
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ */
$lang->about_captcha = "Xin chọn một ảnh mà có tên được liệt kê ở dưới:";
$lang->target_captcha = array(
"airplane" => "Máy bay",
"apple" => "Trái táo",
"book" => "Sách",
"camera" => "Camera",
"dog" => "Con chó",
"earth" => "Trái đất",
"flag" => "Lá cờ",
"mobile" =>"Di động",
"note" => "Nốt nhạc",
"skeleton" => "Xương",
);
$lang->about_captcha = "위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.";
$lang->captcha_reload = '이미지 새로고침';
$lang->captcha_play = '음성으로 듣기';
$lang->captcha_denied = '잘못 입력하셨습니다';
?>

View file

@ -1,21 +1,6 @@
<?php
/**
* @file zh-CN.lang.php
* @author zero (zero@nzeo.com) 翻译guny
* @brief 验证码简体中文语言包
**/
$lang->about_captcha = "请选择与显示名称相一致的图片。";
$lang->target_captcha = array(
"airplane" => "飞机",
"apple" => "苹果",
"book" => "",
"camera" => "摄像机",
"dog" => "",
"earth" => "地球",
"flag" => "旗帜",
"mobile" => "手机",
"note" => "音符",
"skeleton" => "骷髅",
);
$lang->about_captcha = "위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.";
$lang->captcha_reload = '이미지 새로고침';
$lang->captcha_play = '음성으로 듣기';
$lang->captcha_denied = '잘못 입력하셨습니다';
?>

View file

@ -1,21 +1,6 @@
<?php
/**
* @file addons/captcha/lang/zh-TW.lang.php
* @author zero (zero@nzeo.com) 翻譯royallin
* @brief 圖形驗證正體中文語言
**/
$lang->about_captcha = "用於防止機器人程式之垃圾留言,請選擇一個符合下列詞語的圖像。";
$lang->target_captcha = array(
"airplane" => "飛機",
"apple" => "蘋果",
"book" => "書本",
"camera" => "照相機",
"dog" => "小狗",
"earth" => "地球",
"flag" => "國旗",
"mobile" => "手機",
"note" => "音符",
"skeleton" => "骷髏",
);
$lang->about_captcha = "위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.";
$lang->captcha_reload = '이미지 새로고침';
$lang->captcha_play = '음성으로 듣기';
$lang->captcha_denied = '잘못 입력하셨습니다';
?>

BIN
addons/captcha/swf/play.swf Normal file

Binary file not shown.