// 會員(yuan)投稿--文章(zhang)添加
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();
// 會(hui)員(yuan)投(tou)稿(gao)次數(shu)(shu)開啟(qi),查詢(xun)會(hui)員(yuan)投(tou)稿(gao)次數(shu)(shu)是否超過(guo)級(ji)別設置次數(shu)(shu)
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('投稿(gao)次數超過會員級(ji)別限制,請先(xian)升級(ji)!');
}
}
if((time()-$da['add_time'])<120){
$this->error('發帖(tie)太快了,兩分鐘后重試');
}
