本文整理汇总了PHP中captcha::build_ayah方法的典型用法代码示例。如果您正苦于以下问题:PHP captcha::build_ayah方法的具体用法?PHP captcha::build_ayah怎么用?PHP captcha::build_ayah使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类captcha
的用法示例。
在下文中一共展示了captcha::build_ayah方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: captcha
}
$captcha = '';
// Show captcha image for guests if enabled and only if we have to do
if ($mybb->settings['captchaimage'] && $do_captcha == true) {
require_once MYBB_ROOT . 'inc/class_captcha.php';
$login_captcha = new captcha(false, "post_captcha");
if ($login_captcha->type == 1) {
if (!$correct) {
$login_captcha->build_captcha();
} else {
$captcha = $login_captcha->build_hidden_captcha();
}
} elseif ($login_captcha->type == 2 || $login_captcha->type == 4) {
$login_captcha->build_recaptcha();
} elseif ($login_captcha->type == 3) {
$login_captcha->build_ayah();
}
if ($login_captcha->html) {
$captcha = $login_captcha->html;
}
}
$username = "";
$password = "";
if (isset($mybb->input['username']) && $mybb->request_method == "post") {
$username = htmlspecialchars_uni($mybb->get_input('username'));
}
if (isset($mybb->input['password']) && $mybb->request_method == "post") {
$password = htmlspecialchars_uni($mybb->get_input('password'));
}
if (!empty($errors)) {
$mybb->input['action'] = "login";
示例2: elseif
if ((!empty($mybb->input['previewpost']) || $hide_captcha == true) && $post_captcha->type == 1) {
// If previewing a post - check their current captcha input - if correct, hide the captcha input area
// ... but only if it's a default one, reCAPTCHA and Are You a Human must be filled in every time due to draconian limits
if ($post_captcha->validate_captcha() == true) {
$correct = true;
// Generate a hidden list of items for our captcha
$captcha = $post_captcha->build_hidden_captcha();
}
}
if (!$correct) {
if ($post_captcha->type == 1) {
$post_captcha->build_captcha();
} elseif ($post_captcha->type == 2 || $post_captcha->type == 4) {
$post_captcha->build_recaptcha();
} elseif ($post_captcha->type == 3) {
$post_captcha->build_ayah();
}
if ($post_captcha->html) {
$captcha = $post_captcha->html;
}
} else {
if ($correct && ($post_captcha->type == 2 || $post_captcha->type == 4)) {
$post_captcha->build_recaptcha();
if ($post_captcha->html) {
$captcha = $post_captcha->html;
}
} else {
if ($correct && $post_captcha->type == 3) {
$post_captcha->build_ayah();
if ($post_captcha->html) {
$captcha = $post_captcha->html;