苹果CMSV10获取当前用户收藏列表,可用于判断,是否已经收藏该影片
$h2_ufav_where=array();$h2_ufav_where['user_id'] = $GLOBALS['user']['user_id'];$h2_ufav_where['ulog_type'] = 2;$h2_ufav_data = model('Ulog')->listData($h2_ufav_where,'ulog_id desc',1,9999);foreach ($h2_ufav_data['list'] as $k => $v) { if($v['ulog_mid'] == 1){ $h2_ufav_vlist[] = $v['ulog_rid']; }elseif($v['ulog_mid'] == 2){ $h2_ufav_alist[] = $v['ulog_rid']; }elseif($v['ulog_mid'] == 3){ $h2_ufav_tlist[] = $v['ulog_rid']; }}$h2_ufav_vlist = array_unique($h2_ufav_vlist);//视频$h2_ufav_alist = array_unique($h2_ufav_alist);//文章$h2_ufav_tlist = array_unique($h2_ufav_tlist);//专题
$h2_ufav_list是个数组,用in_array 验证当前视频id是否在这个数组中就ok了