コード例 #1
0
 function getPhotos($uid, $albumId, $type, $order = 'id ASC', $shownum = 5)
 {
     //我的全部照片
     if ($type == 'mAll') {
         $map['userId'] = $uid;
         //好友的全部照片
     } elseif ($type == 'fAll') {
         $api = new TS_API();
         $friends = $api->friend_get();
         $map['userId'] = array('in', $friends);
     } else {
         //某个专辑的全部照片
         $map['albumId'] = $albumId;
         $map['userId'] = $uid;
     }
     $map['isDel'] = 0;
     $result = D('Photo')->order($order)->where($map)->findAll();
     return $result;
 }
コード例 #2
0
ファイル: demo.php プロジェクト: wangping1987/dhfriendluck
-------------------------------------*/
$isAppAdded = $api->user_isAppAdded();
ts_dump($isAppAdded);
/*-------------------------------------
= user_getLinkName
-------------------------------------*/
$r = $api->user_getLinkName(1);
ts_dump($r);
/* ===========================================================================================
 * ========================================= FRIEND ==========================================
 * ===========================================================================================
 */
/*-------------------------------------
=  friend_get()
-------------------------------------*/
$fris = $api->friend_get();
ts_dump($fris);
/*-------------------------------------
= friend_areFriends
-------------------------------------*/
$r = $api->friend_areFriends(1, 2);
ts_dump($r);
/*-------------------------------------
= friend_getAppUsers -- 待完成
-------------------------------------*/
$r = $api->friend_getAppUsers();
ts_dump($r);
/* ===========================================================================================
 * ========================================= SITE ============================================
 * ===========================================================================================
 */