...
|
...
|
@@ -418,18 +418,122 @@ class Index extends Api |
|
|
|
|
|
//自己的笔记文件
|
|
|
$note = $this->myfile(1,$where);
|
|
|
|
|
|
foreach ($note as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//自己的图片文件
|
|
|
$pic = $this->myfile(2,$where);
|
|
|
foreach ($pic as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//自己的视频文件
|
|
|
$video = $this->myfile(3,$where);
|
|
|
foreach ($video as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//转存的笔记文件
|
|
|
$rotor = $this->zhuan(1,$tiao);
|
|
|
foreach ($rotor as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//转存的图片文件
|
|
|
$rotor_pic = $this->zhuan(2,$tiao);
|
|
|
foreach ($rotor_pic as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//转存的视频文件
|
|
|
$rotor_video = $this->zhuan(3,$tiao);
|
|
|
|
|
|
foreach ($rotor_video as &$v){
|
|
|
$user_info = Db::name('user')->where('id',$v['user_id'])->find();
|
|
|
if($v['user_id'] == $user_id){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
if(empty($user_info['whiteip_ids'])){
|
|
|
$v['is_white'] = 2;
|
|
|
}else{
|
|
|
$whiteip_ids = explode(',',$user_info['whiteip_ids']);
|
|
|
if(in_array($user_id,$whiteip_ids)){
|
|
|
$v['is_white'] = 1;
|
|
|
}else{
|
|
|
$v['is_white'] = 2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//笔记
|
|
|
$arr = $this->gong(1,$note,$rotor);
|
|
|
//图片
|
...
|
...
|
|