예제 #1
0
파일: fans.php 프로젝트: h3len/Project
 /**
  * 取消关注
  */
 public function destroy()
 {
     include_once ROOT_PATH . 'lib/class/friendships.class.php';
     $id = $this->input['id'];
     $add_obj = new friendShips();
     $add_obj->destroy($id);
     $user_id = $this->user['id'];
     //当前用户ID
     echo $this->get_user_relation($user_id, $id);
 }
예제 #2
0
파일: user.php 프로젝트: h3len/Project
 /**
  * 取消关注
  */
 public function destroy()
 {
     include_once ROOT_PATH . 'lib/class/friendships.class.php';
     $id = $this->input['id'];
     $add_obj = new friendShips();
     $rets = $add_obj->destroy($id);
     $user_id = $this->user['id'];
     //当前用户ID
     $ret = $this->get_relation($user_id, $id);
     $info['relation'] = $ret;
     if ($rets && is_array($rets)) {
         $info['cid'] = $rets[0]['sid'];
     }
     echo json_encode($info);
 }
예제 #3
0
파일: follow.php 프로젝트: h3len/Project
 /**
  * 取消关注
  */
 public function delete()
 {
     include_once ROOT_PATH . 'lib/class/friendships.class.php';
     $user_id = $this->input['user_id'];
     //用户ID
     $id = $this->input['id'];
     //操作ID
     $add_obj = new friendShips();
     $result = $add_obj->destroy($id);
 }