Example #1
0
 public function comment()
 {
     $event_id = $_GET['id'];
     $event = EventModel::detail($event_id);
     $data = array('app' => 'public', 'table' => 'event', 'row_id' => $event_id, 'app_uid' => $event['uid'], 'uid' => $this->uid, 'content' => strip_tags($_REQUEST['content'], '<img><a><p><b><i>'), 'to_comment_id' => 0, 'to_uid' => 0, 'client_type' => 0, 'ctime' => time());
     $info = M('comment')->add($data);
     if ($info) {
         M('event')->updateCommentCount($photo_id);
         $this->ajaxReturn(null, '评论成功');
     }
     $this->ajaxReturn(null, '评论失败', false);
 }
 public static function detail($id)
 {
     EventModel::detail($id);
 }