diff --git a/src/apps/diy.php b/src/apps/diy.php index c56b6e22..63ecf5b6 100755 --- a/src/apps/diy.php +++ b/src/apps/diy.php @@ -67,19 +67,19 @@ if ($action == 'post') { } } //判断$name是否输入中文包括繁体则提交失败,$name改成您表单字段标识,恢复注释代码使用 - /*if (!preg_match('/^[\x{4e00}-\x{9fa5}]+$/u', $name)) { - showMsg('您输入信息不符合,请重新填写', '-1'); + /*if ($name != '' && preg_match("#".$cfg_notallowstr."#i", $name)) { + ShowMsg("您输入的信息存在违禁,请重新填写", "-1"); exit(); }*/ //判断$message是否大于70字符则提交失败,$message改成您表单字段标识,恢复注释代码使用 - /*if (mb_strlen($message) > 70) { - showmsg('您输入文字太多了,请重新填写', '-1'); + /*if ($message != '' && strlen($message) > 70) { + showmsg('您输入的信息太多了,请重新填写', '-1'); exit(); }*/ //获取表单提交的链接、时间、ip,字段标识默认为link、date、ip,前台表单可以不用出现该输入框,但是biz_fields和biz_fieldshash的值要最新,下面是重复提交表单限制,恢复注释代码使用 /*$result = $dsql->getOne("SELECT count(*) AS dd FROM `{$diy->table}` WHERE ip='$ip' AND date_format(date,'Y-m-d') = date_format(now(),'Y-m-d')"); if ($result['dd'] >= 3) { - showmsg('您重复提交太多了,请等待平台联系', '-1'); + showmsg('您已重复提交太多次了,请等待平台联系', '-1'); exit(); }*/ $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar) VALUES (NULL, 0 $addvalue); "; diff --git a/src/apps/search.php b/src/apps/search.php index 5ae5c4a8..4bb81ac9 100755 --- a/src/apps/search.php +++ b/src/apps/search.php @@ -57,11 +57,11 @@ $typeid = intval($typeid); $keyword = addslashes(cn_substr($keyword, 30)); $typeid = intval($typeid); if ($keyword != '' && ($cfg_notallowstr != '' && preg_match("#".$cfg_notallowstr."#i", $keyword))) { - ShowMsg("关键词中存在非法文档,被系统禁止", "-1"); + ShowMsg("您输入的关键词存在违禁,请重新填写", "-1"); exit(); } if (($keyword != '' && strlen($keyword) < 2) && empty($typeid)) { - ShowMsg('您输入关键词太少了,请重新填写', '-1'); + ShowMsg('您输入的关键词太少了,请重新填写', '-1'); exit(); } //检查搜索间隔时间