// 會員投稿--文章添加
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('發帖太快了,兩分鐘后重試');
}
