if (!nv_capcha_txt(($global_config['captcha_type'] == 2 ? $nv_Request->get_title('g-recaptcha-response', 'post', '') : $nv_Request->get_title('fcode', 'post', '')))) {
nv_jsonOutput(array(
'status' => 'error',
'input' => ($global_config['captcha_type'] == 2 ? '' : 'fcode'),
'mess' => ($global_config['captcha_type'] == 2 ? $lang_global['securitycodeincorrect1'] : $lang_global['securitycodeincorrect'])));
}
Mở modules/contact/theme.php
if ($global_config['captcha_type'] == 2) {
$xtpl->assign('RECAPTCHA_ELEMENT', 'recaptcha' . nv_genpass(8));
$xtpl->assign('N_CAPTCHA', $lang_global['securitycode1']);
$xtpl->parse('main.recaptcha');
} else {
$xtpl->assign('GFX_WIDTH', NV_GFX_WIDTH);
$xtpl->assign('GFX_HEIGHT', NV_GFX_HEIGHT);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
$xtpl->assign('CAPTCHA_REFRESH', $lang_global['captcharefresh']);
$xtpl->assign('NV_GFX_NUM', NV_GFX_NUM);
$xtpl->parse('main.captcha');
}
Mở themes/ten-theme/modules/contact/form.tpl
<!-- BEGIN: captcha -->
<div class="form-group">
<div class="middle text-right clearfix">
<img width="{GFX_WIDTH}" height="{GFX_HEIGHT}" title="{LANG.captcha}" alt="{LANG.captcha}" src="/index.php?scaptcha=captcha&t={NV_CURRENTTIME}" class="captchaImg display-inline-block">
<em onclick="change_captcha('.fcode');" title="{GLANG.captcharefresh}" class="fa fa-pointer fa-refresh margin-left margin-right"></em>
<input type="text" placeholder="{LANG.captcha}" maxlength="{NV_GFX_NUM}" value="" name="fcode" class="fcode required form-control display-inline-block" style="width:100px;" data-pattern="/^(.){{NV_GFX_NUM},{NV_GFX_NUM}}$/" onkeypress="nv_validErrorHidden(this);" data-mess="{LANG.error_captcha}"/>
</div>
</div>
<!-- END: captcha -->
<!-- BEGIN: recaptcha -->
<div class="form-group">
<div class="middle text-center clearfix">
<div class="nv-recaptcha-default"><div id="{RECAPTCHA_ELEMENT}"></div></div>
<script type="text/javascript">
nv_recaptcha_elements.push({
id: "{RECAPTCHA_ELEMENT}",
btn: $('[type="submit"]', $('#{RECAPTCHA_ELEMENT}').parent().parent().parent().parent())
})
</script>
</div>
</div>
<!-- END: recaptcha -->
Những tin mới hơn
Những tin cũ hơn
Trung tâm ứng dụng NukeViet
Ghi rõ nguồn khi sao chép thông tin từ website này.
Sử dụng CMS NukeViet, thiết kế bởi TDFOSS.,LTD