lang('admin_captcha_login'), 'register' => lang('admin_captcha_register'), 'post' => lang('admin_captcha_post'), 'reply' => lang('admin_captcha_reply'), 'resetpw' => lang('admin_captcha_resetpw'), ); $captcha_gids = $captcha_config['gids'] ?? []; foreach(CaptchaService::SCENES as $scene): $label = isset($scene_labels[$scene]) ? $scene_labels[$scene] : $scene; // 判断是否开启:login/register/resetpw 看游客(0)是否在gids中,post/reply 看是否有任何组在gids中 if (in_array($scene, ['login', 'register', 'resetpw'])) { $is_on = in_array(0, $captcha_gids[$scene] ?? []); } else { $is_on = !empty($captcha_gids[$scene]); } $type = $captcha_config['types'][$scene] ?? ($captcha_config['type'] ?? 'gd_image'); ?>
data-scene="">
>