Example #1
0
function group_get_album_cover($albumId, $albumInfo = '')
{
    //获取相册详细信息
    if (empty($albumInfo) || $albumId != $albumInfo['id']) {
        $albumInfo = D('Album')->find($albumId);
    }
    //照片封面
    if (!empty($albumInfo['coverImagePath'])) {
        $cover = SITE_URL . '/thumb.php?w=120&h=100&url=' . group_get_photo_url($albumInfo['coverImagePath']);
    } else {
        $cover = APP_PUBLIC_URL . '/images/photo_zwzp.gif';
    }
    return $cover;
}
Example #2
0
 function doaddShare()
 {
     $type['typeId'] = 8;
     $type['typeName'] = '圈子';
     $type['alias'] = 'group';
     $info = h($_REQUEST['info']);
     $aimId = intval($_REQUEST['aimId']);
     $field = 'uid,name,logo,cid0,membercount';
     $data = D('group')->where("id='{$aimId}'")->field($field)->find();
     $data['logo'] = group_get_photo_url($data['logo']);
     $data['catagory'] = D('Category')->where("id=" . $data['cid0'])->getField('title');
     //$data['name'] = h($_REQUEST['name']);
     $fids = $_REQUEST['fids'];
     $result = $this->api->share_addShare($type, $aimId, $data, $info, 0, $fids);
     echo $result;
 }