Beispiel #1
0
 /**
  * 审核/驳回作者文章
  *
  * @param int $blogId
  * @param string $state
  */
 function checkSwitch($blogId, $state)
 {
     $this->db->query("UPDATE " . DB_PREFIX . "blog SET checked='{$state}' WHERE gid={$blogId}");
     $state = $state == 'y' ? 'n' : 'y';
     $this->db->query("UPDATE " . DB_PREFIX . "comment SET hide='{$state}' WHERE gid={$blogId}");
     $Comment_Model = new Comment_Model();
     $Comment_Model->updateCommentNum($blogId);
 }