public function getMulti($style, $page, $filter, $exstyle = null, $filter_style = 'default') { $num = $page['num']; $loginApi = new KUser_loginApi(); $loginuid = $loginApi->iGetLoginUid(); $photoApi = new KPhoto_Api(); $albuminfo = $photoApi->getAlbumInfo($filter['uid'], $filter['albumid']); if (empty($albuminfo) || $albuminfo['isrecycle'] && $filter['uid'] != $loginuid) { throw new Exception('获取数据失败', 1); } $photolist = $photoApi->getPhotoListBySeq($filter['uid'], $filter['albumid'], $page['boundary'], $num, $next, $next_boundary, 'imageView2/2/w/240'); return array('list' => $photolist, 'page' => array('num' => $num, 'next' => $next, 'next_boundary' => $next_boundary)); }
Ko_Web_Response::VSetRedirect('/'); Ko_Web_Response::VSend(); exit; } $photoinfo['image_src'] = $storageApi->sGetUrl($photoinfo['image'], ''); $photoinfo['image_small'] = $storageApi->sGetUrl($photoinfo['image'], 'imageView2/1/w/60'); $photoinfo['image_exif'] = $storageApi->aGetImageExif($photoinfo['image']); $agentinfo = KUser_agentApi::get(); if ($agentinfo['screen']['height'] < 1000) { $photoinfo['image'] = $storageApi->sGetUrl($photoinfo['image'], 'imageView2/2/w/600/h/600'); $photoinfo['imagesize'] = 600; } else { $photoinfo['image'] = $storageApi->sGetUrl($photoinfo['image'], 'imageView2/2/w/800/h/800'); $photoinfo['imagesize'] = 800; } $albuminfo = $photoApi->getAlbumInfo($uid, $photoinfo['albumid']); if ($albuminfo['isrecycle'] && $uid != $loginuid) { Ko_Web_Response::VSetRedirect('/'); Ko_Web_Response::VSend(); exit; } $userinfo = Ko_Tool_Adapter::VConv($uid, array('user_baseinfo', array('logo80'))); $prevlist = $nextlist = array(); $curinfo = $photoinfo; while (!empty($curinfo = $photoApi->getPrevPhotoInfo($curinfo))) { $curinfo['image'] = $storageApi->sGetUrl($curinfo['image'], 'imageView2/1/w/60'); array_unshift($prevlist, $curinfo); if (count($prevlist) >= 4) { break; } }