Esempio n. 1
0
 public function preform()
 {
     $DaoReply = new DaoReply();
     $data = array('aid' => $this->result['params']['safe']['articleId'], 'uid' => $this->user_info['user_id'], 'reply' => $this->result['params']['safe']['reply'], 'time' => time());
     // print_r($this->result);
     $result = $DaoReply->addReply($data);
     print_r($result);
 }
Esempio n. 2
0
 public function preform()
 {
     $aid = $this->result['params']['safe']['articleid'];
     $DaoArticle = new DaoArticle();
     $info = $DaoArticle->getArticleInfoById($aid);
     $DaoReply = new DaoReply();
     $replyList = $DaoReply->selectReplyByArticleId($aid);
     if (!empty($info)) {
         $arr = array('`link`' => $info[0]['link'] + 1);
         $where = array('id' => $aid);
         $DaoArticle->updateArticle($arr, $where);
     }
     if (!empty($info) && !empty($replyList)) {
         $this->result['info']['article'] = $info;
         $this->result['info']['reply'] = $replyList;
     }
 }