禁止DESTOON会员发布重复信息:
已供应为例子:打开文件module/sell/sell.class.php 在代码
function pass($post)前面增加一个title_exists函数:
function title_exists($title) {
$condition = “title=’$title'”;
return $this->db->get_one(“SELECt itemid FROM {$this->table} WHERe $condition”);
}
在
if($post[‘totime’])这前面添加
if(strlen($post[‘title’]) < 3) return $this->_(lang(‘message->pass_title’));
if(!$this->itemid && $this->title_exists($post[‘title’])) return $this->_(lang(‘message->pass_chongfu’));
最后在找到lang\zh-cn\message.inc.php添加一行 $L[‘pass_chongfu’] = ‘标题重复请重新填写’;
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。