destoon发布信息标题重复不能发布信息

 

比如供应

 

重复标题不能让发布

 

1.module/sell/sell.class.php

 

增加这个函数

function title_exists($title) {
  $condition = "title='$title'";
  return $this->db->get_one("SELECT itemid FROM {$this->table} WHERE $condition");
 }

 

 

然后在function pass($post)这个函数中加入以下判断

 if(!$this->itemid && $this->title_exists($post['title'])) return $this->_('标题不能重复');

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

 

修改的时候要是重复不会提示

相关文章:

  • 2021-11-08
  • 2022-12-23
  • 2021-12-19
  • 2021-12-30
  • 2021-11-29
  • 2021-09-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-23
  • 2021-09-16
  • 2021-11-18
  • 2021-08-06
  • 2021-04-09
  • 2021-11-24
相关资源
相似解决方案