分享好友 教程资讯首页 频道列表

DESTOON程序 禁止同一个会员发布重复信息

2023-10-06 20:09340

当前已发布会员、分站、商城、供应、求购、行情、公司、展会、文章、信息、品牌、团购、图库、专题、视频、下载、人才、知道等模型……

禁止同一个会员发布重复信息:

已供应为例子:打开文件module/sell/sell.class.php

在代码function pass($post)前面增加一个title_exists函数:

  1. function title_exists($title) {
  2.  $condition = "title='$title'";
  3.  return $this->db->get_one("SELECt itemid FROM {$this->table} WHERe $condition");
  4. }

在if($post['totime'])这前面添加:

  1. if(strlen($post['title']) < 3) return $this->_(lang('message->pass_title'));
  2. if(!$this->itemid && $this->title_exists($post['title'])) return $this->_(lang('message->pass_chongfu'));

最后在找到lang\zh-cn\message.inc.php添加一行

  1. $L['pass_chongfu'] = '标题重复请修改';

其他模块一样的方式,找到对应的  module/**/**.class.php  修改即可


反对 0
举报 0
收藏 0
打赏 0
评论 0