// 会员投稿--文章添加
public function article_add()
{
if (IS_AJAX_POST) {
$post = input('post.');
$da = Db('archives')->where('users_id',$this->users_id)->order('add_time desc')->find();
// 会员投稿次数开启,查询会员投稿次数是否超过级别设置次数
if (!empty($this->UsersConfig['is_open_posts_count'])) {
$where = [
'level_id' => $this->users['level'],
'posts_count' => ['<=', $this->GetOneDayReleaseCount()],
];
$result = $this->users_level_db->where($where)->count();
if (!empty($result)) {
$this->error('投稿次数超过会员级别限制,请先升级!');
}
}
if((time()-$da['add_time'])<120){
$this->error('发帖太快了,两分钟后重试');
}
