Remove previous CAPTCHA addons
|
|
@ -1,397 +0,0 @@
|
|||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
|
||||
if(!defined("__XE__")) exit();
|
||||
|
||||
/**
|
||||
* @file captcha.addon.php
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief Captcha for a particular action
|
||||
* English alphabets and voice verification added
|
||||
* */
|
||||
if(!class_exists('AddonCaptcha', false))
|
||||
{
|
||||
class AddonCaptcha
|
||||
{
|
||||
|
||||
var $addon_info;
|
||||
var $target_acts = NULL;
|
||||
|
||||
function setInfo(&$addon_info)
|
||||
{
|
||||
$this->addon_info = $addon_info;
|
||||
}
|
||||
|
||||
function before_module_proc()
|
||||
{
|
||||
if($this->addon_info->act_type == 'everytime' && $_SESSION['captcha_authed'])
|
||||
{
|
||||
unset($_SESSION['captcha_authed']);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
if($_SESSION['XE_VALIDATOR_ERROR'] == -1)
|
||||
{
|
||||
$_SESSION['captcha_authed'] = false;
|
||||
}
|
||||
if($_SESSION['captcha_authed'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$type = Context::get('captchaType');
|
||||
|
||||
$this->target_acts = array('procBoardInsertDocument', 'procBoardInsertComment', 'procIssuetrackerInsertIssue', 'procIssuetrackerInsertHistory', 'procTextyleInsertComment');
|
||||
|
||||
if(Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON')
|
||||
{
|
||||
if($type == 'inline')
|
||||
{
|
||||
if(!$this->compareCaptcha())
|
||||
{
|
||||
Context::loadLang(_XE_PATH_ . 'addons/captcha/lang');
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = -1;
|
||||
$_SESSION['XE_VALIDATOR_MESSAGE'] = lang('captcha_denied');
|
||||
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
|
||||
$_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
|
||||
$ModuleHandler->_setInputValueToSession();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::addHtmlHeader('<script>
|
||||
if(!captchaTargetAct) {var captchaTargetAct = [];}
|
||||
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
|
||||
</script>');
|
||||
Context::loadFile(array('./addons/captcha/captcha.js', 'body', '', null), true);
|
||||
}
|
||||
}
|
||||
|
||||
// compare session when calling actions such as writing a post or a comment on the board/issue tracker module
|
||||
if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $this->target_acts))
|
||||
{
|
||||
Context::loadLang(_XE_PATH_ . 'addons/captcha/lang');
|
||||
$ModuleHandler->error = "captcha_denied";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function createKeyword()
|
||||
{
|
||||
$type = Context::get('captchaType');
|
||||
if($type == 'inline' && $_SESSION['captcha_keyword'])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$arr = range('A', 'Y');
|
||||
shuffle($arr);
|
||||
$arr = array_slice($arr, 0, 6);
|
||||
$_SESSION['captcha_keyword'] = join('', $arr);
|
||||
}
|
||||
|
||||
function before_module_init_setCaptchaSession()
|
||||
{
|
||||
if($_SESSION['captcha_authed'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Load language files
|
||||
Context::loadLang(_XE_PATH_ . 'addons/captcha/lang');
|
||||
// Generate keywords
|
||||
$this->createKeyword();
|
||||
|
||||
$target = lang('target_captcha');
|
||||
header("Content-Type: text/xml; charset=UTF-8");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
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_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>"
|
||||
, lang('about_captcha')
|
||||
, lang('captcha_reload')
|
||||
, lang('captcha_play')
|
||||
, lang('cmd_input')
|
||||
, lang('cmd_cancel')
|
||||
);
|
||||
Context::close();
|
||||
exit();
|
||||
}
|
||||
|
||||
function before_module_init_captchaImage()
|
||||
{
|
||||
if($_SESSION['captcha_authed'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(Context::get('renew'))
|
||||
{
|
||||
$this->createKeyword();
|
||||
}
|
||||
|
||||
$keyword = $_SESSION['captcha_keyword'];
|
||||
$im = $this->createCaptchaImage($keyword);
|
||||
|
||||
header("Cache-Control: ");
|
||||
header("Pragma: ");
|
||||
header("Content-Type: image/png");
|
||||
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
|
||||
Context::close();
|
||||
exit();
|
||||
}
|
||||
|
||||
function createCaptchaImage($string)
|
||||
{
|
||||
$arr = array();
|
||||
for($i = 0, $c = strlen($string); $i < $c; $i++)
|
||||
{
|
||||
$arr[] = $string{$i};
|
||||
}
|
||||
|
||||
// Font site
|
||||
$w = 18;
|
||||
$h = 25;
|
||||
|
||||
// Character length
|
||||
$c = count($arr);
|
||||
|
||||
// Character image
|
||||
$im = array();
|
||||
|
||||
// Create an image by total size
|
||||
$im[] = imagecreate(($w + 2) * count($arr), $h);
|
||||
|
||||
$deg = range(-30, 30);
|
||||
shuffle($deg);
|
||||
|
||||
// Create an image for each letter
|
||||
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);
|
||||
|
||||
// Control font size
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
// Combine images of each character
|
||||
for($i = 1, $c = count($im); $i<$c; $i++)
|
||||
{
|
||||
imagecopy($im[0], $im[$i], (($w + 2) * ($i - 1)), 0, 0, 0, $w, $h);
|
||||
imagedestroy($im[$i]);
|
||||
}
|
||||
|
||||
// Larger image
|
||||
$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);
|
||||
}
|
||||
|
||||
// Background line
|
||||
$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); // Random start in 4-byte header and 64 byte data
|
||||
$datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes
|
||||
|
||||
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 compareCaptcha()
|
||||
{
|
||||
if(!in_array(Context::get('act'), $this->target_acts)) return true;
|
||||
|
||||
if($_SESSION['captcha_authed'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text')))
|
||||
{
|
||||
$_SESSION['captcha_authed'] = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
unset($_SESSION['captcha_authed']);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function before_module_init_captchaCompare()
|
||||
{
|
||||
if(!$this->compareCaptcha())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
header("Content-Type: text/xml; charset=UTF-8");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
print("<response>\r\n<error>0</error>\r\n<message>success</message>\r\n</response>");
|
||||
|
||||
Context::close();
|
||||
exit();
|
||||
}
|
||||
|
||||
function inlineDisplay()
|
||||
{
|
||||
unset($_SESSION['captcha_authed']);
|
||||
$this->createKeyword();
|
||||
|
||||
$swfURL = getUrl() . 'addons/captcha/swf/play.swf';
|
||||
Context::unloadFile('./addons/captcha/captcha.js');
|
||||
Context::loadFile(array('./addons/captcha/inline_captcha.js', 'body'));
|
||||
|
||||
global $lang;
|
||||
|
||||
$tags = <<<EOD
|
||||
<img src="%s" id="captcha_image" alt="CAPTCHA" width="240" height="50" style="width:240px; height:50px; border:1px solid #b0b0b0" />
|
||||
<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">
|
||||
<param name="allowScriptAccess" value="always" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="movie" value="%s" />
|
||||
<param name="wmode" value="window" />
|
||||
<param name="allowFullScreen" value="false">
|
||||
<param name="bgcolor" value="#fffff" />
|
||||
<embed src="%s" 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" />
|
||||
</object>
|
||||
<button type="button" class="captchaReload text">%s</button>
|
||||
<button type="button" class="captchaPlay text">%s</button><br />
|
||||
<input type="hidden" name="captchaType" value="inline" />
|
||||
<input name="secret_text" type="text" id="secret_text" />
|
||||
EOD;
|
||||
$tags = sprintf($tags, getUrl('captcha_action', 'captchaImage', 'rand', mt_rand(10000, 99999))
|
||||
, $swfURL
|
||||
, $swfURL
|
||||
, $lang->reload
|
||||
, $lang->play);
|
||||
return $tags;
|
||||
}
|
||||
|
||||
}
|
||||
$GLOBALS['__AddonCaptcha__'] = new AddonCaptcha;
|
||||
$GLOBALS['__AddonCaptcha__']->setInfo($addon_info);
|
||||
Context::set('oCaptcha', $GLOBALS['__AddonCaptcha__']);
|
||||
}
|
||||
|
||||
$oAddonCaptcha = &$GLOBALS['__AddonCaptcha__'];
|
||||
|
||||
if(method_exists($oAddonCaptcha, $called_position))
|
||||
{
|
||||
if(!call_user_func_array(array(&$oAddonCaptcha, $called_position), array(&$this)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$addon_act = Context::get('captcha_action');
|
||||
if($addon_act && method_exists($oAddonCaptcha, $called_position . '_' . $addon_act))
|
||||
{
|
||||
if(!call_user_func_array(array(&$oAddonCaptcha, $called_position . '_' . $addon_act), array(&$this)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/* End of file captcha.addon.php */
|
||||
/* Location: ./addons/captcha/captcha.addon.php */
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
/* procFilter 함수를 가로채서 captcha 이미지 및 폼을 출력 */
|
||||
var calledArgs = null;
|
||||
(function($){
|
||||
$(function() {
|
||||
var captchaXE = null;
|
||||
|
||||
function xeCaptcha() {
|
||||
$('form').each(function(i)
|
||||
{
|
||||
var isSubmitHook = false;
|
||||
if (!$(this).attr('onsubmit') || $(this).attr('onsubmit').indexOf('procFilter') < 0)
|
||||
{
|
||||
var act = $(this).find('input[name=act]').val()
|
||||
for(var i = 0; i<captchaTargetAct.length; i++)
|
||||
{
|
||||
if(captchaTargetAct[i] == act)
|
||||
{
|
||||
isSubmitHook = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isSubmitHook)
|
||||
{
|
||||
$(this).append('<input type="hidden" name="captchaType" value="inline" />');
|
||||
if(!$(this).find('input[name=error_return_url]'))
|
||||
$(this).append('<input type="hidden" name="error_return_url" value="'+current_url+'" />');
|
||||
$(this).submit(function(event){
|
||||
if ($(this).find('input[name=secret_text]').val())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
var self = this;
|
||||
|
||||
$('#captcha_layer form')
|
||||
.submit(function(e){
|
||||
e.preventDefault();
|
||||
if(!$('#secret_text').val()){
|
||||
$(this).find('input[type=text]').val('').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
$(self).append('<input type="hidden" name="secret_text" value="'+ $('#secret_text').val() +'" />');
|
||||
$(self).submit();
|
||||
});
|
||||
var params = new Array();
|
||||
params['captcha_action'] = 'setCaptchaSession';
|
||||
params['mid'] = current_mid;
|
||||
window.oldExecXml('', '', params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
|
||||
});
|
||||
}
|
||||
});
|
||||
var body = $(document.body);
|
||||
var captchaIma;
|
||||
|
||||
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; top:0; left:0; width:100%; height:100%;display:none;z-index:10">').appendTo(document.body);
|
||||
|
||||
var top_left = 'margin:-105px 0 0 -105px; top:50%; left:50%;';
|
||||
if(screen.width<480) { top_left = ''; }
|
||||
var $div = $('<div style="z-index:1000;position:absolute; width:310px;' + top_left + ' 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="ime-mode:inactive;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('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;
|
||||
window.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;
|
||||
|
||||
$.each(captchaTargetAct || {}, function(key,val){ if (val == act){ doCheck = true; return false; } });
|
||||
|
||||
if (doCheck) { /* captcha 를 사용하는 경우 */
|
||||
|
||||
$('#captcha_layer form')
|
||||
.submit(function(e){
|
||||
e.preventDefault();
|
||||
if(!$('#secret_text').val()){
|
||||
$(this).find('input[type=text]').val('').focus();
|
||||
return false;
|
||||
}
|
||||
captchaXE.compare(); return false;
|
||||
});
|
||||
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;
|
||||
window.oldExecXml(module, act, params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
|
||||
} else {
|
||||
window.oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
captchaXE.show = function(ret_obj) {
|
||||
$('#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();
|
||||
$('html, body').css('height','100%');
|
||||
};
|
||||
|
||||
captchaXE.compare = function(e) {
|
||||
var params = new Array();
|
||||
params['captcha_action'] = 'captchaCompare';
|
||||
params['mid'] = current_mid;
|
||||
params['secret_text'] = $('#secret_text').val();
|
||||
window.oldExecXml(calledArgs.module,calledArgs.act,params, function() {
|
||||
$("#captcha_layer").hide();
|
||||
window.oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
|
||||
} );
|
||||
};
|
||||
}
|
||||
return captchaXE;
|
||||
}
|
||||
|
||||
$(window).ready(function(){
|
||||
if(!window.oldExecXml) {
|
||||
window.oldExecXml = window.exec_xml;
|
||||
window.exec_xml = xeCaptcha().exec;
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon version="0.2">
|
||||
<title xml:lang="ko">Captcha 애드온</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에서 글/ 댓글을 입력하려 할 때 알파벳을 입력해야 글/댓글이 입력되는 애드온 입니다.
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
This addon helps to prevent spam messages to be posted by requesting non-logged-in users to type characters displayed in the image before submitting comments or posts.
|
||||
</description>
|
||||
<description xml:lang="vi">
|
||||
Addon này tạo ra một hình ảnh xác nhận khi đăng kí, gửi bài, hay viết bình luận nếu thành viên không đăng nhập.
|
||||
Addon này chỉ hoạt động khi được kích hoạt.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
为了解决互联网垃圾而开发的验证码机制。
|
||||
非登录用户发布话题或评论时将会弹出验证图片选择框,选择正确的图片才可以正常发布(适用于版面/issueTracker)。
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
ボット(bot)がプログラムによるスパム行為を防ぐために、掲示板/issueTrackerで書き込み・コメントを登録する際、ランダムな文字や数字の列を画面に表示し、表示されたものと一致した情報を入力した時、登録が出来るようにするアドオンです。
|
||||
ログインしてない時だけ、動作します。
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
To block spam written by programs, let users to choose a suitable image to text when writing a posting or comment.
|
||||
This addon applies only to not-logged-in users.
|
||||
</description>
|
||||
<description xml:lang="zh-TW">
|
||||
可防止機器人程式的垃圾留言,非用戶要發表主題或回覆時,必須要輸入正確圖片中所顯示的文字才能發表。
|
||||
</description>
|
||||
<version>1.7</version>
|
||||
<date>2013-11-27</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
<name xml:lang="zh-CN">NAVER</name>
|
||||
<name xml:lang="jp">NAVER</name>
|
||||
<name xml:lang="zh-TW">NAVER</name>
|
||||
<name xml:lang="en">NAVER</name>
|
||||
<name xml:lang="ru">NAVER</name>
|
||||
<name xml:lang="vi">NAVER</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="en">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="en">You can specify if CAPTCHA should be displayed when posting an article or comment. It will not apply to administrators.</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="en">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-TW">所有用戶</title>
|
||||
<title xml:lang="en">All users</title>
|
||||
<title xml:lang="ru">All users</title>
|
||||
<title xml:lang="vi">Tất cả mọi người</title>
|
||||
</options>
|
||||
</var>
|
||||
<var name="act_type" type="select">
|
||||
<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="en">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="jp">「1回だけ表示」を選択すると、最初だけ動作した後、その情報を記憶して次回からはCaptchaを見せないようにします。また、もう一つのオプションは毎回Captchaを表示します。</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="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>
|
||||
<title xml:lang="zh-CN">一次</title>
|
||||
<title xml:lang="jp">1回だけ表示</title>
|
||||
<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>
|
||||
</options>
|
||||
<options value="everytime">
|
||||
<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="en">every time</title>
|
||||
<title xml:lang="ru">каждый раз</title>
|
||||
<title xml:lang="vi">Luôn sử dụng</title>
|
||||
</options>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</addon>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 100 B |
|
|
@ -1,17 +0,0 @@
|
|||
jQuery(function($){
|
||||
$('button.captchaPlay')
|
||||
.click(function(){
|
||||
var swf = document['captcha_audio'] || window['captcha_audio'];
|
||||
var audio = current_url.setQuery('captcha_action','captchaAudio').setQuery('rand', (new Date).getTime());
|
||||
|
||||
if(swf.length > 1) swf = swf[0];
|
||||
|
||||
$('input[type=text]#secret_text').focus();
|
||||
swf.setSoundTarget(audio,'1');
|
||||
});
|
||||
|
||||
$('button.captchaReload')
|
||||
.click(function(){
|
||||
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rand', (new Date).getTime()).setQuery('renew',1));
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = 'Please type the characters you see in the picture above. They are not case-sensitive.';
|
||||
$lang->captcha_reload = 'Refresh the image';
|
||||
$lang->captcha_play = 'Listen and type the letters you hear.';
|
||||
$lang->captcha_denied = 'The characters you entered didn\'t match the word verification.';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = 'アルファベット順に入力してください。大文字、小文字は区別しません。';
|
||||
$lang->captcha_reload = 'リフレッシュ';
|
||||
$lang->captcha_play = '音声';
|
||||
$lang->captcha_denied = '正しく入力してください。';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = '위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.';
|
||||
$lang->captcha_reload = '이미지 새로고침';
|
||||
$lang->captcha_play = '음성으로 듣기';
|
||||
$lang->captcha_denied = '잘못 입력했습니다';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = '请依次输入图片中的文字,不区分大小写';
|
||||
$lang->captcha_reload = '刷新';
|
||||
$lang->captcha_play = '播放';
|
||||
$lang->captcha_denied = '验证码错误';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = '請依序輸入圖片中的文字,不分大小寫。';
|
||||
$lang->captcha_reload = '更換';
|
||||
$lang->captcha_play = '播放';
|
||||
$lang->captcha_denied = '輸入錯誤';
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
/* procFilter 함수를 가로채서 captcha 이미지 및 폼을 출력 */
|
||||
var calledArgs = null;
|
||||
(function($){
|
||||
$(function() {
|
||||
var captchaXE = null;
|
||||
|
||||
function xeCaptcha() {
|
||||
$('form').each(function(i)
|
||||
{
|
||||
var isSubmitHook = false;
|
||||
if (!$(this).attr('onsubmit') || $(this).attr('onsubmit').indexOf('procFilter') < 0)
|
||||
{
|
||||
var act = $(this).find('input[name=act]').val()
|
||||
for(var i = 0; i<captchaTargetAct.length; i++)
|
||||
{
|
||||
if(captchaTargetAct[i] == act)
|
||||
{
|
||||
isSubmitHook = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isSubmitHook)
|
||||
{
|
||||
$(this).append('<input type="hidden" name="captchaType" value="inline" />');
|
||||
if(!$(this).find('input[name=error_return_url]'))
|
||||
$(this).append('<input type="hidden" name="error_return_url" value="'+current_url+'" />');
|
||||
$(this).submit(function(event){
|
||||
if ($(this).find('input[name=secret_text]').val())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
var self = this;
|
||||
|
||||
$('#captcha_layer form')
|
||||
.submit(function(e){
|
||||
e.preventDefault();
|
||||
if(!$('#secret_text').val()){
|
||||
$(this).find('input[type=text]').val('').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
$(self).append('<input type="hidden" name="secret_text" value="'+ $('#secret_text').val() +'" />');
|
||||
$(self).submit();
|
||||
});
|
||||
var params = new Array();
|
||||
params['captcha_action'] = 'setCaptchaSession';
|
||||
params['mid'] = current_mid;
|
||||
window.oldExecXml('', '', params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
|
||||
});
|
||||
}
|
||||
});
|
||||
var body = $(document.body);
|
||||
var captchaIma;
|
||||
|
||||
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; top:0; left:0; width:100%; height:100%;display:none;z-index:10">').appendTo(document.body);
|
||||
|
||||
var top_left = 'margin:-105px 0 0 -105px; top:50%; left:50%;';
|
||||
if(screen.width<480) { top_left = ''; }
|
||||
var $div = $('<div style="z-index:1000;position:absolute; width:310px;' + top_left + ' 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="ime-mode:inactive;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('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;
|
||||
window.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;
|
||||
|
||||
$.each(captchaTargetAct || {}, function(key,val){ if (val == act){ doCheck = true; return false; } });
|
||||
|
||||
if (doCheck) { /* captcha 를 사용하는 경우 */
|
||||
|
||||
$('#captcha_layer form')
|
||||
.submit(function(e){
|
||||
e.preventDefault();
|
||||
if(!$('#secret_text').val()){
|
||||
$(this).find('input[type=text]').val('').focus();
|
||||
return false;
|
||||
}
|
||||
captchaXE.compare(); return false;
|
||||
});
|
||||
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;
|
||||
window.oldExecXml(module, act, params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
|
||||
} else {
|
||||
window.oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
captchaXE.show = function(ret_obj) {
|
||||
$('#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();
|
||||
$('html, body').css('height','100%');
|
||||
};
|
||||
|
||||
captchaXE.compare = function(e) {
|
||||
var params = new Array();
|
||||
params['captcha_action'] = 'captchaCompare';
|
||||
params['mid'] = current_mid;
|
||||
params['secret_text'] = $('#secret_text').val();
|
||||
window.oldExecXml(calledArgs.module,calledArgs.act,params, function() {
|
||||
$("#captcha_layer").hide();
|
||||
window.oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
|
||||
} );
|
||||
};
|
||||
}
|
||||
return captchaXE;
|
||||
}
|
||||
|
||||
$(window).ready(function(){
|
||||
if(!window.oldExecXml) {
|
||||
window.oldExecXml = window.exec_xml;
|
||||
window.exec_xml = xeCaptcha().exec;
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
@ -1,408 +0,0 @@
|
|||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
|
||||
if(!defined("__XE__")) exit();
|
||||
|
||||
/**
|
||||
* @file captcha.addon.php
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief Captcha for a particular action
|
||||
* English alphabets and voice verification added
|
||||
* */
|
||||
if(!class_exists('AddonMemberCaptcha', false))
|
||||
{
|
||||
class AddonMemberCaptcha
|
||||
{
|
||||
var $addon_info;
|
||||
var $target_acts = NULL;
|
||||
|
||||
function setInfo(&$addon_info)
|
||||
{
|
||||
$this->addon_info = $addon_info;
|
||||
}
|
||||
|
||||
function before_module_proc()
|
||||
{
|
||||
// if($_SESSION['member_captcha_authed'])
|
||||
// {
|
||||
unset($_SESSION['member_captcha_authed']);
|
||||
// }
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
if($_SESSION['XE_VALIDATOR_ERROR'] == -1)
|
||||
{
|
||||
$_SESSION['member_captcha_authed'] = false;
|
||||
}
|
||||
if($_SESSION['member_captcha_authed'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$type = Context::get('captchaType');
|
||||
|
||||
$this->target_acts = array();
|
||||
if($this->addon_info->apply_find_account == 'apply')
|
||||
{
|
||||
$this->target_acts[] = 'procMemberFindAccount';
|
||||
}
|
||||
if($this->addon_info->apply_resend_auth_mail == 'apply')
|
||||
{
|
||||
$this->target_acts[] = 'procMemberResendAuthMail';
|
||||
}
|
||||
if($this->addon_info->apply_signup == 'apply')
|
||||
{
|
||||
$this->target_acts[] = 'procMemberInsert';
|
||||
}
|
||||
|
||||
if(Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON')
|
||||
{
|
||||
if($type == 'inline')
|
||||
{
|
||||
if(!$this->compareCaptcha())
|
||||
{
|
||||
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = -1;
|
||||
$_SESSION['XE_VALIDATOR_MESSAGE'] = lang('captcha_denied');
|
||||
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
|
||||
$_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
|
||||
$ModuleHandler->_setInputValueToSession();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::addHtmlHeader('<script>
|
||||
if(!captchaTargetAct) {var captchaTargetAct = [];}
|
||||
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
|
||||
</script>');
|
||||
Context::loadFile(array('./addons/captcha_member/captcha.js', 'body', '', null), true);
|
||||
}
|
||||
}
|
||||
|
||||
// compare session when calling actions such as writing a post or a comment on the board/issue tracker module
|
||||
if(!$_SESSION['member_captcha_authed'] && in_array(Context::get('act'), $this->target_acts))
|
||||
{
|
||||
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
|
||||
$ModuleHandler->error = "captcha_denied";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function createKeyword()
|
||||
{
|
||||
$type = Context::get('captchaType');
|
||||
if($type == 'inline' && $_SESSION['captcha_keyword'])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$arr = range('A', 'Y');
|
||||
shuffle($arr);
|
||||
$arr = array_slice($arr, 0, 6);
|
||||
$_SESSION['captcha_keyword'] = join('', $arr);
|
||||
}
|
||||
|
||||
function before_module_init_setCaptchaSession()
|
||||
{
|
||||
if($_SESSION['member_captcha_authed'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Load language files
|
||||
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
|
||||
// Generate keywords
|
||||
$this->createKeyword();
|
||||
|
||||
$target = lang('target_captcha');
|
||||
header("Content-Type: text/xml; charset=UTF-8");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
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_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>"
|
||||
, lang('about_captcha')
|
||||
, lang('captcha_reload')
|
||||
, lang('captcha_play')
|
||||
, lang('cmd_input')
|
||||
, lang('cmd_cancel')
|
||||
);
|
||||
Context::close();
|
||||
exit();
|
||||
}
|
||||
|
||||
function before_module_init_captchaImage()
|
||||
{
|
||||
if($_SESSION['member_captcha_authed'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(Context::get('renew'))
|
||||
{
|
||||
$this->createKeyword();
|
||||
}
|
||||
|
||||
$keyword = $_SESSION['captcha_keyword'];
|
||||
$im = $this->createCaptchaImage($keyword);
|
||||
|
||||
header("Cache-Control: ");
|
||||
header("Pragma: ");
|
||||
header("Content-Type: image/png");
|
||||
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
|
||||
Context::close();
|
||||
exit();
|
||||
}
|
||||
|
||||
function createCaptchaImage($string)
|
||||
{
|
||||
$arr = array();
|
||||
for($i = 0, $c = strlen($string); $i < $c; $i++)
|
||||
{
|
||||
$arr[] = $string{$i};
|
||||
}
|
||||
|
||||
// Font site
|
||||
$w = 18;
|
||||
$h = 25;
|
||||
|
||||
// Character length
|
||||
$c = count($arr);
|
||||
|
||||
// Character image
|
||||
$im = array();
|
||||
|
||||
// Create an image by total size
|
||||
$im[] = imagecreate(($w + 2) * count($arr), $h);
|
||||
|
||||
$deg = range(-30, 30);
|
||||
shuffle($deg);
|
||||
|
||||
// Create an image for each letter
|
||||
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);
|
||||
|
||||
// Control font size
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
// Combine images of each character
|
||||
for($i = 1; $i < count($im); $i++)
|
||||
{
|
||||
imagecopy($im[0], $im[$i], (($w + 2) * ($i - 1)), 0, 0, 0, $w, $h);
|
||||
imagedestroy($im[$i]);
|
||||
}
|
||||
|
||||
// Larger image
|
||||
$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);
|
||||
}
|
||||
|
||||
// Background line
|
||||
$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['member_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_member/audio/F_%s.mp3';
|
||||
for($i = 0, $c = strlen($string); $i < $c; $i++)
|
||||
{
|
||||
$_data = FileHandler::readFile(sprintf($_audio, $string{$i}));
|
||||
|
||||
$start = rand(5, 68); // Random start in 4-byte header and 64 byte data
|
||||
$datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes
|
||||
|
||||
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 compareCaptcha()
|
||||
{
|
||||
if(!in_array(Context::get('act'), $this->target_acts)) return true;
|
||||
|
||||
if($_SESSION['member_captcha_authed'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text')))
|
||||
{
|
||||
$_SESSION['member_captcha_authed'] = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
unset($_SESSION['member_captcha_authed']);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function before_module_init_captchaCompare()
|
||||
{
|
||||
if(!$this->compareCaptcha())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
header("Content-Type: text/xml; charset=UTF-8");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
print("<response>\r\n<error>0</error>\r\n<message>success</message>\r\n</response>");
|
||||
|
||||
Context::close();
|
||||
exit();
|
||||
}
|
||||
|
||||
function inlineDisplay()
|
||||
{
|
||||
unset($_SESSION['member_captcha_authed']);
|
||||
$this->createKeyword();
|
||||
|
||||
$swfURL = getUrl() . 'addons/captcha_member/swf/play.swf';
|
||||
Context::unloadFile('./addons/captcha_member/captcha.js');
|
||||
Context::loadFile(array('./addons/captcha_member/inline_captcha.js', 'body'));
|
||||
|
||||
global $lang;
|
||||
|
||||
$tags = <<<EOD
|
||||
<img src="%s" id="captcha_image" alt="CAPTCHA" width="240" height="50" style="width:240px; height:50px; border:1px solid #b0b0b0" />
|
||||
<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">
|
||||
<param name="allowScriptAccess" value="always" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="movie" value="%s" />
|
||||
<param name="wmode" value="window" />
|
||||
<param name="allowFullScreen" value="false">
|
||||
<param name="bgcolor" value="#fffff" />
|
||||
<embed src="%s" 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" />
|
||||
</object>
|
||||
<button type="button" class="captchaReload text">%s</button>
|
||||
<button type="button" class="captchaPlay text">%s</button><br />
|
||||
<input type="hidden" name="captchaType" value="inline" />
|
||||
<input name="secret_text" type="text" id="secret_text" />
|
||||
EOD;
|
||||
$tags = sprintf($tags, getUrl('captcha_action', 'captchaImage', 'rand', mt_rand(10000, 99999))
|
||||
, $swfURL
|
||||
, $swfURL
|
||||
, $lang->reload
|
||||
, $lang->play);
|
||||
return $tags;
|
||||
}
|
||||
|
||||
}
|
||||
$GLOBALS['__AddonMemberCaptcha__'] = new AddonMemberCaptcha;
|
||||
$GLOBALS['__AddonMemberCaptcha__']->setInfo($addon_info);
|
||||
Context::set('oMemberCaptcha', $GLOBALS['__AddonMemberCaptcha__']);
|
||||
}
|
||||
|
||||
$oAddonMemberCaptcha = &$GLOBALS['__AddonMemberCaptcha__'];
|
||||
|
||||
if(method_exists($oAddonMemberCaptcha, $called_position))
|
||||
{
|
||||
if(!call_user_func_array(array(&$oAddonMemberCaptcha, $called_position), array(&$this)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$addon_act = Context::get('captcha_action');
|
||||
if($addon_act && method_exists($oAddonMemberCaptcha, $called_position . '_' . $addon_act))
|
||||
{
|
||||
if(!call_user_func_array(array(&$oAddonMemberCaptcha, $called_position . '_' . $addon_act), array(&$this)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/* End of file captcha_member.addon.php */
|
||||
/* Location: ./addons/captcha_member/captcha_member.addon.php */
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon version="0.2">
|
||||
<title xml:lang="ko">Captcha Member 애드온</title>
|
||||
<title xml:lang="en">CAPTCHA Member</title>
|
||||
<title xml:lang="vi">Captcha Member 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">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<description xml:lang="vi">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<description xml:lang="zh-TW">
|
||||
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
|
||||
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
|
||||
</description>
|
||||
<version>1.7</version>
|
||||
<date>2013-11-27</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
<name xml:lang="zh-CN">NAVER</name>
|
||||
<name xml:lang="jp">NAVER</name>
|
||||
<name xml:lang="zh-TW">NAVER</name>
|
||||
<name xml:lang="en">NAVER</name>
|
||||
<name xml:lang="ru">NAVER</name>
|
||||
<name xml:lang="vi">NAVER</name>
|
||||
</author>
|
||||
|
||||
<extra_vars>
|
||||
<var name="apply_signup" type="select">
|
||||
<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="en">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">開啟功能後在註冊時會顯示驗證碼。</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>
|
||||
<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="en">Not apply</title>
|
||||
<title xml:lang="ru">Not apply</title>
|
||||
<title xml:lang="vi">Không áp dụng</title>
|
||||
</options>
|
||||
<options value="apply">
|
||||
<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="en">Apply</title>
|
||||
<title xml:lang="ru">Apply</title>
|
||||
<title xml:lang="vi">Áp dụng</title>
|
||||
</options>
|
||||
</var>
|
||||
<var name="apply_find_account" type="select">
|
||||
<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="en">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="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="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>
|
||||
<title xml:lang="zh-CN">不启用</title>
|
||||
<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="vi">Không áp dụng</title>
|
||||
</options>
|
||||
<options value="apply">
|
||||
<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="en">Apply</title>
|
||||
<title xml:lang="ru">Apply</title>
|
||||
<title xml:lang="vi">Áp dụng</title>
|
||||
</options>
|
||||
</var>
|
||||
<var name="apply_resend_auth_mail" type="select">
|
||||
<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="en">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="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="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>
|
||||
<title xml:lang="zh-CN">不启用</title>
|
||||
<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="vi">Không áp dụng</title>
|
||||
</options>
|
||||
<options value="apply">
|
||||
<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="en">Apply</title>
|
||||
<title xml:lang="ru">Apply</title>
|
||||
<title xml:lang="vi">Áp dụng</title>
|
||||
</options>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</addon>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 100 B |
|
|
@ -1,17 +0,0 @@
|
|||
jQuery(function($){
|
||||
$('button.captchaPlay')
|
||||
.click(function(){
|
||||
var swf = document['captcha_audio'] || window['captcha_audio'];
|
||||
var audio = current_url.setQuery('captcha_action','captchaAudio').setQuery('rand', (new Date).getTime());
|
||||
|
||||
if(swf.length > 1) swf = swf[0];
|
||||
|
||||
$('input[type=text]#secret_text').focus();
|
||||
swf.setSoundTarget(audio,'1');
|
||||
});
|
||||
|
||||
$('button.captchaReload')
|
||||
.click(function(){
|
||||
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rand', (new Date).getTime()).setQuery('renew',1));
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = 'Please type the characters you see in the picture above. They are not case-sensitive.';
|
||||
$lang->captcha_reload = 'Refresh the image';
|
||||
$lang->captcha_play = 'Listen and type the letters you hear.';
|
||||
$lang->captcha_denied = 'The characters you entered didn\'t match the word verification.';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = 'アルファベット順に入力してください。大文字、小文字は区別しません。';
|
||||
$lang->captcha_reload = 'リフレッシュ';
|
||||
$lang->captcha_play = '音声';
|
||||
$lang->captcha_denied = '正しく入力してください。';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = '위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.';
|
||||
$lang->captcha_reload = '이미지 새로고침';
|
||||
$lang->captcha_play = '음성으로 듣기';
|
||||
$lang->captcha_denied = '잘못 입력했습니다';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = '请依次输入图片中的文字,不区分大小写';
|
||||
$lang->captcha_reload = '刷新';
|
||||
$lang->captcha_play = '播放';
|
||||
$lang->captcha_denied = '验证码错误';
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
$lang->about_captcha = '請依序輸入圖片中的文字,不分大小寫。';
|
||||
$lang->captcha_reload = '更換';
|
||||
$lang->captcha_play = '播放';
|
||||
$lang->captcha_denied = '輸入錯誤';
|
||||