1601950729-77bd4f2a9f025de

1、模板文件搜索框代码里加入验证码输入框

 
验证码:<input type=”text” name=”validate”><img src=”{dede:global.cfg_cmspath/}/include/vdimgck.php” align=”absmiddle” onclick=”this.src='{dede:global.cfg_cmspath/}/include/vdimgck.php?tag=’+Math.random();” style=”cursor:pointer;”>
 
2、/plus/search.php 里面添加验证码代码,找到
$mid = (isset($mid) && is_numeric($mid)) ? $mid : 0;
 
在它下面加入
$validate = empty($validate) ? ” : strtolower(trim($validate));
$svali = strtolower(GetCkVdValue());
if($validate==” || $validate != $svali)
{
ResetVdValue();
ShowMsg(‘验证码不正确!’,$_SERVER[“HTTP_REFERER”],0,1000);
exit();
}

1601950729-39bad871efc85b2