Please select To the mobile version | Continue to access the desktop computer version

Discuz! Board UK

 Forgot password?
 Register
Search
View: 1151|Reply: 0

destoon/5.0/6.0/7.0程序 如何禁止网站会员发布重复信息

[Copy link]
Post time 2019-02-12 11:29:15 | Show all posts |Read mode

http://www.baidow.com/jiaocheng/wzjs/201806/27313.html




DESTOON介绍:
DESTOON® B2B网站管理系统是一套基于PHP+MySQL的开源B2B电子商务行业门户网站解决方案。

当前已发布会员、分站、商城、供应、求购、行情、公司、展会、文章、信息、品牌、团购、图库、专题、视频、下载、人才、知道等模型……
软件著作权登记号:2009SR037570   最新版本:V7.0   更新时间:2018-06-23


禁止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'] = '标题重复请重新填写';


Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

QQ|Archiver|Mobile|Dark room|Discuz UK

2020-02-24 11:02 GMT+8 , Processed in 0.486675 second(s), 24 queries .

© 2019 Discuz.uk | Powered by Discuz! X3.4

Quick Reply To Top Return to the list